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

rviz - only base_link works

asked 2019-03-04 13:38:29 -0500

Pawel_www gravatar image

updated 2022-06-12 19:34:57 -0500

lucasw gravatar image

Hello Everyone! At first, sorry for my English :( I`ve got a problem. I'm beginner at ROS (melody, ubuntu 18.04). I learing how to do a URDF file, i'm using this tutorial: https://www.youtube.com/watch?v=Ale55... .

When i start rviz a only see a base_link (without link_01), I try to change URDF file but it doesn`t helped. this is my xacro file:

<?xml version="1.0" ?>

<robot name="mrm" xmlns:xacro="http://www.ros.org/wiki/xacro">
    <link name="base_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0" />
      <geometry>
        <box size="1 1 1" />
      </geometry>
    </visual>
    </link>

      <joint name="base_link__link_01" type="revolute">
    <axis xyz="0 0 1"/>
    <limit effort="1000.0" lower="-3.14" upper="3.14" velocity="0.5"/>
    <origin rpy="0 0 0" xyz="0 0 0.5"/>
    <parent link="base_link"/>
    <child link="link_01"/>
      </joint>

    <link name="link_01">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.2" />
      <geometry>
        <cylinder radius="0.35" length="0.4" />
      </geometry>
    </visual>
    </link>
</robot>

and launch file:

<launch>
    <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find mrm_description)/urdf/mrm.xacro'"/>
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>
    <node name="rviz" pkg="rviz" type="rviz"/>

    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
        <param name="use_gui" value="True"/>
    </node>
</launch>

i would be very grateful for Your help! Pawel :)

edit retag flag offensive close merge delete

Comments

I've copied your setup and it works fine for me. Maybe you're not setting up rviz correctly? What do you mean by "only see a base_link (without link_01)"?

SleepyTurtle gravatar image SleepyTurtle  ( 2019-03-05 01:14:24 -0500 )edit

Hey! Thank You for Your answer! i change the value of radius(more than one), and value of length(also more than one) and it`s works(i see base_link and link_01)! but when i change this value (radius and length<1), the cylinder(link_01) disappears :(

Pawel_www gravatar image Pawel_www  ( 2019-03-05 12:10:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-05 12:22:13 -0500

gvdhoorn gravatar image

updated 2019-03-05 12:34:49 -0500

This is most likely a locale problem. If you've not configured your machine to use en_US.UTF-8, the urdf parser will try to use commas (,) for floating point nrs, and you're using dots (.).

See #q272692 for an older duplicate.

Note: just to clarify: this is an issue with urdfdom. The solution is not to override locale everywhere, that would be just a work-around.

See the linked duplicate for more information.

edit flag offensive delete link more

Comments

Thank You a lot!

Pawel_www gravatar image Pawel_www  ( 2019-03-06 14:19:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-04 13:38:29 -0500

Seen: 523 times

Last updated: Mar 05 '19