astuff / ibeo_lux

ROS Driver for Ibeo LUX and LUX Fusion Sensors
MIT License
12 stars 8 forks source link

the relative distance between the object and host vehicle #14

Closed melodynk closed 5 years ago

melodynk commented 5 years ago

I would like to know the detected objects' relative x position(meters) and y position(meters) related to the host vehicle.I wonder which message and information represent such two values.Thanks so much!

JWhitleyWork commented 5 years ago

This depends on your configuration.

If you're using a single LUX sensor, the measurements are relative to the origin of the sensor (center of the front of the sensor). In this case, you can publish a static transform (using static_transform_publisher, for example) from the frame of the sensor to the frame of your vehicle (usually base_link). Then, if you apply that transform to the X and Y positions of the detected objects, you'll get the relative offset to the vehicle's origin.

If you're using a fusion system, you can connect to the Fusion box using Ibeo's software and set the location of each Lux relative to the vehicle's origin. The scans will then come out relative to the vehicle.