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

Pointcloud message type incompatibility with Autoware #313

Closed
Aysenayilmaz opened this issue Jul 11, 2024 · 8 comments
Closed

Pointcloud message type incompatibility with Autoware #313

Aysenayilmaz opened this issue Jul 11, 2024 · 8 comments

Comments

@Aysenayilmaz
Copy link

Aysenayilmaz commented Jul 11, 2024

With autowarefoundation/autoware.universe#6996, the pointcloud types have been changed. They have transitioned from using PointXYZI to PointXYZIRCAEDT.

- X: x   
- Y: y
- z: z
- I: intensity
- R: ring
- A :azimuth
- D: distance
- T: time_stamp

As a result, pointcloud types are no longer supported by the RobotecGPULidar.

Current point types:

- 'x'  FLOAT32
- 'y' FLOAT32
- 'z'  FLOAT32
- 'intensity'  FLOAT32
- 'ring' UINT16
- 'azimuth'  FLOAT32
- 'distance' FLOAT32
- 'return_type' UINT8
- 'time_stamp' FLOAT64

Data types used in Autoware:

https://github.com/autowarefoundation/autoware.universe/blob/9f41bf13d9e8a73d2bfd6278cc249e2306348c1e/common/autoware_point_types/include/autoware_point_types/types.hpp#L95

- x,y,z  float   	 
- intensity  uint8_t   	 
- return_type  uint8_t   	 
- channel  uint16_t    
- azimuth  float   	 
- elvation   float   	 
- distance  float   	 
- time_stamp   uint32_t 

That's why there is a autowarefoundation/AWSIM-Labs#114 problem in AWsim Labs.
The error I get when I run Autoware and AWsim Labs:
[component_container-30] [ERROR] [1720621336.877892482] [sensing.lidar.top.crop_box_filter_self]: The pointcloud layout is not compatible with PointXYZIRCAEDT/PointXYZIRC. Aborting

@prybicki
Copy link
Collaborator

@Aysenayilmaz This is not an RGL issue. Pointcloud format in RGL is configurable in runtime using rgl_node_points_format. Therefore I'd recommend to have a look at the code that's using RGL, most likely here.

@prybicki prybicki closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@msz-rai msz-rai reopened this Jul 12, 2024
@msz-rai
Copy link
Collaborator

msz-rai commented Jul 12, 2024

@Aysenayilmaz

We initially underestimated the issue, failing to recognize that the field types had also changed. This necessitates the implementation of data type conversions in the native library. We are addressing this and will implement the necessary changes as soon as possible.

@Aysenayilmaz
Copy link
Author

@prybicki I have reviewed these files, but unfortunately, I cannot modify the content of the message. The GPULidar library is used in the Lidar publisher. I am sharing the content of the message published on the /sensing/lidar/top/pointcloud_raw_ex topic:

$ ros2 topic echo /sensing/lidar/top/pointcloud_raw_ex --field fields

[sensor_msgs.msg.PointField(name='x', offset=0, datatype=7, count=1), sensor_msgs.msg.PointField(name='y', offset=4, datatype=7, count=1), sensor_msgs.msg.PointField(name='z', offset=8, datatype=7, count=1), sensor_msgs.msg.PointField(name='intensity', offset=16, datatype=7, count=1), sensor_msgs.msg.PointField(name='ring', offset=20, datatype=4, count=1), sensor_msgs.msg.PointField(name='azimuth', offset=24, datatype=7, count=1), sensor_msgs.msg.PointField(name='distance', offset=28, datatype=7, count=1), sensor_msgs.msg.PointField(name='return_type', offset=32, datatype=2, count=1), sensor_msgs.msg.PointField(name='time_stamp', offset=40, datatype=8, count=1)]

The parts that need to be changed are as follows:

  • The intensity type should be changed from float32 to uint8_t.
  • The name of ring should be changed to channel.
  • The time_stamp type should be changed from float64 to uint32_t.

@xmfcx
Copy link

xmfcx commented Jul 12, 2024

@Aysenayilmaz
Copy link
Author

Aysenayilmaz commented Jul 19, 2024

Thank you very much for the quick response. When I build the current version and add it to AWsim-Labs, I get such an error.

Screenshot from 2024-07-19 18-46-43

It cannot find the function "rgl_node_points_ros2_publish_with_qos". Could I be taking the wrong build?

While building, I use this commands:

./setup.py
./setup.py --with-pcl --with-ros2 --with-ros2-standalone

@msz-rai
Copy link
Collaborator

msz-rai commented Jul 22, 2024

@Aysenayilmaz
The error you got most likely means that you provided RGL binary without ROS2 extension (build with the command ./setup.py)

When we build RGL for AWSIM we use the following command:

./setup.py --with-pcl --with-ros2-standalone --lib-rpath \$ORIGIN/../../../../Ros2ForUnity/Plugins/Linux/x86_64

The additional rpath option is for dependent ROS2 libraries that are shared with the Ros2ForUnity plugin. This way we point out the location where the RGL binary should search for ROS2 libraries.

The deploy:

  1. Copy RobotecGPULidar binary to RGLUnityPlugin:
cp build/lib/libRobotecGPULidar.so {AWSIM-path}/Assets/RGLUnityPlugin/Plugins/Linux/x86_64/
  1. Copy new ROS2 libraries to Ros2ForUnity
cp -n build/lib/ros2_standalone/lib* {AWSIM-path}/Assets/Ros2ForUnity/Plugins/Linux/x86_64/

@msz-rai
Copy link
Collaborator

msz-rai commented Jul 24, 2024

I am closing the ticket since the issue has already been resolved on the library side ✔️

@msz-rai msz-rai closed this as completed Jul 24, 2024
@feng123a52
Copy link

请问使用禾赛的激光雷达实车在外部传入自己的点云数据,autoware出现了这么个错,The pointcloud layout is not compatible with PointXYZIRCAEDT/PointXYZIRC. Aborting该如何解决

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

5 participants