Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreal Lidar incorrectly casting traces #2142

Closed
WouterJansen opened this issue Aug 19, 2019 · 1 comment
Closed

Unreal Lidar incorrectly casting traces #2142

WouterJansen opened this issue Aug 19, 2019 · 1 comment

Comments

@WouterJansen
Copy link
Contributor

Steps to reproduce bug:

  • Create a lidar sensor with an offset location from the vehicle origin
  • Turn on DrawDebugPoints for observing more easily the problem
  • Drive/fly the car/drone and make sure to rotate
  • Observe the incorrect lidar pointcloud being made

Reason:
UnrealLidarSensor::shootLaser() in UnrealLidarSensor.cpp creates the starting location of the trace as
Vector3r start = lidar_pose.position + vehicle_pose.position; (currently line 113)

If the lidar does not share the vehicle origin's X and Y position, this will start introducing an incorrect starting position for the trace as the vehicle starts rotating as the rotation of vehicle/lidar is completely ignored.

Fix:
To fix one can change this line to
Vector3r start = VectorMath::add(lidar_pose, vehicle_pose).position;

@ironclownfish
Copy link
Contributor

Thanks, PR approved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants