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

Remapping of arguments for turtlebot

asked 2013-10-03 01:39:42 -0500

MikeStrike gravatar image

updated 2014-01-28 17:18:07 -0500

ngrennan gravatar image

Hello,

I am building a turtlebot and have designed an URDF Model for that. The robot has a pan and tilt unit to move a camera which can be keyboard controlled with a script. After starting the script I remapped the /joint_states message to /ptu/status (puplished by script), in order to get an visualization of the camera movement in Rviz.

The joint_states message looks the following:

header: 
  seq: 279
  stamp: 
    secs: 1380799404
    nsecs: 76824903
  frame_id: ''
name: ['tilt', 'wheel_left', 'wheel_right', 'pan']
position: [0.0, 0.0, 0.0, 0.0]
velocity: []
effort: []

ptu/status looks like:

header: 
  seq: 11425
  stamp: 
    secs: 1380799470
    nsecs: 45985937
  frame_id: ''
name: ['pan', 'tilt']
position: [0.0, 0.1564660403643354]
velocity: [0.0, 0.0]
effort: []

The problem is that after the mapping I lose the message for wheel_left/right. How can I fix this problem?

Thanks for helping!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-10-03 01:57:25 -0500

dornhege gravatar image

Not sure, why you need to map to /ptu/status for rviz. Usually you map all JointState messages to the incoming topic for the robot_state_publisher and then everything is joined by that.

edit flag offensive delete link more

Comments

ok thanks, now it (partly) works. The problem now is that 2 messages are published on joint_states where 1 is the zero position and the other one is the actually desired position. Now robot_state_publisher is jumping between this two states. How can I merge the two topics?

MikeStrike gravatar image MikeStrike  ( 2013-10-03 23:26:32 -0500 )edit

The message that should go to the robot_state_publisher is the message that contains the current position of the robot joints and only that.

dornhege gravatar image dornhege  ( 2013-10-04 00:50:43 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-03 01:39:42 -0500

Seen: 269 times

Last updated: Oct 03 '13