Robotics StackExchange | Archived questions

Remapping of arguments for turtlebot

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!

Asked by MikeStrike on 2013-10-03 01:39:42 UTC

Comments

Answers

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.

Asked by dornhege on 2013-10-03 01:57:25 UTC

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?

Asked by MikeStrike on 2013-10-03 23:26:32 UTC

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.

Asked by dornhege on 2013-10-04 00:50:43 UTC