URDF model not visible in RViz
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:
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).
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
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.