Could not open the space navigator device. Did you remember to run spacenavd (as root)?
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
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.
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
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?
Thanks for the video! Can you please create a new Issue for that, since it's not related to this Issue?
@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.
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