moveit icon indicating copy to clipboard operation
moveit copied to clipboard

Could not open the space navigator device. Did you remember to run spacenavd (as root)?

Open Akumar201 opened this issue 3 years ago • 6 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 Nov 28 '22 22:11 Akumar201

For those trying the moveit_servo demo and running into this issue, simply don't launch the spacenav_cpp.launch

Instead, bring up the servo server with: rosrun moveit_servo servo_server

Then publish move commands directly to topic with command:

rostopic pub -r 100 -s /servo_server/delta_twist_cmds geometry_msgs/TwistStamped "header: auto
twist:
  linear:
    x: 0.0
    y: 0.01
    z: -0.01
  angular:
    x: 0.0
    y: 0.0
    z: 0.0"

Strangely though when I stop publishing on this topic, the robot keeps moving in the simulation. So be careful trying this on a real robot.

TemugeB avatar Mar 16 '23 10:03 TemugeB

Strangely though when I stop publishing on this topic, the robot keeps moving in the simulation. So be careful trying this on a real robot.

The incoming_command_timeout parameter should prevent that. If it's not working, can you create a separate issue for that?

https://github.com/ros-planning/moveit/blob/9ee989d67867f8a5cc91907cb2733dc88bf8be51/moveit_ros/moveit_servo/config/ur_simulated_config.yaml#L39

AndyZe avatar Mar 16 '23 13:03 AndyZe

I tried running the moveit_servo demo again and the issue is still present. I made a video of the issue on youtube.

Following Moveit Noetic documentation (link), I'm using the 1.2.7 branch for universal_robot. Because of https://github.com/ros-industrial/universal_robot/issues/627, I'm not using the latest package. Should I create a separate issue?

TemugeB avatar Mar 17 '23 04:03 TemugeB

Thanks for the video! Can you please create a new Issue for that, since it's not related to this Issue?

AndyZe avatar Mar 17 '23 13:03 AndyZe

@devvaibhav455, your comment is unrelated to this issue. Please open a new one, instead of hijacking existing threads! By the way, your problem seems to be a duplicate of https://github.com/ros-planning/moveit/issues/3357.

rhaschke avatar Jun 13 '23 20:06 rhaschke

Just for others in the future. What was essential was the installation of the spacenav_node package: http://wiki.ros.org/spacenav_node Run: $ sudo apt install spacenavd $ sudo apt install ros-noetic-spacenav-node

Then run: roslaunch moveit_servo spacenav_cpp.launch

michael-fenelon avatar Apr 14 '24 13:04 michael-fenelon