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

spacenav_node tutorial help [closed]

asked 2011-06-01 15:20:03 -0500

jayson ding gravatar image

updated 2011-08-22 10:02:54 -0500

mjcarroll gravatar image

Dear all

I tried to go through spacenav_node two basic tutorials. I was able to echo the 6DOF joystick on topic /spacenav/joy. The reading from the joystick is correct. However when I run the turtle sim, the turtle did not move at all. After double print out the rxgraph, I found turtle_teleop node is subscripting topic /joy[unknown type]. I guess it might be the bug.

So I tried to changed file .../spacenav_node/src/spacenav_node.cpp, make it published /joy topic instead.

ros::Publisher joy_pub = node_handle.advertise<joy::joy>("/joy", 2);

It does not help. node spacenav_node still publish /spacenav/joy. I am new to ROS. I guess there is some easy and right way to do this. Any hint or suggestion will be appreciated. thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Wim
close date 2011-08-02 11:27:09

2 Answers

Sort by ยป oldest newest most voted
0

answered 2011-06-01 23:29:59 -0500

dornhege gravatar image

Do not change the code. Use remapping instead.

e.g. start turtle_teleop with joy:=spacenav_joy.

You should read the documentation about topics and remapping to understand what's going on.

edit flag offensive delete link more
0

answered 2011-06-02 01:33:22 -0500

jayson ding gravatar image

Hi Dornhege thanks you very much for your reply. Just fixed the bug. The remapping in launch/turtle_spacenav is not correct. It was: <remap from="" "turtle_spacenav="" joy"="" to="" "joy"=""> I changed it back to <remap from="" "spacenav="" joy"="" to="" "joy"=""> Now it works. I am quite happy. It is a bug in the tutorial. Someone should fix it. thanks a lot.

edit flag offensive delete link more

Comments

i'll fix the tutorial thanks- i created a ticket here: https://code.ros.org/trac/ros-pkg/ticket/5001
mmwise gravatar image mmwise  ( 2011-06-09 09:53:46 -0500 )edit

Question Tools

Stats

Asked: 2011-06-01 15:20:03 -0500

Seen: 306 times

Last updated: Jun 02 '11