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

Add elements (obstacles, walls, etc.) in a URDF file

asked 2018-09-24 02:38:21 -0500

Elric gravatar image

I've just started to learn how to implement an URDF. To do it, I'm following the tutorials about URDF in ROS Wiki.

But, those tutorials only talk about how to define a robot, but If I want to add obstacles or walls to show them in Gazebo. How can I do it?

Maybe I can add those things inside the world definition.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-24 02:48:53 -0500

gvdhoorn gravatar image

You can use the exact same primitive geometry elements box, cylinder and sphereto define obstacles.

A flat box is a wall fi.

Then use a fixed joint to attach them to your world.

Although if you're going for Gazebo, then using SDF might be better.

Treat Gazebo as providing you "virtual hardware". Use RViz to visualise your robot's sensor data. Not the world directly.

edit flag offensive delete link more


Thanks. Do I have to put them inside the robot tag?

Elric gravatar image Elric  ( 2018-09-24 09:39:25 -0500 )edit


The robot tag is not special, it's just the root of the file.

You can model entire worlds "in" it.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-24 09:42:03 -0500 )edit

Question Tools

1 follower


Asked: 2018-09-24 02:38:21 -0500

Seen: 1,244 times

Last updated: Sep 24 '18