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

URDF model not visible in RViz

asked 2019-02-09 03:54:44 -0500

cluue gravatar image

updated 2019-02-11 01:45:30 -0500

Hello ROS-Community,

I am currently trying to write my own URDF for my own drone. To check if I do right, i want to make my progress visible in RViz from time to time. The bad thing is, that every time I do launch RViz, nothing appears in it.

This is my URDF File, placed in a package with dependencies rospy, urdf, roscpp.

<?xml version="1.0"?>
<robot name="base" xmlns:xacro="http://ros.org/wiki/xacro">

    <property name="base_size_x" value="0.50"/>
    <property name="base_size_y" value="0.50"/>
    <property name="base_size_z" value="0.04"/>

    <link name="base_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <box size="${base_size_x} ${base_size_y} ${base_size_z}" />
            </geometry>
        </visual>
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <box size="${base_size_x} ${base_size_y} ${base_size_z}" />
            </geometry>
        </collision>
    </link>
</robot>

this is my launch File:

<launch>
    <!-- Load URDF/XACRO of the drone model -->
    <arg name="urdf_file" default="$(find xacro)/xacro.py '$(find drone_description)/urdf/drone.xacro' " />

    <param name="robot_description" command="$(arg urdf_file)" />

    <!-- Publish the robot state -->
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
        <param name="publish_frequency" value="20.0"/>
    </node>

    <!-- Provide simulated control of the robot joint angles -->
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
        <param name="use_gui" value="True" />
        <param name="rate" value="20.0" />
    </node>

    <node name="rviz" pkg="rviz" type="rviz" args="-d find drone_description/rviz/urdf.rviz"/>
</launch>

RViz opens up, but I cant see anything in there. I run Ubuntu 16.04 and ROS Kinetic. When I open RViz it says NO TF Data, but even if i change that with publishing tf data to RViz it doesnt display my model.

Thanks alot for any help!

Edit: This are exactly the commands I am running:

thorsten@ThorstensPC:~$ cd workspace
thorsten@ThorstensPC:~/workspace$ source ./devel/setup.bash
thorsten@ThorstensPC:~/workspace$ cd src
thorsten@ThorstensPC:~/workspace/src$ cd drone_description/
thorsten@ThorstensPC:~/workspace/src/drone_description$ roslaunch drone_description drone.launch

And this is my RViz, after I added a RobotModel as mentioned below:

image description

edit retag flag offensive close merge delete

Comments

You're probably running into something similar to #q272692. For now that still requires a work-around, until the fixes applied to the affected packages have been propagated upstream (they're in Ubuntu/Debian).

gvdhoorn gravatar image gvdhoorn  ( 2019-02-09 11:08:22 -0500 )edit

No that is sadly not fixing the issue. Even when I do what you mentioned there, it doesnt work. I dont see anything in RViz @gvdhoorn

cluue gravatar image cluue  ( 2019-02-10 02:09:37 -0500 )edit
2

Please be more specific: what exactly did you do? Which commands are you running? What does "even if I change that with publishing TF data to RViz" mean?

And since you have sufficient karma for it: show a screenshot of RViz. This is one of the few times where a screenshot makes sense.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-10 14:01:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-11 01:12:24 -0500

SleepyTurtle gravatar image

updated 2019-02-11 01:13:19 -0500

Just in case, do you have a RobotModel display active in RViz?

edit flag offensive delete link more

Comments

1

That fixed the problem for now. Thanks alot!

cluue gravatar image cluue  ( 2019-02-11 01:45:53 -0500 )edit

Must admit I'd expected that the RViz configuration was already correct. Teaches me to make assumptions I guess.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-11 02:39:57 -0500 )edit

@cluue: please accept the answer by @SleepyTurtle by clicking on the checkmark to the left of the answer if you feel that answers your question.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-11 02:40:28 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-02-09 03:54:44 -0500

Seen: 1,648 times

Last updated: Feb 11 '19