ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Ok, i'll try to share all the tips that i received from @mitsudome-r (citation blocks), and another information that helped me to bring my own pcd and osm(lanelet2) map to Autoware.Auto and visualize it in Rviz. First of all i think it's important to give some clarification about my approach. I decided to use Autoware.Auto ms3_avp_demo as the basis for my demo package. And for the start the only primitives that i use are lanelet with centerline and parking zone area, no curbs, no traffic lights or anything else. First i made my own pcd map by standard ndt_mapping, after that filtered it and binarized with builtin pcl_tools. Second step was creating lanelet2 map with Autoware web tool https://tools.tier4.jp/vector_map_builder_ll2 . It's important to know, when you load your pcd and after that create Lanelet2 map it's necessarily to define correct "MGRS grid zone" and "MGRS 100,000-meter square" in the corresponding pop-up dialog window, otherwise nothing works. You can find it at any online services, for example i used this one https://mgrs-mapper.com/app , all you need is only find your map location on earth map and take value of MGRS zone from information string. For example MGRS: 46U DH , MGRS grid zone: 46U and MGRS 100,000-meter square: DH. Third step, export the created map ( ̶a̶n̶d̶ ̶b̶e̶ ̶h̶a̶p̶p̶y̶,̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶e̶v̶e̶r̶y̶t̶h̶i̶n̶g̶ ̶w̶o̶r̶k̶s̶)̶ and faced with some issues ). Actually i tried to load my pcd and osm map instead of default ms3_avp_demo maps, and run it. The way i did it:
put my osm and pcd maps files in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data
define path for my osm file in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/lanelet2_map_provider.param.yaml
define path for my pcd map in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml
modify map_yaml_file path in src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml to the local file that you modified instead of path to the param file installed in /opt. (e.g.
"/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml"
define correct latitude longitude origins of my map for alignment that are also necessary for visualization in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml
After that i run ros2 launch autoware_auto_avp_demo ms3_sim.launch.py
and see no map.
But there was errors in rviz like this
"error: center_lane_line/5544 Contains invalid floating point values (nans or infs)"
And here Mitsudome-r helped me again with inspecting my osm map.
I've looked into the map, and it looks like to error message comes from the fact that centerline generated internally is giving error due to invalid lanes. some of the lanes consist of left/right boundaries with a single point. For example, lanelet 4921 has right bound 4919 which only contains point 4543 as shown in the image. There were 31 more lanelets with similar issue, and the error disappeared from Rviz once I deleted those lanelets.
I don't know how i created such wrong lanelets, i definitely didn't do it on purpose, but maybe during creating difficult roundabout circular intersection i made some mistakes.
After that i "successfully" run ms3_sim.launch.py and saw my pointcloud and vector map in rviz. But there was small misalignment.
I fixed misalignment in x y direction by correcting latitude/ longitude in autonomoustuff_parking_lot_lgsvl.yaml, but tweaking RPY parameters in this file had no effect. For RPY correcting i have one more advice from Mitsudome-r:
At the moment, I believe there is no way to rotate in vector map builder, but you can do it with JSOM which is a generic tool to modify OSM files. Install instruction is here https://josm.openstreetmap.de/wiki/Download#LinuxRepositories JOSM requires certain version tags to be specified which is not specified in the map file exported from Tier IV's Vector Map Builder so you might have to modify your map using when you try to load them. The modified map that attached earlier has that change already, but if you have exported again from Vector Map Builder, do the following before loading it to JOSM. Here's the change you have to make: open the map in text editor add version="0.6" to osm element: i.e. replace <osm generator="VMB"> with <osm version="0.6" generator="VMB"> add version="1" to all node, way, and relation elements. If you are using gedit, Open replace dialog(Ctrl+H). Specify id="(.*)" for "Find" and id="\1" version="1" , Tick "Regular expression" option and click Replace All. Then, you should be able to load it in JOSM. After loading in JOSM you can rotate it by first selecting all objects and drag while pressing CTRL+SHIFT.
Another way is to modify pcd map. You can do that by running the following:
sudo apt install pcl-tools
pcl_transform_point_cloud input.pcd output.pcd -axisangle ax,ay,az,theta
After this minor change in JOSM Editor, i received fine point cloud-vector map vizualization in rviz.
And of course, i would like to thank @mitsudome-r for help, one more time.
If there's some unclear or uncovered things related to map creation process, you are welcome to ask more questions in comments.
P.S. Now i'm on the way to tune my three velodyne sensing configuration to Autoware.Auto.
2 | No.2 Revision |
Ok, i'll try to share all the tips that i received from @mitsudome-r (citation blocks), and another information that helped me to bring my own pcd and osm(lanelet2) map to Autoware.Auto and visualize it in Rviz. First of all i think it's important to give some clarification about my approach. I decided to use Autoware.Auto ms3_avp_demo as the basis for my demo package. And for the start the only primitives that i use are lanelet with centerline and parking zone area, no curbs, no traffic lights or anything else. First i made my own pcd map by standard ndt_mapping, after that filtered it and binarized with builtin pcl_tools. Second step was creating lanelet2 map with Autoware web tool https://tools.tier4.jp/vector_map_builder_ll2 . It's important to know, when you load your pcd and after that create Lanelet2 map it's necessarily to define correct "MGRS grid zone" and "MGRS 100,000-meter square" in the corresponding pop-up dialog window, otherwise nothing works. You can find it at any online services, for example i used this one https://mgrs-mapper.com/app , all you need is only find your map location on earth map and take value of MGRS zone from information string. For example MGRS: 46U DH , MGRS grid zone: 46U and MGRS 100,000-meter square: DH. Third step, export the created map ( ̶a̶n̶d̶ ̶b̶e̶ ̶h̶a̶p̶p̶y̶,̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶e̶v̶e̶r̶y̶t̶h̶i̶n̶g̶ ̶w̶o̶r̶k̶s̶)̶ and faced with some issues ). Actually i tried to load my pcd and osm map instead of default ms3_avp_demo maps, and run it. The way i did it:
put define path to my osm and pcd maps files in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data
define path for to my osm file in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/lanelet2_map_provider.param.yaml
define path for to my pcd map in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml
modify map_yaml_file path in src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml to the local file that you modified instead of path to the param file installed in /opt. (e.g.
"/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml"
define correct latitude longitude origins of my map for alignment that are also necessary for visualization in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml
After that i run ros2 launch autoware_auto_avp_demo ms3_sim.launch.py
and see no map.
But there was errors in rviz like this
"error: center_lane_line/5544 Contains invalid floating point values (nans or infs)"
And here Mitsudome-r helped me again with inspecting my osm map.
I've looked into the map, and it looks like to error message comes from the fact that centerline generated internally is giving error due to invalid lanes. some of the lanes consist of left/right boundaries with a single point. For example, lanelet 4921 has right bound 4919 which only contains point 4543 as shown in the image. There were 31 more lanelets with similar issue, and the error disappeared from Rviz once I deleted those lanelets.
I don't know how i created such wrong lanelets, i definitely didn't do it on purpose, but maybe during creating difficult roundabout circular intersection i made some mistakes.
After that i "successfully" run ms3_sim.launch.py and saw my pointcloud and vector map in rviz. But there was small misalignment.
I fixed misalignment in x y direction by correcting latitude/ longitude in autonomoustuff_parking_lot_lgsvl.yaml, but tweaking RPY parameters in this file had no effect. For RPY correcting i have one more advice from Mitsudome-r:
At the moment, I believe there is no way to rotate in vector map builder, but you can do it with JSOM which is a generic tool to modify OSM files. Install instruction is here https://josm.openstreetmap.de/wiki/Download#LinuxRepositories JOSM requires certain version tags to be specified which is not specified in the map file exported from Tier IV's Vector Map Builder so you might have to modify your map using when you try to load them. The modified map that attached earlier has that change already, but if you have exported again from Vector Map Builder, do the following before loading it to JOSM. Here's the change you have to make: open the map in text editor add
version="0.6"version="0.6"
to osm element: i.e. replace<osm
generator="VMB">generator="VMB"> with<osm version="0.6"
generator="VMB">generator="VMB"> addversion="1"version="1"
to all node, way, and relation elements. If you are using gedit, Open replace dialog(Ctrl+H). Specifyid="(.*)"id="(.*)"
for "Find" andid="\1"
version="1"version="1" , Tick "Regular expression" option and click Replace All. Then, you should be able to load it in JOSM. After loading in JOSM you can rotate it by first selecting all objects and drag while pressing CTRL+SHIFT.Another way is to modify pcd map. You can do that by running the following:
sudo apt install pcl-tools
pcl_transform_point_cloud input.pcd output.pcd -axisangle ax,ay,az,theta
After this minor change in JOSM Editor, i received fine point cloud-vector map vizualization in rviz.
And of course, i would like to thank @mitsudome-r for help, one more time.
If there's some unclear or uncovered things related to map creation process, you are welcome to ask more questions in comments.
P.S. Now i'm on the way to tune my three velodyne sensing configuration to Autoware.Auto.
3 | No.3 Revision |
Ok, i'll try to share all the tips that i received from @mitsudome-r (citation blocks), and another information that helped me to bring my own pcd and osm(lanelet2) map to Autoware.Auto and visualize it in Rviz. First of all i think it's important to give some clarification about my approach. I decided to use Autoware.Auto ms3_avp_demo as the basis for my demo package. And for the start the only primitives that i use are lanelet with centerline and parking zone area, no curbs, no traffic lights or anything else. First i made my own pcd map by standard ndt_mapping, after that filtered it and binarized with builtin pcl_tools. Second step was creating lanelet2 map with Autoware web tool https://tools.tier4.jp/vector_map_builder_ll2 . It's important to know, when you load your pcd and after that create Lanelet2 map it's necessarily to define correct "MGRS grid zone" and "MGRS 100,000-meter square" in the corresponding pop-up dialog window, otherwise nothing works. You can find it at any online services, for example i used this one https://mgrs-mapper.com/app , all you need is only find your map location on earth map and take value of MGRS zone from information string. For example MGRS: 46U DH , MGRS grid zone: 46U and MGRS 100,000-meter square: DH. Third step, export the created map ( ̶a̶n̶d̶ ̶b̶e̶ ̶h̶a̶p̶p̶y̶,̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶e̶v̶e̶r̶y̶t̶h̶i̶n̶g̶ ̶w̶o̶r̶k̶s̶)̶ and faced with some issues ). Actually i tried to load my pcd and osm map instead of default ms3_avp_demo maps, and run it. The way i did it:
define path to put my osm and pcd maps files in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data
define path to my osm file in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/lanelet2_map_provider.param.yaml
define path to my pcd map in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml
modify map_yaml_file path in src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml to the local file that you modified instead of path to the param file installed in /opt. (e.g.
"/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml"
define correct latitude longitude origins of my map for alignment that are also necessary for visualization in
/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml
After that i run ros2 launch autoware_auto_avp_demo ms3_sim.launch.py
and see no map.
But there was errors in rviz like this
"error: center_lane_line/5544 Contains invalid floating point values (nans or infs)"
And here Mitsudome-r helped me again with inspecting my osm map.
I've looked into the map, and it looks like to error message comes from the fact that centerline generated internally is giving error due to invalid lanes. some of the lanes consist of left/right boundaries with a single point. For example, lanelet 4921 has right bound 4919 which only contains point 4543 as shown in the image. There were 31 more lanelets with similar issue, and the error disappeared from Rviz once I deleted those lanelets.
I don't know how i created such wrong lanelets, i definitely didn't do it on purpose, but maybe during creating difficult roundabout circular intersection i made some mistakes.
After that i "successfully" run ms3_sim.launch.py and saw my pointcloud and vector map in rviz. But there was small misalignment.
I fixed misalignment in x y direction by correcting latitude/ longitude in autonomoustuff_parking_lot_lgsvl.yaml, but tweaking RPY parameters in this file had no effect. For RPY correcting i have one more advice from Mitsudome-r:
At the moment, I believe there is no way to rotate in vector map builder, but you can do it with JSOM which is a generic tool to modify OSM files. Install instruction is here https://josm.openstreetmap.de/wiki/Download#LinuxRepositories JOSM requires certain version tags to be specified which is not specified in the map file exported from Tier IV's Vector Map Builder so you might have to modify your map using when you try to load them. The modified map that attached earlier has that change already, but if you have exported again from Vector Map Builder, do the following before loading it to JOSM. Here's the change you have to make: open the map in text editor add
version="0.6"
to osm element: i.e. replace<osm generator="VMB">
with<osm version="0.6" generator="VMB">
addversion="1"
to all node, way, and relation elements. If you are using gedit, Open replace dialog(Ctrl+H). Specifyid="(.*)"
for "Find" andid="\1" version="1"
, Tick "Regular expression" option and click Replace All. Then, you should be able to load it in JOSM. After loading in JOSM you can rotate it by first selecting all objects and drag while pressing CTRL+SHIFT.Another way is to modify pcd map. You can do that by running the following:
sudo apt install pcl-tools
pcl_transform_point_cloud input.pcd output.pcd -axisangle ax,ay,az,theta
After this minor change in JOSM Editor, i received fine point cloud-vector map vizualization in rviz.
And of course, i would like to thank @mitsudome-r for help, one more time.
If there's some unclear or uncovered things related to map creation process, you are welcome to ask more questions in comments.
P.S. Now i'm on the way to tune my three velodyne sensing configuration to Autoware.Auto.