moveit_tutorials icon indicating copy to clipboard operation
moveit_tutorials copied to clipboard

Spacenav Error while using moveit servo tutorial

Open Akumar201 opened this issue 2 years ago • 9 comments

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

  1. roslaunch ur5_bringup.launch
  2. roslaunch moveit_planning_execution.launch sim:=true
  3. 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

Akumar201 avatar Feb 02 '23 16:02 Akumar201

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

AndyZe avatar Feb 02 '23 16:02 AndyZe

Try installing the spacenav daemon: sudo apt install spacenavd. Looks like this dependency is missing in spacenav_node.

rhaschke avatar Feb 03 '23 09:02 rhaschke

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.

gavanderhoorn avatar Feb 03 '23 09:02 gavanderhoorn

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.

rhaschke avatar Feb 03 '23 10:02 rhaschke

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.

gavanderhoorn avatar Feb 03 '23 10:02 gavanderhoorn

So, we should cleanup moveit_servo to not use spacenav_node anymore...

rhaschke avatar Feb 03 '23 10:02 rhaschke

I don't know. I just wanted to report my experiences with spacenavs and ROS and whether the spacenav_node is still needed.

gavanderhoorn avatar Feb 03 '23 10:02 gavanderhoorn

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.

Akumar201 avatar Feb 06 '23 19:02 Akumar201

Noting that there currently is no dependency on spacenav in MoveIt2.

AndyZe avatar Feb 15 '23 13:02 AndyZe