ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to create a lanelet2 map for Autoware.Auto AVP demo?

asked 2021-04-24 22:38:57 -0600

congphase gravatar image

updated 2021-09-04 03:29:10 -0600

[My question is wrongly originated from Autoware.Auto's gitlab]

Hi everyone, I'll try to be as brief as possible.

My area and the trajectory I want to create using lanelet2_global_planner is as follows: idea of a simple semantic map. And my idea to draw semantic map using JOSM: idea to draw

After looking into autonomoustuff_parking_lot.osm of the AVP demo, the lanelet2_global_planner C++ code, I have known that:

  • The .osm map has to have an area that hasparking_accesses which lists parking accesses by ids
  • Each parking access is a relation that has type of multipolygon (the relation of multiple way members with role as outer), and lists all relevant parking_spot in parking_spots tag
  • Each parking_spot has to be a multipolygon, and rectangle in shape to be exact, formed from 5 points, where last point stays very close to the first point.

I opened autonomoustuff_parking_lot.osm in JOSM with Imagery, searched for parking_accesse s, parking_slot s by IDs to visually see what they are. But that gives me ununified rules. Sometimes a parking_spot is really a rectangular parking spot, but some times it's like this link

What are parking accesses, parking spots literally?

With manual blind study above, I then created this .osm. However, when re-running the AVP demo, it (and my .pcd point cloud) failed to show up in Rviz, although I had configured map_publisher's longitude and latitude to be a node's lat and lon in the .osm.

What did I do wrong in the .osm file? What is the right methodology to start making an .osm map usable for the AVP demo without manually referring to the autonomoustuff_parking_lot.osm of the Autoware.Auto? Please help.

edit retag flag offensive close merge delete

Comments

Did you also define your osm map lat lon origin in data/autonomoustuff_parking_lot.yaml ?

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-29 03:52:31 -0600 )edit

@Aleksandr Savel'ev, I did it bro, as I replied to @mitsudome-r below. So happy.

Anyway, hope my trouble might help you when you come back to global planning after finishing testing sensing with real hardware :D

congphase gravatar image congphase  ( 2021-04-29 23:02:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-04-29 21:52:43 -0600

mitsudome-r gravatar image

When are planning to do planning from a parking spot to another in Autoware.Auto, the global planner expects to be planned from parking_spot -> parking_access -> lane -> parking_access -> parking_spot.

  • parking_spot: The actual space to park, and Autoware.Auto will try to park at the center of this object. It is defined as lanelet2 Area objects(multipolygon in osm). It should have following tags: subtype=parking_spot, parking_accesses=<list of relevant parking access>. Autoware.Auto also assumes that the parking spot is rectangle shape with 5 points where first and last point overlap.
  • Parking Access Areas: This is used to define free space between parking spot and its nearest lane. Parking planner will use the shape of parking_spot, parking_access, and lanelet to calculate trajectory. Parking Access Areas are defined as lanelet2 Area objects(multipolygon in osm). It should have following tags: subtype=parking_access, ref_lanelet=<id of the nearest lanelet>
  • Lanelet: Lane objects to define lanes with right bounds and left bounds. See lanelet2 document for the details.

If you are familiar with c++, looking into the global_planner source code might help you get some idea.

What did I do wrong in the .osm file?

You have to add multipolygon relation to define parking_spots. You also have to define parking_access area as well. Although you don't have any "gaps" between lanelets and your parking spot, Autoware.Auto expects this object to find out the connection between lanelets and parking spots so you can perhaps create one that is overlapping with the parking_spot. Also, it seems like you are trying to drive through lanes, in that case, you might not need to define parking spots at all.

If you still don't see a map in RVIZ, I doubt there is something wrong with configuration of the origin when loading the map.

edit flag offensive delete link more

Comments

Thank you, Mr. @mitsudome-r, I eventually created a map that trajectories were successfully planned, a day after I asked this question, but I didn't have time to post an update here. Here's my result link

The main reason why I met confusions about figuring out the rules is:

I opened autonomoustuff_parking_lot.osm in JOSM with Imagery, searched for parking_accesse s, parking_slot s by IDs to visually see what they are. But that gives me ununified rules. Sometimes a parking_spot is really a rectangular parking spot, but some times it's like this

Searching by IDs in JOSM shows highlighted "objects" (nodes, ways...) corresponding to that ID. Those objects are not the parts that form the corresponding parking spot. Instead, they contain that ID as sub-string(s) in their tag values. The appropriate way to navigate to an interested object is demonstrated as link. Those who're getting familiar ...(more)

congphase gravatar image congphase  ( 2021-04-29 22:54:51 -0600 )edit

Hello, @congphase . Do you use ssc_interface and vehicle_kinematic_state topic respectively to start lanelet2_global_planner_node ?

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-05-12 11:31:06 -0600 )edit

Hi @Aleksandr Savel'ev. Sorry for the late response. Yes I did. Both of them are used during the lanelet2_global_planner start.

congphase gravatar image congphase  ( 2021-05-17 22:57:35 -0600 )edit

What is the "cad_id" and how to find out "ref_lanelet" and "parking_accesses" number to provide it in the relation?

rugved gravatar image rugved  ( 2021-07-07 11:26:32 -0600 )edit

@rugved "parking_accesses" is a tag that exists in a relation of type "lanelet" or type "parking_slot", it holds the IDs of the relations of type " parking_access". So you just need to determine the parking accesses (the one multipolygon between a parking slot and the associated lanelet), look for its relation ID, and insert it to the value string of the "parking_accesses" tag in "lanelet" and " parking_slot" relations. This should make the global planner work.

I don't know what cad_id means. cad_id is not quite important for global planner, if I'm not wrong. So you can try skipping it to see if all works.

congphase gravatar image congphase  ( 2021-07-07 12:06:51 -0600 )edit

Thanks for the quick response @congphase, really appreciate it. The thing is in the map you provided above, the relation id (-99805, -99807,-99808) has a parking access id as -99786. However, the relation id -99786 is not present in the map. Am I missing any links here?

rugved gravatar image rugved  ( 2021-07-07 12:12:43 -0600 )edit

@rugved I don't have a computer now. It's midnight in Vietnam, my country, at the moment. I'll check and reply to you in the next morning.

congphase gravatar image congphase  ( 2021-07-07 12:17:59 -0600 )edit

Thank you, appreciate it.Also, what is the center in parking spot relation? How did you provide those values? Were you able get the elevation from JOSM or added manually after?

rugved gravatar image rugved  ( 2021-07-07 12:20:44 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-04-24 00:50:36 -0600

Seen: 1,182 times

Last updated: Sep 04 '21