Home | Tutorials | Wiki | Issues
Ask Your Question

How to create a curved road using <road> tag from SDF version 1.6 in Gazebo?

asked 2018-06-15 15:20:26 -0500

rahul gravatar image

This question and its answer provides a way to create a straight road in gazebo:


How should I modify this to create a curved road in Gazebo?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-15 16:03:33 -0500

You can make it out of several small segments, for example:

 <road name="my_road">
   <point>0 0 0</point>
   <point>5 2 0</point>
   <point>8 5 0</point>
   <point>10 10 0</point>

image description

edit flag offensive delete link more


Alright, thank you very much. Now I understood. Is there any way to define curvature to give a smooth curve?

rahul gravatar imagerahul ( 2018-06-15 16:06:15 -0500 )edit

I don't think so, you can try to increase the resolution by placing more points close to each other.

chapulina gravatar imagechapulina ( 2018-06-15 16:12:27 -0500 )edit

Okay, thank you very much. I will write code in MATLAB to generate a set of points defining a curvature and use them in SDF file.

rahul gravatar imagerahul ( 2018-06-15 16:14:07 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-15 15:20:26 -0500

Seen: 67 times

Last updated: Jun 15