maxspahn / gym_envs_urdf

URDF environments for gym
https://maxspahn.github.io/gym_envs_urdf/
GNU General Public License v3.0
46 stars 14 forks source link

LiDAR sensor missing z-axis rotation of robot #102

Closed casparvv closed 2 years ago

casparvv commented 2 years ago

The LiDAR rays are calculated from the x, y position of the LiDAR sensor towards a point at ray_length distance and at the angles thetas. The resulting distance per ray is either the ray_length or a value lower if there is an object between the two points.

However, if the robot itself is rotated along the z-axis, this information is not considered in calculating the ray_end position. This means that the LiDAR rays will show the same values if the robot is rotating around the z-axis as if the sensor is only moving along the x- and y-axes and not rotating if the robot is.

Tested using the point robot LiDAR example.

casparvv commented 2 years ago

103 adds the rotation angle.

Testing with the same example again now shows the rays rotating with the robot.

casparvv commented 2 years ago

105 also adds the rotation angle, but it is branched from the develop branch instead of the master branch.