ros / joint_state_publisher

http://wiki.ros.org/joint_state_publisher
50 stars 81 forks source link

explanation of usage #35

Closed ixtiyoruz closed 4 years ago

ixtiyoruz commented 4 years ago

Hi, I am new in ros and wanted to use joint_state_publisher_gui in my learning project but i am not being able to install it? Can you explain how to use it, please? I installed it using this command: sudo apt-get install ros-kinetic-joint-state-publisher but when I launch the launch file:

<?xml version="1.0"?>
<launch>

    <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find my_robot_description)/urdf/robot.urdf'" />    

    <!-- send fake joint values -->
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
        <param name="use_gui" value="false" />
    </node>

    <!-- Combine joint values -->
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

    <!-- Show in Rviz   -->
    <node name="rviz" pkg="rviz" type="rviz"/>

</launch>

I am getting the error : ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: can't locate node [joint_state_publisher] in package [joint_state_publisher]

when I search for the libs I am getting these:

...~/catking_ws_kinetic$ ls /opt/ros/kinetic/lib | grep joint_state_publisher
joint_state_publisher
libgazebo_ros_joint_state_publisher.so
clalancette commented 4 years ago

joint_state_publisher is written in python, so you wouldn't find it in the lib subdirectory. It will live in the python subdirectory underneath that.

Regardless, you probably need to re-source your workspace after installing it so the correct paths get setup.

If that still doesn't work for you, please open a question at https://answers.ros.org so we can keep all questions like this in the same place. I'm going to close this out for now.