0
$\begingroup$

Rosanswers logo

Hello,

I'm new in ROS and have a problem making the joint_state_publisher publish JointState messages on a topic different from /joint_states. I wanted to publish arbitrary joint states from the terminal window and therefore I intended to use the source list parameter in my launch file as proposed here in the joint_state_publisher Package Summary.

But I cannot make it work by adding the parameter to my .launch file. I tried something like

\param name="source_list" value="joint_states_test" type="str"/>

What do I have to do in order to make it work?

Thanks,

Mike


Originally posted by Mike_321 on ROS Answers with karma: 1 on 2013-04-17

Post score: 2


Original comments

Comment by E1000ii on 2013-09-20:
I have the same problem. But i think quest must be edited to change the beggining of the question in order to make clear. what is intended is to use the imput option for joint_state_publiser to take messages from an arbitrari topic and republish them in /joint_states. Title is not veri descriptive

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Now is an old thread. But i answer anyway for the next noob like that could end up here.

To pass list parameters to a nodes you should use the tag 'rosparam' instead of 'param'. You could see how to use it here.

On my launch file the joint_state_publisher looks like that:

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <rosparam param="source_list">["my_controller/robot/joint_states"]</rosparam>
</node>

It worked and I'm now visualizing on rviz my real robol state. Note that you could put whatever you want instead of my_controller/robot/joint_states.


Originally posted by E1000ii with karma: 178 on 2013-09-20

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by VictorLamoine on 2016-12-19:
And if you want to test this, try something like:

rostopic pub my_controller/robot/joint_states sensor_msgs/JointState '{header: {seq: 0, stamp: {secs: 0, nsecs: 0}, frame_id: ""}, name: ["the_urdf_joint_name"], position: [1.0], velocity: [0.0], effort: [0.0]}' --once

Comment by marawy_alsakaf on 2017-11-13:
from where you get joint state for a real robot?

$\endgroup$

Your Answer

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