Ask Your Question

Usage of joint_state_publisher

asked 2019-07-04 10:16:45 -0500

drodgu gravatar image

updated 2019-07-04 15:28:44 -0500

jayess gravatar image

Hi everyone,

I am working with a new UR10e robot and a 2F-140 Robotiq Gripper. And the new models of UR robot comes with a set of script functions to control the gripper. The thing is that working this way to command the gripper, you have no information publish by /ur_driver into the robot_state_publisher topic. So I created a node in order to publish the finger_joint value into the robot_state. I know that i have to use joint_state_publisher to achieve this task but I do not know how I have to write the code into the launch file just to publish finger_joint state. I'm launching joint_state_publisher in the following way:

<node name="joint_state_publisher" type="joint_state_publisher" pkg="joint_state_publisher" output="screen"/>

And ROS publishes all the joint states defined in my MoveIt *.srdf config.

Thanks in advance for your help.

edit retag flag offensive close merge delete


So I created a node in order to publish the finger_joint

If this is the case then you just need to run this node. The joint_state_publisher node is only a demo node to publish mock joint states while you're setting up a robot, it doesn't produce the actual joint states of real hardware

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-04 12:14:39 -0500 )edit

The joint_state_publisher node is only a demo node to publish mock joint states

That's not entirely true: #q303358.

gvdhoorn gravatar image gvdhoorn  ( 2019-07-04 12:18:30 -0500 )edit

The thing is that when I run this node, it causes a conflict between the ur10e real joint states and the fake ones. What I want to do is use joint_state_publisher to publish only the gripper joint's states because the /ur_drive doesn't do it. So I write a node in order to get how much the gripper is open and I transform that into joint values. So what I need to do is to publish that joint values into /joint_states topic. This way the /robot_state_publisherwill publish the joint state of the gripper. When I try to publish directly with the node I've writed It dumped the core. I read that to do this you have to use joint_state_publisher in order to tell ROS in a fake way your joint state. But I only need to publish one of the joint states, not all the joint states ...(more)

drodgu gravatar image drodgu  ( 2019-07-04 12:30:36 -0500 )edit

I stand corrected.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-04 16:03:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-05 09:20:36 -0500

drodgu gravatar image

updated 2019-07-05 09:22:05 -0500

There's no need to use joint_state_publisher. It is enough with generating a publisher node into joint_statestopic. I should make some mistake in the first tries that doesn't link the publisher with this topic. Following this ros tutorial you can easily achieve this.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2019-07-04 10:16:45 -0500

Seen: 637 times

Last updated: Jul 05 '19