moveit_tutorials
moveit_tutorials copied to clipboard
Spacenav Error while using moveit servo tutorial
Background
I am following the (moveit servoing tutorial)[https://ros-planning.github.io/moveit_tutorials/doc/realtime_servo/realtime_servo_tutorial.html], however I am getting the following error related to spacenavd
[ERROR] [1669672889.199512421]: Could not open the space navigator device. Did you remember to run spacenavd (as root)?
[spacenav_node_abc_ThinkPad_P17_Gen_2i_29034_5978491666214438105-1] process has died [pid 29049, exit code 1, cmd /home/abc/ws_moveit/devel/lib/spacenav_node/spacenav_node __name:=spacenav_node_abc_ThinkPad_P17_Gen_2i_29034_5978491666214438105 __log:=/home/abc/.ros/log/7bcc805e-6f61-11ed-8cc6-fb1b3c97baa8/spacenav_node_abc_ThinkPad_P17_Gen_2i_29034_5978491666214438105-1.log].
log file: /home/abc/.ros/log/7bcc805e-6f61-11ed-8cc6-fb1b3c97baa8/spacenav_node_abc_ThinkPad_P17_Gen_2i_29034_5978491666214438105-1*.log
Instructions
I did git clone UR Repo. Run the following command
- roslaunch ur5_bringup.launch
- roslaunch moveit_planning_execution.launch sim:=true
- roslaunch move_group.launch
However, after the roslaunch move_group.launch I am getting the above error. I tried to fix the the code using the following site http://wiki.ros.org/spacenav_node/Troubleshooting
I am using Ubuntu 20.04 and ROS Noetic
It sounds like this is not a MoveIt question but it's really about getting the SpaceNav input device to work on Linux. But if you learn something useful, it might be nice to add to the tutorial!
If you plug the SpaceNav in, do you see a new entry in the /dev/input folder? Does it go away when you unplug it? That's a basic first test.
Here's a Google search that will probably help: https://www.google.com/search?channel=fs&client=ubuntu&q=linux+spacenavd
Try installing the spacenav daemon: sudo apt install spacenavd. Looks like this dependency is missing in spacenav_node.
Afaik the daemon is not needed on recent Linux kernels. It's also deprecated I believe.
The "only" thing you'll miss are some configuration options.
The spacenav_node explicitly asked for the daemon: Did you remember to run spacenavd (as root)?
Sure, one doesn't need the daemon to access the input device directly, but the spacenav_node still relies on spacenavd, calling spnav_open(), which is linked to spacenavd.
You don't even need the spacenav_node. A spacenav registers as a generic joystick HID device on recent kernels. You can just use joy and a suitable node to convert that to Twist or Wrench (fi).
I've never missed the daemon.
So, we should cleanup moveit_servo to not use spacenav_node anymore...
I don't know. I just wanted to report my experiences with spacenavs and ROS and whether the spacenav_node is still needed.
I guess , yes cleaning up the spacenav_node would be good Idea. @rhaschke I am working on making a easy example using with detail pose_tracking_example.launch , I would love to share it with the community.
Noting that there currently is no dependency on spacenav in MoveIt2.