Ask Your Question
2

joint state publisher and robot state publisher

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

marawy_alsakaf gravatar image

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

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 image jayess  ( 2017-11-06 12:43:46 -0600 )edit

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

marawy_alsakaf gravatar image marawy_alsakaf  ( 2017-11-06 13:00:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
13

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

jayess gravatar image

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

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 image marawy_alsakaf  ( 2017-11-06 14:06:34 -0600 )edit

I have used both the joint_state_publisher and robot_state_publisher in my demo_gazebo.launch file shown here...

I am publishing to joint_states from multiple sources, but I am unsure of how to rectify the situation. The current Gazebo output can be seen here.

With my rostopic info joint_states:

homefolder@ubuntu:~$ rostopic info joint_states
Type: sensor_msgs/JointState

Publishers: 
 * /joint_state_publisher (http://ubuntu:41201/)
 * /gazebo (http://ubuntu:34151/)

Subscribers: 
 * /move_group (http://ubuntu:39291/)
 * /joint_state_publisher (http://ubuntu:41201/)

I am really lost on what I am doing wrong.

matthewmarkey gravatar image matthewmarkey  ( 2020-05-21 04:59:12 -0600 )edit

@matthewmarkey you should ask a new question. Comments aren't the place to ask a new question

jayess gravatar image jayess  ( 2020-05-21 14:05:53 -0600 )edit
1

Ok, I have done this. Do you have a minute to give some advice? @jayess

352941

matthewmarkey gravatar image matthewmarkey  ( 2020-05-21 14:19:06 -0600 )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 -0600

Seen: 11,354 times

Last updated: Nov 06 '17