How does the information from a urdf-file get to the code in cpp-file?
Hi,
I'm trying to understand how ros and gazebo work. I'm having a hard time with understanding how the information I specified in the urdf-file is used.
It seems that in urdf2gazebo.cpp the information is written to an object of type GazeboExtension. What I don't understand is what happens next. Like for example I set <laserRetro>0.9</laserRetro>
in the urdf file and later the value appears in RayShape.cpp void SetRetro(float retro). But what are the steps in between? What is the file that actually calculates when a ray hits a surface?
I would be very thankful for any help I can get.
Cheers
Asked by annah.do on 2013-10-09 08:04:46 UTC
Answers
A URDF file is converted to SDF using the sdformat
package. This SDF file is passed to Gazebo, which reads the values and creates the appropriate models. In your case laser retro values are in the SDF file and associated with collision objects in simulation.
Later, when simulation is running a laser beam can intersect an object. When this happens the beam reads the collision object's retro value.
If you're using the ODE physics engine, which is likely, then ODE calculates the intersection between a ray and a collision shape. You can look in the collision detection library inside ODE to find the code that determines object collisions.
Asked by nkoenig on 2013-10-10 10:42:43 UTC
Comments
Since I'm using gazebo 1.0.2 with ros there is no sdformat package. Any Idea where I could find the equivalent in my gazebo version?
Asked by annah.do on 2013-10-11 07:07:56 UTC
Comments