rviz urdf joint state publisher issue

asked 2017-09-21 17:51:36 -0500

updated 2017-09-21 18:05:50 -0500

jayess gravatar image

I am making my first actual urdf beyond just using the ones from tutorials. there may be a few problems I am having. One is that rviz runs my code and the wheel seems oriented properly but not in the place I specify the joint. the other issue I describe at the end.. my code so far:

<?xml version="1.0"?>
<robot name="chatbot">

  <material name="blue">
    <color rgba="0 0 0.8 1"/>
  </material>

  <material name="white">
    <color rgba="1 1 1 1"/>
  </material>

    <link name="base">
        <visual>
            <geometry>
                <box size="0.602742 0.427288 0.066548"/>
            </geometry>
        </visual>
    </link>

    <link name="wheelrf">
        <visual>
            <geometry>
                <cylinder length="0.0762" radius="0.1016"/>
            </geometry>
            <origin rpy="1.57075 0 0" xyz="0 0 0"/>
            <material name="blue"/>
        </visual>
    </link>

    <link name="wheelrb">
        <visual>
            <geometry>
                <cylinder length="0.0762" radius="0.1016"/>
            </geometry>
        </visual>
    </link>

    <link name="wheellf">
        <visual>
            <geometry>
                <cylinder length="0.0762" radius="0.1016"/>
            </geometry>
        </visual>
    </link>

    <link name="wheellb">
        <visual>
            <geometry>
                <cylinder length="0.0762" radius="0.1016"/>
            </geometry>
        </visual>
    </link>

    <joint name="joint1" type="continuous">
        <parent link="base"/>
        <child link="wheelrf"/>
        <origin xyz="0.259715 0.2286 0"/>
    </joint>

    <joint name="joint2" type="continuous">
    <parent link="base"/>
    <child link="wheelrb"/>
  </joint>

  <joint name="joint3" type="continuous">
    <parent link="base"/>
    <child link="wheellf"/>
  </joint>

  <joint name="joint4" type="continuous">
    <parent link="base"/>
    <child link="wheellb"/>
  </joint>
</robot>

I've gotten the wheelrf link oriented in the right direction but it is still in the center of the base link despite my specification of the joint origin and everything.

The other problem, which may or may not be connected is that fact that within rviz it says 'Global Status Error: Fixed Frame [base_link] does not exist ' in the displays area. I've run roswtf and it seems to be an issue with the joint state publisher and here is the error:

Found 2 error(s).

ERROR Could not contact the following nodes:
 * /joint_state_publisher

ERROR Errors connecting to the following services:
 * service [/joint_state_publisher/get_loggers] appears to be malfunctioning: Unable to communicate with service [/joint_state_publisher/get_loggers], address [rosrpc://huxley:45375]
 * service [/joint_state_publisher/set_logger_level] appears to be malfunctioning: Unable to communicate with service [/joint_state_publisher/set_logger_level], address [rosrpc://huxley:45375]
edit retag flag offensive close merge delete

Comments

Are you running the joint_state_publisher node?

jayess gravatar imagejayess ( 2017-09-21 18:06:26 -0500 )edit

@jayess I believe it starts up when I roslaunch urdf_tutorial display.launch model:=chatbot.urdf

moonspacedancer gravatar imagemoonspacedancer ( 2017-09-21 19:06:10 -0500 )edit

How are you running everything? Can you post what commands you're running or better yet a launch file (if you're using one)?

jayess gravatar imagejayess ( 2017-09-21 19:33:56 -0500 )edit