3Dconnexion input devices: Difference between revisions
m (added known issue title) |
No edit summary |
||
(38 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
|||
<!--T:52--> |
|||
[[File:SpaceNavigator.jpg|200px|thumb|right|3Dconnexion SpaceNavigator]] |
[[File:SpaceNavigator.jpg|200px|thumb|right|3Dconnexion SpaceNavigator]] |
||
</translate> |
|||
{{TOCright}} |
|||
<translate> |
<translate> |
||
== Driver installation == <!--T:1--> |
== Driver installation == <!--T:1--> |
||
=== Linux === |
|||
=== Linux === <!--T:29--> |
|||
<!--T:30--> |
|||
FreeCAD supports drivers from project [http://spacenav.sourceforge.net/ Spacenav]. This is a project aiming to create an open-sourced driver which is compatible with the proprietary drivers from 3Dconnexion. |
FreeCAD supports drivers from project [http://spacenav.sourceforge.net/ Spacenav]. This is a project aiming to create an open-sourced driver which is compatible with the proprietary drivers from 3Dconnexion. |
||
==== Install from repo ==== <!--T:14--> |
==== Install from repo ==== <!--T:14--> |
||
===== Ubuntu ===== |
|||
===== Ubuntu ===== <!--T:31--> |
|||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
Line 13: | Line 24: | ||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:47--> |
|||
Note, however, that version 0.6 available on Ubuntu 20.04 (and probably older ones) does not seem to work. You then have to compile spacenavd from source as explained below. |
|||
===== Fedora ===== <!--T:23--> |
===== Fedora ===== <!--T:23--> |
||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
Line 22: | Line 37: | ||
===== Debian ===== <!--T:25--> |
===== Debian ===== <!--T:25--> |
||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
apt-get install spacenavd libspnav-dev |
apt-get install spacenavd libspnav-dev |
||
}} |
}} |
||
<translate> |
|||
* spacenav needs these permissions |
|||
{{Code|code= |
|||
<!--T:32--> |
|||
Spacenav needs these permissions: |
|||
</translate> |
|||
:{{Code|code= |
|||
cp ~/.Xauthority /root/ |
cp ~/.Xauthority /root/ |
||
}} |
}} |
||
<translate> |
|||
* Restart spnavd and FreeCAD |
|||
{{Code|code= |
|||
<!--T:33--> |
|||
Restart spnavd and FreeCAD |
|||
</translate> |
|||
:{{Code|code= |
|||
/usr/bin/spnavd_ctl x11 stop |
/usr/bin/spnavd_ctl x11 stop |
||
/usr/bin/spnavd_ctl x11 start |
/usr/bin/spnavd_ctl x11 start |
||
}} |
|||
<translate> |
|||
===== openSUSE ===== <!--T:46--> |
|||
</translate> |
|||
{{Code|code= |
|||
sudo zypper install spacenavd |
|||
}} |
}} |
||
<translate> |
<translate> |
||
==== Compile Spacenav from source ==== <!--T:2--> |
==== Compile Spacenav from source ==== <!--T:2--> |
||
<!--T:34--> |
|||
This is recommended if your distribution might provide an outdated version. |
This is recommended if your distribution might provide an outdated version. |
||
<!--T:24--> |
<!--T:24--> |
||
*Download the following files: |
*Download the following files: |
||
**[ |
**[https://sourceforge.net/projects/spacenav/files/latest/download spacenavd] (latest version) |
||
**[ |
**[https://sourceforge.net/projects/spacenav/files/spacenav%20library%20%28SDK%29/ libspnav] (get latest libspnav version) |
||
**[ |
**[https://sourceforge.net/projects/spacenav/files/spacenavd%20config%20gui/ spnavcfg] (get latest libspnav version) |
||
*Unpack the archives into a folder in your home directory. |
*Unpack the archives into a folder in your home directory. |
||
*Enter the |
*Enter the spacenavd-x.x directory and run the following commands: |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
./configure |
./configure |
||
make |
make |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:3--> |
<!--T:3--> |
||
*If this was successful, run the following commands '''as root''' (or prefix with sudo.) |
* If this was successful, run the following commands '''as root''' (or prefix with sudo.) |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
make install |
make install |
||
./setup_init |
./setup_init |
||
Line 62: | Line 101: | ||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:4--> |
<!--T:4--> |
||
*This installs the spacenav daemon, configures it to automatically load on system boot, and starts the daemon without having to reboot. |
*This installs the spacenav daemon, configures it to automatically load on system boot, and starts the daemon without having to reboot. |
||
*Now it is time to check that your device is properly detected. With your device unplugged, run the following command and then plug it in. |
*Now it is time to check that your device is properly detected. With your device unplugged, run the following command and then plug it in. |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
tail -n100 -f /var/log/spnavd.log |
tail -n100 -f /var/log/spnavd.log |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:5--> |
<!--T:5--> |
||
*If the output looks something like this, you can continue. |
*If the output looks something like this, you can continue. |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
Device detection, parsing /proc/bus/input/devices |
Device detection, parsing /proc/bus/input/devices |
||
trying alternative detection, querying /dev/input/eventX device names... |
trying alternative detection, querying /dev/input/eventX device names... |
||
Line 82: | Line 125: | ||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:6--> |
<!--T:6--> |
||
*Now enter the directory named libspnav- |
*Now enter the directory named libspnav-x.x.x and run the following commands: |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
./configure |
./configure |
||
make |
make |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:7--> |
<!--T:7--> |
||
*If make fails with the following error: ... |
*If make fails with the following error: ... |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
fatal error: gtk/gtk.h: No such file or directory |
fatal error: gtk/gtk.h: No such file or directory |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:8--> |
<!--T:8--> |
||
* ... then you need to install libgtkmm-2.4-dev. Under Ubuntu, this is done like this: |
* ... then you need to install '''libgtkmm-2.4-dev'''. Under Ubuntu, this is done like this: |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
sudo apt-get install libgtkmm-2.4-dev |
sudo apt-get install libgtkmm-2.4-dev |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:9--> |
<!--T:9--> |
||
*When make has completed successfully, run the following command '''as root''' (or prefix with sudo.) |
*When make has completed successfully, run the following command '''as root''' (or prefix with sudo.) |
||
</translate> |
</translate> |
||
{{Code|code= |
:{{Code|code= |
||
make install |
make install |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:10--> |
<!--T:10--> |
||
*Look in the directory libspnav- |
*Look in the directory libspnav-x.x.x/examples/. If you want to test your device, compile and run either one of the two examples. |
||
<!--T:11--> |
<!--T:11--> |
||
*Follow the same pattern to compile and install spnavcfg. Make sure to run spnavcfg as root, or no settings will be saved! |
*Follow the same pattern to compile and install '''spnavcfg'''. Make sure to run spnavcfg as root, or no settings will be saved! |
||
==== Starting spacenavd as a systemd service at boot ==== <!--T:48--> |
|||
<!--T:49--> |
|||
If you want to start spacenavd at boot using systemd, do the following: |
|||
<!--T:50--> |
|||
* Go to the directory where you clone the spacenavd repository (to the root of the repository) |
|||
* "sudo cp contrib/systemd/spacenavd.service /usr/lib/systemd/system/spacenavd-local.service". |
|||
* "sudo systemctl enable spacenavd-local.service". |
|||
* "sudo systemctl start spacenavd-local.service", if you want to start it right away. |
|||
<!--T:51--> |
|||
This is only necessary for the installation from source. |
|||
==== Restarting spacenavd ==== <!--T:12--> |
|||
<!--T:35--> |
|||
If sometimes SpaceNavigator stops working, it is good to restart driver. To restart it, go to Terminal and execute: |
|||
==== Restart ==== <!--T:12--> |
|||
If sometimes navigator stops working, it is good to restart driver. To restart it, go to Terminal and execute: |
|||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
Line 125: | Line 194: | ||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:13--> |
<!--T:13--> |
||
After that restart FreeCAD. On some distros this is necessary at each boot. |
After that restart FreeCAD. On some distros this is necessary at each boot. |
||
=== |
=== Known Issues === <!--T:36--> |
||
3Dconnexion input devices are supported on OS X, provided that FreeCAD is built and used on a system with the 3Dconnexion drivers installed. |
|||
<!--T:37--> |
|||
A user reported on the [https://forum.freecadweb.org/viewtopic.php?p=341327#p341327 forum] they saw the following: |
|||
Spacenav daemon 0.6 |
|||
failed to open config file /etc/spnavrc: No such file or directory. using defaults. |
|||
adding device. |
|||
device name: 3Dconnexion SpacePilot |
|||
using device: /dev/input/event5 |
|||
No protocol specified |
|||
failed to open X11 display ":0.0" |
|||
The workaround that worked for them: |
|||
</translate> |
|||
{{Code|code= |
|||
sudo cp ~/.Xauthority /root/ |
|||
sudo spnavd_ctl x11 start |
|||
sudo systemctl restart spacenavd |
|||
}} |
|||
<translate> |
|||
=== macOS === <!--T:15--> |
|||
<!--T:38--> |
|||
3Dconnexion input devices are supported on macOS, provided FreeCAD is built and used on a system with the 3Dconnexion drivers installed. You may need 3DxWare 10.7.2 or greater for macOS 12 Monterey. |
|||
=== Windows === <!--T:16--> |
=== Windows === <!--T:16--> |
||
<!--T:39--> |
|||
As of version 0.13, 3D mouse is supported under Windows. You need to have 3Dconnexion drivers installed. |
As of version 0.13, 3D mouse is supported under Windows. You need to have 3Dconnexion drivers installed. |
||
==== Known Issue ==== |
==== Known Issue ==== <!--T:26--> |
||
<!--T:40--> |
|||
There is an issue where 3Dconnexion sends duplicate scroll events to FreeCAD, which causes the view to jump. To fix it: |
There is an issue where 3Dconnexion sends duplicate scroll events to FreeCAD, which causes the view to jump. To fix it: |
||
<!--T:27--> |
|||
# Open 3Dconnexion Properties. You can double-click its icon in the Taskbar, next to the Windows clock. |
# Open 3Dconnexion Properties. You can double-click its icon in the Taskbar, next to the Windows clock. |
||
# Click on the Advanced Settings button. |
# Click on the Advanced Settings button. |
||
Line 142: | Line 240: | ||
# Switch back to 3Dconnexion Advanced Settings. Confirm that it says "FreeCAD" in the heading. |
# Switch back to 3Dconnexion Advanced Settings. Confirm that it says "FreeCAD" in the heading. |
||
# Uncheck all boxes on the page. |
# Uncheck all boxes on the page. |
||
<!--T:28--> |
|||
<small>ref: https://freecadweb.org/tracker/view.php?id=1893</small> |
|||
== Setting up FreeCAD == <!--T:17--> |
== Setting up FreeCAD == <!--T:17--> |
||
3D mouse support was made with spnav project on Linux, and on a very low level on Windows. This means there was no support for any settings for a device, since on Linux there is no good support for this, and on Windows it is overridden. This is why two additional pages were added to "Customize" dialog. |
|||
<!--T:41--> |
|||
3D mouse support was made with ''spnav project'' on Linux, and on a very low level on Windows. This means there was no support for any settings for a device, since on Linux there is no good support for this, and on Windows it is overridden. This is why two additional pages were added to "Customize" dialog. |
|||
</translate> |
</translate> |
||
Line 152: | Line 255: | ||
=== Spaceball Motion === <!--T:18--> |
=== Spaceball Motion === <!--T:18--> |
||
<!--T:42--> |
|||
In this tab you have ability to set up some of general space mouse settings. They include: |
In this tab you have ability to set up some of general space mouse settings. They include: |
||
* Global Sensitivity - Slider with ability to set global sensitivity |
* Global Sensitivity - Slider with ability to set global sensitivity |
||
Line 168: | Line 273: | ||
=== Spaceball Buttons === <!--T:20--> |
=== Spaceball Buttons === <!--T:20--> |
||
<!--T:43--> |
|||
When you open this tab for the first time, it will be empty and unavailable. To activate it, you must press one of your space mouse buttons. After you do, list of buttons will appear on the left side, and list of commands will be available on the right side. |
When you open this tab for the first time, it will be empty and unavailable. To activate it, you must press one of your space mouse buttons. After you do, list of buttons will appear on the left side, and list of commands will be available on the right side. |
||
Line 174: | Line 281: | ||
To clear commands from button, press "Clear". |
To clear commands from button, press "Clear". |
||
<!--T: |
=== Troubleshooting === <!--T:53--> |
||
[[Category:User Documentation]] |
|||
<!--T:54--> |
|||
Check if your FreeCAD installation links to the spacenav library. The best way to check this is by running FreeCAD from the command line terminal {{incode|FreeCAD --log-file /tmp/freecad.log}} and close it immediately again. Then open the file {{FileName|/tmp/freecad.log}} and search for the messages: |
|||
</translate> |
|||
{{incode|Connected to spacenav daemon}} |
|||
<translate> |
|||
<!--T:62--> |
|||
or |
|||
</translate> |
|||
{{incode|Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.}} |
|||
<translate> |
|||
<!--T:61--> |
|||
If none of them appears then your FreeCAD build doesn't link to the spacenav library. If the former message appears then it basically works. The latter message means there is probably a problem with the spacenav daemon. |
|||
== Related == <!--T:44--> |
|||
<!--T:45--> |
|||
* Forum thread [https://forum.freecadweb.org/viewtopic.php?f=3&t=51023 spacenav on Windows] |
|||
* Forum thread [https://forum.freecadweb.org/viewtopic.php?f=8&t=57188 Space navigator axis confusion] |
|||
</translate> |
</translate> |
||
[[Category:User Documentation{{#translation:}}]] |
|||
[[Category:3rd Party{{#translation:}}]] |
Latest revision as of 11:36, 14 January 2024
Driver installation
Linux
FreeCAD supports drivers from project Spacenav. This is a project aiming to create an open-sourced driver which is compatible with the proprietary drivers from 3Dconnexion.
Install from repo
Ubuntu
sudo apt-get install spacenavd
Note, however, that version 0.6 available on Ubuntu 20.04 (and probably older ones) does not seem to work. You then have to compile spacenavd from source as explained below.
Fedora
sudo yum install spacenavd
Debian
apt-get install spacenavd libspnav-dev
Spacenav needs these permissions:
cp ~/.Xauthority /root/
Restart spnavd and FreeCAD
/usr/bin/spnavd_ctl x11 stop /usr/bin/spnavd_ctl x11 start
openSUSE
sudo zypper install spacenavd
This is recommended if your distribution might provide an outdated version.
- Download the following files:
- Unpack the archives into a folder in your home directory.
- Enter the spacenavd-x.x directory and run the following commands:
./configure make
- If this was successful, run the following commands as root (or prefix with sudo.)
make install ./setup_init /etc/init.d/spacenavd start
- This installs the spacenav daemon, configures it to automatically load on system boot, and starts the daemon without having to reboot.
- Now it is time to check that your device is properly detected. With your device unplugged, run the following command and then plug it in.
tail -n100 -f /var/log/spnavd.log
- If the output looks something like this, you can continue.
Device detection, parsing /proc/bus/input/devices trying alternative detection, querying /dev/input/eventX device names... trying "/dev/input/event1" ... Power Button trying "/dev/input/event2" ... 3Dconnexion SpaceNavigator using device: /dev/input/event2 device name: 3Dconnexion SpaceNavigator
- Now enter the directory named libspnav-x.x.x and run the following commands:
./configure make
- If make fails with the following error: ...
fatal error: gtk/gtk.h: No such file or directory
- ... then you need to install libgtkmm-2.4-dev. Under Ubuntu, this is done like this:
sudo apt-get install libgtkmm-2.4-dev
- When make has completed successfully, run the following command as root (or prefix with sudo.)
make install
- Look in the directory libspnav-x.x.x/examples/. If you want to test your device, compile and run either one of the two examples.
- Follow the same pattern to compile and install spnavcfg. Make sure to run spnavcfg as root, or no settings will be saved!
If you want to start spacenavd at boot using systemd, do the following:
- Go to the directory where you clone the spacenavd repository (to the root of the repository)
- "sudo cp contrib/systemd/spacenavd.service /usr/lib/systemd/system/spacenavd-local.service".
- "sudo systemctl enable spacenavd-local.service".
- "sudo systemctl start spacenavd-local.service", if you want to start it right away.
This is only necessary for the installation from source.
If sometimes SpaceNavigator stops working, it is good to restart driver. To restart it, go to Terminal and execute:
sudo xhost +
sudo /etc/init.d/spacenavd restart
After that restart FreeCAD. On some distros this is necessary at each boot.
Known Issues
A user reported on the forum they saw the following:
Spacenav daemon 0.6 failed to open config file /etc/spnavrc: No such file or directory. using defaults. adding device. device name: 3Dconnexion SpacePilot using device: /dev/input/event5 No protocol specified failed to open X11 display ":0.0"
The workaround that worked for them:
sudo cp ~/.Xauthority /root/
sudo spnavd_ctl x11 start
sudo systemctl restart spacenavd
macOS
3Dconnexion input devices are supported on macOS, provided FreeCAD is built and used on a system with the 3Dconnexion drivers installed. You may need 3DxWare 10.7.2 or greater for macOS 12 Monterey.
Windows
As of version 0.13, 3D mouse is supported under Windows. You need to have 3Dconnexion drivers installed.
Known Issue
There is an issue where 3Dconnexion sends duplicate scroll events to FreeCAD, which causes the view to jump. To fix it:
- Open 3Dconnexion Properties. You can double-click its icon in the Taskbar, next to the Windows clock.
- Click on the Advanced Settings button.
- Open FreeCAD or switch to an already-open FreeCAD window.
- Switch back to 3Dconnexion Advanced Settings. Confirm that it says "FreeCAD" in the heading.
- Uncheck all boxes on the page.
ref: https://freecadweb.org/tracker/view.php?id=1893
Setting up FreeCAD
3D mouse support was made with spnav project on Linux, and on a very low level on Windows. This means there was no support for any settings for a device, since on Linux there is no good support for this, and on Windows it is overridden. This is why two additional pages were added to "Customize" dialog.
Spaceball Motion
In this tab you have ability to set up some of general space mouse settings. They include:
- Global Sensitivity - Slider with ability to set global sensitivity
- Dominant - if you enable dominant mode, only axes with highest move will be considered
- Flip YZ - This option enables you to flip Y and Z axes on 3D mouse
- Enable Translations - easy way to enable/disable translations
- Enable Rotations - easy way to enable/disable rotations
- Calibrate - enables you to calibrate space navigator. It is pressed while space navigator is not moved.
- Set To Default - removes all settings and sets them to default.
Other than this, for each axes you have ability to set:
- Enabled - Enable/Disable axes
- Reverse - Reverse movement on axes
- Sensitivity - slider with ability to set sensitivity
Spaceball Buttons
When you open this tab for the first time, it will be empty and unavailable. To activate it, you must press one of your space mouse buttons. After you do, list of buttons will appear on the left side, and list of commands will be available on the right side.
To connect certain command with a button, select button on the left side, and it's command on the right side. To clear commands from button, press "Clear".
Troubleshooting
Check if your FreeCAD installation links to the spacenav library. The best way to check this is by running FreeCAD from the command line terminal FreeCAD --log-file /tmp/freecad.log
and close it immediately again. Then open the file /tmp/freecad.log and search for the messages:
Connected to spacenav daemon
or
Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.
If none of them appears then your FreeCAD build doesn't link to the spacenav library. If the former message appears then it basically works. The latter message means there is probably a problem with the spacenav daemon.
Related
- Forum thread spacenav on Windows
- Forum thread Space navigator axis confusion