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

ROS2 - robot_description/RobotModel - cannot use URDF with meshes

asked 2020-11-23 07:34:46 -0500

MAB Jakub gravatar image

Hello everyone, I am struggling with preparing my URDF model for ROS2 foxy. I cannot make the RobotModel in Rviz2 to show me my robot based on the URDF.

I've generated my URDF using fusion2urdf plugin for Fusion360. The urdf seems to be correct, as I've successfully loaded it into pyBullet and all links and joints behave as expected there.

I've closely followed the Tutorial: changing joint state publisher, lauchfile and setup accordingly. As far as i can tell the state publisher is working fine, so is the TF. The problem is that the robot_description topic (coming from robot_state_publisher Node I suppose) does not seem to load my STL files correctly. In the Rviz I can see the TF being displayed correctly and the RobotModel shows me that the status is OK, and that all links have been parsed successfully. Sadly all the links seem to have no geometry set. Output from running the launchfile doesn't seem to give any errors.

[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : bare_metal.urdf
[INFO] [robot_state_publisher-1]: process started with pid [40791]
[INFO] [state_publisher-2]: process started with pid [40793]
[robot_state_publisher-1] [WARN] [1606134120.643718296] [robot_state_publisher]: No robot_description parameter, but command-line argument available.  Assuming argument is name of URDF file.  This backwards compatibility fallback will be removed in the future.
[robot_state_publisher-1] Parsing robot urdf xml string.
[robot_state_publisher-1] Link base_link had 4 children
[robot_state_publisher-1] Link A80_simplified_v2__1__1 had 1 children
[robot_state_publisher-1] Link l1_simplified_v1_1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__5__1 had 1 children
[robot_state_publisher-1] Link l2_simplified_v1__2__1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__10__1 had 1 children
[robot_state_publisher-1] Link l3_simplified_v1_1 had 0 children
[robot_state_publisher-1] Link A80_simplified_v2__7__1 had 1 children
[robot_state_publisher-1] Link l1_simplified_v1__1__1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__8__1 had 1 children
[robot_state_publisher-1] Link l2_simplified_v1_1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__2__1 had 1 children
[robot_state_publisher-1] Link l3_simplified_v1__1__1 had 0 children
[robot_state_publisher-1] Link A80_simplified_v2__11__1 had 1 children
[robot_state_publisher-1] Link l1_simplified_v1__2__1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__6__1 had 1 children
[robot_state_publisher-1] Link l2_simplified_v1__3__1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__3__1 had 1 children
[robot_state_publisher-1] Link l3_simplified_v1__3__1 had 0 children
[robot_state_publisher-1] Link A80_simplified_v2_1 had 1 children
[robot_state_publisher-1] Link l1_simplified_v1__3__1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__9__1 had 1 children
[robot_state_publisher-1] Link l2_simplified_v1__1__1 had 1 children
[robot_state_publisher-1] Link A80_simplified_v2__4__1 had 1 children
[robot_state_publisher-1] Link l3_simplified_v1__2__1 had 0 children
[robot_state_publisher-1] [INFO] [1606134120.647206332] [robot_state_publisher]: got segment A80_simplified_v2_1
[robot_state_publisher-1] [INFO] [1606134120.647240341] [robot_state_publisher]: got segment A80_simplified_v2__10__1
[robot_state_publisher-1] [INFO] [1606134120.647246804] [robot_state_publisher]: got segment A80_simplified_v2__11__1
[robot_state_publisher-1] [INFO] [1606134120.647251744] [robot_state_publisher]: got segment A80_simplified_v2__1__1
[robot_state_publisher-1] [INFO] [1606134120.647256588] [robot_state_publisher]: got segment A80_simplified_v2__2__1
[robot_state_publisher-1] [INFO] [1606134120.647261435] [robot_state_publisher]: got segment A80_simplified_v2__3__1
[robot_state_publisher-1] [INFO] [1606134120.647266215] [robot_state_publisher]: got segment A80_simplified_v2__4__1
[robot_state_publisher-1] [INFO] [1606134120.647271088] [robot_state_publisher]: got segment A80_simplified_v2__5__1
[robot_state_publisher-1] [INFO] [1606134120.647275785] [robot_state_publisher]: got segment A80_simplified_v2__6__1
[robot_state_publisher-1] [INFO] [1606134120.647280349] [robot_state_publisher]: got segment A80_simplified_v2__7__1
[robot_state_publisher-1] [INFO] [1606134120.647284976] [robot_state_publisher]: got segment A80_simplified_v2__8__1
[robot_state_publisher-1] [INFO] [1606134120.647289499] [robot_state_publisher]: got segment A80_simplified_v2__9__1
[robot_state_publisher-1] [INFO] [1606134120.647294103] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1606134120.647298990] [robot_state_publisher]: got segment bbase_link
[robot_state_publisher-1] [INFO] [1606134120.647303700] [robot_state_publisher ...
edit retag flag offensive close merge delete


I've tried with different prefixes ( package://, [..]

What URI did you use with package://?

gvdhoorn gravatar image gvdhoorn  ( 2020-11-23 10:11:00 -0500 )edit

I've tried


as well as providing full path in there

MAB Jakub gravatar image MAB Jakub  ( 2020-11-24 01:29:17 -0500 )edit

I've just realised that RViz gave me and error message:

ERROR] [1606314150.195215419] [rviz2]: could not load model 'package://meshes/l3_simplified_v1__3__1.stl' for link 'l3_simplified_v1__3__1': FileNotFoundException: Cannot locate resource package://meshes/l3_simplified_v1__3__1.stl in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
MAB Jakub gravatar image MAB Jakub  ( 2020-11-25 08:23:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-11-22 06:40:00 -0500

MAB Jakub gravatar image

Well it's been some time, but the problem was that i wasn't sourcing the terminal which I've run my Rviz2 in. Rookie mistake.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2020-11-23 07:34:46 -0500

Seen: 1,728 times

Last updated: Nov 22 '21