apollo icon indicating copy to clipboard operation
apollo copied to clipboard

IPG CarMaker with Baidu Apollo

Open hkyee opened this issue 1 year ago • 4 comments

Hi, I am trying to bridge between IPG CarMaker and Baidu Apollo to simulate autonomous driving. I am currently stuck and need assistance.

  1. How does the Lidar point cloud data for X , Y , Z look like in the message? Is the unit in meters?

  2. I have read the bridge module. After serializing the point cloud data and passing it to the point cloud channel --pointcloud_topic=/apollo/sensor/velodyne64/compensator/PointCloud2 , I should be able to see the point cloud in Dreamview, am I right?

Thanks in advance

hkyee avatar Feb 26 '24 19:02 hkyee

  1. How does the Lidar point cloud data for X , Y , Z look like in the message? Is the unit in meters?

Apollo coordinate system is shown in the figure below, the unit is meters image

  1. I have read the bridge module. After serializing the point cloud data and passing it to the point cloud channel --pointcloud_topic=/apollo/sensor/velodyne64/compensator/PointCloud2 , I should be able to see the point cloud in Dreamview, am I right?

Yes, If you are sending point cloud data, by the way you must use version 8.0 or above to select the point cloud to be displayed according to the topic. Lower versions of Apollo only display the point cloud of the default topic.

daohu527 avatar Feb 27 '24 06:02 daohu527

Another question @daohu527 , may I know which code can I reference from for Serializing pointcloud_pb2 messages?

For example, how would I set the frame_id , measurement_time and so on... image

hkyee avatar Mar 05 '24 12:03 hkyee

You can ref to c++ protobuf usage, and below is an example in Apollo

https://github.com/ApolloAuto/apollo/blob/e373b206a0dc0360af826152132a61c85cab295c/modules/drivers/lidar/robosense/parser/robosense16_parser.cpp#L60-L65

daohu527 avatar Mar 06 '24 06:03 daohu527

Thanks for the fast responses.

I wrote a python script to send serialized Point Cloud messages as a UDP client to 127.0.0.1 , port 8900. However, after starting the bridge_receiver, no messages came in based on my cyber_monitor.

Right now, I am writing another simple UDP client to send Chatter messages to Apollo. image

But when changing the message type to image

Build failed with error that Chatter is not a member of apollo::cyber::proto.

image

Is the message type incorrect? The link to unit_test.proto is here

hkyee avatar Mar 07 '24 02:03 hkyee