ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Publishing data from Spacenav node to other topics

asked 2021-09-22 04:05:33 -0500

horvath.daniel gravatar image

Hello! I'm working on a small teleoperation program (currently only for the turtlesim and afterwards for an UR5e robot arm) using a Spacenav 3dconnexion joystick and I'm trying to figure out how to send the Twist data from the Spacenav node which publishes to any other topic (in short, how to make the spacenav node publish to other topics).

Is there a built-in feature which I can use to change the name of the topic where it publishes the twist messages?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-09-22 05:11:12 -0500

gvdhoorn gravatar image

updated 2021-09-22 05:12:17 -0500

That would be remapping.

See roslaunch/XML/remap for .launch files and Remapping Arguments for nodes and a more general description.

Finally, refer to #q303611 for additional discussion.

Edit: and whatever you do: do not edit source code to change topic names. That is almost always unneeded and very much an anti-pattern.

edit flag offensive delete link more


Thanks! This solution works perfectly! Although I have an unexpected problem: when connecting to a robot arm, the twist values which the spacenav joystick sends to the robot are too big for safe teleoperation (some values even exceed 0.3) and so the robot moves too quickly and the safety feature of the robot stops it. How do I manage to reduce the values sent and keep them between some desired intervals, for example: -0.06 to 0.06?

horvath.daniel gravatar image horvath.daniel  ( 2021-09-23 03:03:45 -0500 )edit

That seems like a different question, which you should post as a new one.

Edit: seems you did: #q387180.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-23 05:08:46 -0500 )edit

Question Tools

1 follower


Asked: 2021-09-22 04:05:33 -0500

Seen: 93 times

Last updated: Sep 22 '21