Unable to publish robot states using joint state publisher GUI.
Hey. I am trying to publish states via joint_state_publisher
gui, but getting a strange output shown below:
As you can clearly see in the above gif file, when I am changing the robot joint values via joint_state_publisher
gui, the robot is performing the motion but then disappears. It's motion is kind of fluctuating.
rqt_graph: (Link: https://imgur.com/Fjw8yhM, in case below image is not clearly visible)
After doing some research online, I found that it has something to so with /joint_states
(in my case /ow5/joint_states
) topic.
Output of rostopic info /ow5/joint_states
:
Type: sensor_msgs/JointState
Publishers:
* /ow5/joint_state_publisher (http://G3-572:34487/)
* /gazebo (http://G3-572:40115/)
Subscribers:
* /ow5/robot_state_publisher (http://G3-572:39965/)
* /link_ros (http://G3-572:36771/)
* /move_group (http://G3-572:43207/)
I would really appreciate someone's advice/help on this. Thanks in advance!!
Asked by Anubhav Singh on 2020-05-14 05:57:36 UTC
Comments
Are you sure you are running ROS Kinetic? What is the version of your OS?
Additionally (but unrelated): the
joint_state_publisher
is not for controlling robots. It's for publishing fakeJointState
messages. As the name implies, it publishes state, it is not meant to control.Asked by gvdhoorn on 2020-05-14 07:27:09 UTC
Thanks for replying. Yeah, I am running ROS kinetic and ubuntu 16.04.
Asked by Anubhav Singh on 2020-05-14 07:35:47 UTC
As you can see in your screenshot and in the output of
rostopic info
, you have multiple publishers to/ow5/joint_states
. That is probably going to conflict.I believe this relates to my earlier comment, where I wrote the JointStatePublisher is not for controlling a robot. By including the JSP in your node graph you're essentially publishing fake (and conflicting)
JointState
messages, which are both consumed by therobot_state_publisher
(and RViz).There is a chance this is the cause of your problem.
Asked by gvdhoorn on 2020-05-14 07:40:44 UTC
This makes sense. Thank you so much.
Asked by Anubhav Singh on 2020-05-14 08:01:57 UTC
So if I am interpreting this correctly, when running a gazebo simulation, should the robot_state_publisher be removed?
Asked by matthewmarkey on 2020-05-21 04:43:31 UTC
No, that's incorrect.
Asked by gvdhoorn on 2020-05-22 05:18:07 UTC
I am currently having the same problem. How did you fix it?
Asked by Aish on 2021-04-30 06:57:56 UTC
@Aish please read second comment (by gvdhoorn) properly. In my case,
/gazebo
and/ow5/joint_state_publisher
both are publishing to/ow5/joint_states
topic. That's the reason why the robotic arm's state is resetting (not the best word to use) to its current state again and again.Asked by Anubhav Singh on 2021-05-02 06:43:17 UTC