-
Notifications
You must be signed in to change notification settings - Fork 630
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
Help needed in matching a PCD map created within a simulator with a Lanelet2 data created in real-world #1496
Comments
@sglee-morai If you would like to move pointcloud you can either use pcl_tools or CloudCompare
|
I second pcl-tools. In the past I had a similar issue: I created a lanelet2 map from JOSM (georeferenced) and had to match it on the PCD (which was not). You can use the following principle:
rot = []
for p in pts:
local_diff = p["local"] - center["local"]
lobal_angle = atan2(local_diff.y, local_diff.x)
global_diff = p["global"] - center["global"]
global_angle = atan2(global_diff.y, global_diff.x)
angle_diff = fmod((global_angle - local_angle) + pi, 2*pi) - pi
rot.append(angle_diff)
avg_rot = np.mean(rot)
stddev_rot = np.std(rot)
Eventually double check that each point you used as referenced have been moved at the expected coordinate. |
@mitsudome-r @VRichardJP Thanks a lot for providing highly detailed guidelines! PCD map sample from the simulator & ITRI Campus Lanelet2 Map captured in the real-world campusHere is a download link for the initial sample PCD map, created using MORAI SIM: Drive, that you might take a look at if you'd like. Btw, the real-world lanelet2 data that I'm trying to match the PCD map to is the ITRI campus lanelet2 map uploaded in the CI/CD pipeline. (I believe I'm not able to share it publicly.) Matching Result (Work-in-progress)I'm currently trying it out and it seems like I'm almost there. Due to some other issues, I wasn't able to follow the way that @VRichardJP has suggested yet, so far I just give a few numbers that look okay for now. That's why the matching doesn't seem accurate enough yet, which I'm going to work on this week and later. Since I can create another PCD map, which looks much more similar to the real-world one than the current PCD map, I would like to create the map once again and then try matching them. (The result so far 1): the real-world PCD map (blue) + PCD map from MORAI SIM: Drive, after roughly matching (red)(The result so far 2): the PCD map from MORAI SIM (after roughly matched) + real-world lanelet2 data |
[22-08-16] UpdateTrying to test, but stuck at another issue (lidar driver)I created some PCD maps and tried to do some testing before closing this issue. For testing, I'm trying to run MORAI SIM: Drive with Autwoare to see whether localization is working fine, but I'm struggling in starting a lidar driver for Autoware.Universe
Another Quick QuestionIs it possible for a lanelet2 map for Autoware can have an arbitrary position (lat, lon) as the origin of the local map coordinate system? (NOT the origin of an MGRS system) In other words, is there any way to specify georeference information as an arbitrary proj4 string (or something like UTM + offset value)? |
https://github.com/tier4/velodyne_vls is being used in the Isuzu bus for velodyne driver. |
Yes. |
@xmfcx @mitsudome-r Thanks a lot for sharing! I was following through how Autoware.Universe launches velodyne drivers, and I found this one: sample_sensor_kit_launch/launch/lidar.launch.xml Is this the configuration file for lidar drivers when launching the Autoware using the autoware_launch/launch/autoware.launch.xml and sample_sensor_kit (the default value) is passed for sensor_model argument? |
Checklist
Description
Basically, help from any member who is familiar with matching PCD data to lanelet2 data is needed to solve the following problem
A PCD map for ITRI Campus is created using MORAI SIM: Drive (Actually using AWSIM from TierIV as well).
I put the PCD map along with the original lanelet2 data in the same path.
When launching the Autoware using the command below, it is shown in the rviz that PCD data doesn't match the lanelet2 data. (It only shows PCD data. Lanelet2 data cannot be found)
ros2 launch autoware_launch autoware.launch.xml map_path:={the_path_including_pcd_map_and_lanelet2_data} vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
The picture below shows that the PCD data is not displayed on top of the lanelet2 data. (Note the PCD map here is only a partial one by the way)
When using PCD data created in the real-world instead, the PCD map and lanelet2 data match altogether correctly.
Purpose
This task is required to have an E2E simulator (either MORAI SIM: Drive or AWSIM) prepared for bus ODD development & testing.
Related Issues in the Simulation WG
Possible approaches
I'm guessing there must be a way to specify how to convert the PCD data onto the global coordinate system so that it can be matched onto the lanelet2 map.
I'm currently looking into
map_loader
package, but I cannot find one yet.I know how to match this PCD data with the lanelet2 data theoretically, but I don't know how to let Autoware do that.
Here, the PCD data is described w.r.t. simulation map coordinate system whereas lanelet2 data is done so w.r.t. the global coordinate system. Therefore I believe the problem is simply specifying the projection for the map coordinate system.
FYI: Matching the ITRI map coordinate system (simulation) with the global coordinate system
Definition of done
When launching the Autoware using the command below, rviz should show PCD data on top of lanele2 data.
ros2 launch autoware_launch autoware.launch.xml map_path:={the_path_including_pcd_map_and_lanelet2_data} vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
The text was updated successfully, but these errors were encountered: