# Distance measure in gazebo?

Could anyone tell me 1 coordinate unit = ? meter? My heightmap image's size is 65*65. If i set in sdf file: heightmap's size is (x,y,z) = 65 * 65 * 2, then i see my terrain x coordinate will range from -32 to + 32.

If i set in sdf file: heightmap's size is (x,y,z) = 131 * 131 * 2, then i see my terrain x coordinate will range from -65 to + 65.

But in the above two cases, the following relationship between delta_X and traveled distance still hold: Traveled distance = 5 * delta-X (My car runs along x axis and i use the following function time by time to get delta-X within time of delta-t:

math::Pose orig_pose = this->model->GetWorldPose().pos.x ) So does this make sense? and are there any other better method to measure traveled distance?

Thanks

edit retag close merge delete

Sort by ยป oldest newest most voted

All length measurements in Gazebo are in meters. So your heightmap sizes are 65x65 m and 131x131 m respectively.

When you get your model's world pose, that is also expressed in meters, in the world frame. So if the model's x position is 0 m and after 10 seconds it is 10 m, the displacement in the x-axis is 10 m.

I'm not sure why you are multiplying by 5 in your expression.

more