autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
1.01k stars 650 forks source link

[Planning] cannot plan trajectory using my map #3774

Closed ahuazuipiaoliang closed 1 year ago

ahuazuipiaoliang commented 1 year ago

Checklist

Description

The Autoware works fine with the map in sample-map-planning tutorial image

but cannot plan the trajectory using my lanelet2 map. image

You can download my map for testing:

pointcloud_map lanelet2_map

Expected behavior

should send the global path and local path

Actual behavior

Got an error from mission planner image

Steps to reproduce

  1. launch autoware with simple simulator
  2. set initial pose
  3. set goal pose

Versions

Possible causes

No response

Additional context

No response

ahuazuipiaoliang commented 1 year ago

After downgrading to the autoware.unierse-release/2023.04, it works

TakaHoribe commented 1 year ago

@ahuazuipiaoliang The warning on your terminal "Goal is not valid! Please check position and angle of goal_pose" appears, for example, when the goal position is not in the lanelet, or the goal posture is opposite to the lanelet direction. (code is here)

In that case, the goal sent by user is not accepted by the mission_planner.

You can try with a larger angle threshold (e.g. 180 deg) set in yaml file here.

TakaHoribe commented 1 year ago

I couldn't load your map correctly. Do we have a special setup to load the map (changing the origin, etc)?

image

ahuazuipiaoliang commented 1 year ago

I couldn't load your map correctly. Do we have a special setup to load the map (changing the origin, etc)?

image

I think you should set the coordinate format as local in the config file of lanelet2_map_loader.

ahuazuipiaoliang commented 1 year ago

@TakaHoribe My goal pose was correct, since I have try Autoware for a long time and I can't set correct goal in elder version of Autwoare.universe

TakaHoribe commented 1 year ago

@ahuazuipiaoliang I checked it in my environment, and it seems the lane boundary and center line are broken on Rviz. But the Lanelet looks ok in the vectormap builder.

(The reason the goal pose is rejected is due to the goal pose orientation check. Since the centerline is broken, it can't calculate the lane direction correctly.)

@mitsudome-r Any idea?

image

ahuazuipiaoliang commented 1 year ago

@TakaHoribe That's so weird cause I have successfully run elder version of Autoware.universe with my more complicated maps, but after I upgraded universe, I could not use my map. But the newest version of universe is compatible with the sample-map that provided by AWF. I thinks it is a little bit tricky to make useful vector map for newest version of Autoware.univers.

TakaHoribe commented 1 year ago

Yes, it can be a bug. Let me investigate more.

mitsudome-r commented 1 year ago

@ahuazuipiaoliang I think the issue is caused by the following:

I can create the fix PR in map_loader package to fix the bug. In the meantime, you can try using the lanelet2 map that I attached, which has MGRS grid annotation removed so that it doesn't trigger the bug existing in the current code.

lanelet2_map.zip

mitsudome-r commented 1 year ago

Once this PR is merged, you should be able to drive using the original map as well. https://github.com/autowarefoundation/autoware.universe/pull/3825

ahuazuipiaoliang commented 1 year ago

@mitsudome-r Thanks for your reply. In my using cases, I don't have MGRS grid reference in the vector because I can provide the lat/lon/alt origin to the gnss_poser for pose initialization, and the coordinates of vector map is aligned to the coordinates of pointcloud map. BTW, what is a valid MGRS grid?

mitsudome-r commented 1 year ago

Sorry, "valid" was not the correct phrase, and maybe "correct" MGRS grid is more accurate expression.

By looking at tags in lanelet2 map, I believe you created the map using TIER IV's vector map builder(VMB) by loading point cloud map and drawing lanes on it. When you started creating a lanelet2 map, I think it asked you to specify the MGRS grid of your map. If your point cloud is created with MGRS coordinates, then you should specify MGRS grid value of your map. If your point cloud map is in local coordinates(like in your case) then you should keep it the default "99XXX" as MGRS grid to tell VMB that your map will be in local coordinates. image

However, when I checked your original map, it had 17TLG specified, which isn't true. This has caused some issue around projection at load time in Autoware causing your issue image (1) .

mitsudome-r commented 1 year ago

@ahuazuipiaoliang Just confirm, were you able to drive correctly with the map I posted in https://github.com/autowarefoundation/autoware.universe/issues/3774#issuecomment-1563088650?

ahuazuipiaoliang commented 1 year ago

@mitsudome-r I try try this branch today with my map, thanks a lot for your support

ahuazuipiaoliang commented 1 year ago

@mitsudome-r thanks, it works now.