ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

Comments

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
0

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

Comments

Hi, can you more certain tell me how you was realizing joint_state_publisher ? and what does it mean There's no need to use joint_state_publisher. ?

dvogureckiy99 gravatar image dvogureckiy99  ( 2023-04-06 15:18:22 -0500 )edit

Good evening, First of all, i would like to apoligize for my late response but i need to be a bit out of the grid since I was very busy.

I mean that the /joint_state_publisher is a ROS node to simulate the behavior of the joints and publish the state into /joint_state topic. Since, the solution I've developed create its own virtual driver of the gripper. There is no need to introduce the gripper joint as a part of the ROS control node. Indeed, a more accurate implementation of the system would have relied in ROS Control to publish more intuitively the state of the gripper joint. It was one of my first real ROS implementations, and I still have to improve my skills.

If the answer is not clear enough, please feel free to ask for any clarification :) I will answer quicker this time

drodgu gravatar image drodgu  ( 2023-05-23 07:55:59 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 1,020 times

Last updated: Jul 05 '19