0
$\begingroup$

Rosanswers logo

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.


Originally posted by drodgu on ROS Answers with karma: 59 on 2019-07-04

Post score: 0


Original comments

Comment by PeteBlackerThe3rd on 2019-07-04:\

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

Comment by gvdhoorn on 2019-07-04:\

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

That's not entirely true: #q303358.

Comment by drodgu on 2019-07-04:
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 I've configured with MoveIt Settup Assistant to run properly the /move_group node

Comment by PeteBlackerThe3rd on 2019-07-04:
I stand corrected.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by drodgu with karma: 59 on 2019-07-05

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by dvogureckiy99 on 2023-04-06:
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. ?

Comment by drodgu on 2023-05-23:
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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.