3Dconnexion input devices: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Marked this version for translation)
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
[[File:SpaceNavigator.jpg|200px|thumb|right|3Dconnexion SpaceNavigator]]
[[File:SpaceNavigator.jpg|200px|thumb|right|3Dconnexion SpaceNavigator]]
{{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-->

===== Ubuntu ===== <!--T:31-->

</translate>
{{Code|code=
sudo apt-get install spacenavd
}}
<translate>

===== Fedora ===== <!--T:23-->

</translate>
{{Code|code=
sudo yum install spacenavd
}}
<translate>

===== Debian ===== <!--T:25-->

</translate>
{{Code|code=
apt-get install spacenavd libspnav-dev
}}
<translate>

<!--T:32-->
* spacenav needs these permissions

</translate>
{{Code|code=
cp ~/.Xauthority /root/
}}
<translate>

<!--T:33-->
* Restart spnavd and FreeCAD

</translate>
{{Code|code=
/usr/bin/spnavd_ctl x11 stop
/usr/bin/spnavd_ctl x11 start
}}
<translate>


==== Compile Spacenav from source ==== <!--T:2-->
==== Compile Spacenav from source ==== <!--T:2-->

This is recommended since your distribution might provide an outdated version. For example, Ubuntu repos contain version 0.3.0 as of 2011-04-10.
<!--T:34-->
This is recommended if your distribution might provide an outdated version.

<!--T:24-->
*Download the following files:
*Download the following files:
**[http://sourceforge.net/projects/spacenav/files/spacenav%20daemon/spacenavd%200.5/spacenavd-0.5.tar.gz/download spacenavd-0.5.tar.gz]
**[http://sourceforge.net/projects/spacenav/files/spacenav%20daemon/spacenavd%200.5/spacenavd-0.5.tar.gz/download spacenavd-0.5.tar.gz]
Line 13: Line 68:
*Unpack the archives into a folder in your home directory.
*Unpack the archives into a folder in your home directory.
*Enter the directory spacenavd-0.5 and run the following commands:
*Enter the directory spacenavd-0.5 and run the following commands:

<pre>
</translate>
</translate>
{{Code|code=
./configure
./configure
make
make
}}
</pre>
<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=
<pre>
make install
make install
./setup_init
./setup_init
/etc/init.d/spacenavd start
/etc/init.d/spacenavd start
}}
</pre>
<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=
<pre>tail -n100 -f /var/log/spnavd.log </pre>
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=
<pre>
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 44: Line 108:
using device: /dev/input/event2
using device: /dev/input/event2
device name: 3Dconnexion SpaceNavigator
device name: 3Dconnexion SpaceNavigator
}}
</pre>
<translate>
<translate>

<!--T:6-->
<!--T:6-->
*Now enter the directory named libspnav-0.2.2 and run the following commands:
*Now enter the directory named libspnav-0.2.2 and run the following commands:

</translate>
</translate>
{{Code|code=
<pre>
./configure
./configure
make
make
}}
</pre>
<translate>
<translate>

<!--T:7-->
<!--T:7-->
*If make fails with the following error: ...
*If make fails with the following error: ...

</translate>
</translate>
{{Code|code=
<pre>
fatal error: gtk/gtk.h: No such file or directory
fatal error: gtk/gtk.h: No such file or directory
}}
</pre>
<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=
<pre>
sudo apt-get install libgtkmm-2.4-dev
sudo apt-get install libgtkmm-2.4-dev
}}
</pre>
<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=
<pre>
make install
make install
}}
</pre>
<translate>
<translate>

<!--T:10-->
<!--T:10-->
*Look in the directory libspnav-0.2.2/examples/. If you want to test your device, compile and run either one of the two examples.
*Look in the directory libspnav-0.2.2/examples/. If you want to test your device, compile and run either one of the two examples.
Line 81: Line 154:
*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!


==== Restart ==== <!--T:12-->
==== Restarting spacenavd ==== <!--T:12-->

<!--T:35-->
If sometimes navigator stops working, it is good to restart driver. To restart it, go to Terminal and execute:
If sometimes navigator stops working, it is good to restart driver. To restart it, go to Terminal and execute:

</translate>
</translate>
{{Code|code=
sudo xhost +
sudo xhost +
sudo /etc/init.d/spacenavd restart
sudo /etc/init.d/spacenavd restart
}}
<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.


==== Install from repo ==== <!--T:14-->
=== Known Issues === <!--T:36-->

===== Ubuntu =====
<!--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>
</translate>
{{Code|code=
<pre>sudo apt-get install spacenavd</pre>
sudo cp ~/.Xauthority /root/
sudo spnavd_ctl x11 start
sudo systemctl restart spacenavd
}}
<translate>
<translate>


=== OSX === <!--T:15-->
=== OSX === <!--T:15-->

One user managed to get space navigator working under OSX. However it was not merged in master yet. More info [http://forum.freecadweb.org/viewtopic.php?f=10&t=2576&hilit=space+navigator+osx&start=10#p19923 here]
<!--T:38-->
3Dconnexion input devices are supported on OS X, provided that FreeCAD is built and used on a system with the 3Dconnexion drivers installed.


=== Windows === <!--T:16-->
=== Windows === <!--T:16-->

As of version 0.13, 3D mouse is supported under windows. You need to have propriate drivers installed, but since support was developed on lower level, it will override settings you set in 3D Connexion control panel. However, most of those settings can be set in Tools>>Customize dialog, under Spaceball tabs.
<!--T:39-->
As of version 0.13, 3D mouse is supported under Windows. You need to have 3Dconnexion drivers installed.

==== 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:

<!--T:27-->
# 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.

<!--T:28-->
<small>ref: https://freecadweb.org/tracker/view.php?id=1893</small>


== Setting up FreeCAD == <!--T:17-->
== Setting up FreeCAD == <!--T:17-->

<!--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.
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.


Line 111: Line 226:


=== 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 127: Line 244:


=== 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 135: Line 254:
<!--T:22-->
<!--T:22-->
[[Category:User Documentation]]
[[Category:User Documentation]]

</translate>
</translate>
<languages/>

Revision as of 07:07, 17 October 2019

3Dconnexion SpaceNavigator

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
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

Compile Spacenav from source

This is recommended if your distribution might provide an outdated version.

./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-0.2.2 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-0.2.2/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!

Restarting spacenavd

If sometimes navigator 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

OSX

3Dconnexion input devices are supported on OS X, provided that FreeCAD is built and used on a system with the 3Dconnexion drivers installed.

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:

  1. Open 3Dconnexion Properties. You can double-click its icon in the Taskbar, next to the Windows clock.
  2. Click on the Advanced Settings button.
  3. Open FreeCAD or switch to an already-open FreeCAD window.
  4. Switch back to 3Dconnexion Advanced Settings. Confirm that it says "FreeCAD" in the heading.
  5. 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".