Ask Your Question
1

joint state publisher and robot state publisher

asked 2017-11-06 04:46:49 -0500

marawy_alsakaf gravatar image

updated 2017-11-06 11:05:23 -0500

Hello,


what is the difference between JointState publisher and robotstate Publisher? i understand that i get robot state publisher from the URDF but the joint state ?? if i want real data not fake?


thanks in advance

edit retag flag offensive close merge delete

Comments

What do you mean

if i want real data not fake

?

jayess gravatar imagejayess ( 2017-11-06 12:43:46 -0500 )edit

i mean if i want joint state from real robot not for simulation

marawy_alsakaf gravatar imagemarawy_alsakaf ( 2017-11-06 13:00:51 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
8

answered 2017-11-06 12:48:31 -0500

jayess gravatar image

updated 2017-11-06 13:57:55 -0500

From the robot_state_publisher wiki:

robot_state_publisher uses the URDF specified by the parameter robot_description and the joint positions from the topic joint_states to calculate the forward kinematics of the robot and publish the results via tf.

From the joint_state_publisher wiki:

This package publishes sensor_msgs/JointState messages for a robot. The package reads the robot_description parameter, finds all of the non-fixed joints and publishes a JointState message with all those joints defined.

Can be used in conjunction with the robot_state_publisher node to also publish transforms for all joint states.

Basically, the robot_state_publisher publishes the tf transforms of your robot based on its URDF file. You can also publish the joint states using the joint_state_publisher or do it yourself. Either way, the robot_state_publisher uses this information to calculate the forward kinematics of your robot.


Update:

If you want to publish your own sensor_msgs/JointState messages then take a look at this tutorial.

edit flag offensive delete link more

Comments

ok so i should now publish my jointstate (as in the tutorial) but for robot state i did not need to write any node, i called the robot state publisher in my launch file with URDF and it worked am i right ?

marawy_alsakaf gravatar imagemarawy_alsakaf ( 2017-11-06 14:06:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2017-11-06 04:46:49 -0500

Seen: 5,682 times

Last updated: Nov 06 '17