Skip to content
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

Vehicle init pose: failed to get transform from map to base_link #76

Closed
fadimecetiner opened this issue Jan 24, 2023 · 38 comments
Closed

Comments

@fadimecetiner
Copy link

Hello
I am trying to run "Quick Start Demo" on AWSIM. I am encountering a problem about vehicle pose.
Autoware can not find init pose of vehilce and when I try to do it manually by using "2D Pose Estimate" still it doesnt work. Vehicle's init pose on Autoware is very far from map origin.

I shared screenshots and logs below;

Logs;
[motion_velocity_smoother-58] [WARN] [1674567417.778344619] [planning.scenario_planning.motion_velocity_smoother]: failed to get transform from map to base_link: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees. [motion_velocity_smoother-58] [INFO] [1674567417.778411542] [planning.scenario_planning.motion_velocity_smoother]: waiting for self pose... [component_container-64] [WARN] [1674567418.757881289] [control.trajectory_follower.lane_departure_checker_node]: failed to get transform from map to base_link: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees. [component_container-64] [INFO] [1674567418.757951568] [control.trajectory_follower.lane_departure_checker_node]: waiting for self pose... [component_container-62] [INFO] [1674567421.019612140] [planning.scenario_planning.parking.costmap_generator]: waiting for initial pose... [component_container_mt-61] [WARN] [1674567422.255320688] [planning.scenario_planning.lane_driving.motion_planning.obstacle_avoidance_planner]: failed to get transform from map to base_link: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees. [component_container_mt-61] [INFO] [1674567422.255387806] [planning.scenario_planning.lane_driving.motion_planning.obstacle_avoidance_planner]: waiting for self pose...
Screenshots;
image
Screenshot from 2023-01-23 17-31-00
Screenshot from 2023-01-23 17-31-33

How can I solve this problem?

@shmpwk
Copy link
Contributor

shmpwk commented Jan 25, 2023

@fadimee
Could you share your environment information?

@fadimecetiner
Copy link
Author

@fadimee Could you share your environment information?

My environment is Japan Tokyo Nishishinjuku in the Quick Start Demo, that can be seen in the given link below:

https://tier4.github.io/AWSIM/GettingStarted/QuickStartDemo/

@shmpwk
Copy link
Contributor

shmpwk commented Jan 26, 2023

What environment means is Ubuntu, ROS version and etc.

@fadimecetiner
Copy link
Author

I misunderstood
Ubuntu 22.04
Ros2 Humble
AWSIM v1.0.1

@shmpwk
Copy link
Contributor

shmpwk commented Jan 27, 2023

@fadimee

AWSIM v1.0.1 is for Ubuntu 20, ROS2 Galactic version.
Could you reffer to AWSIM v1.1.0 or the latest version on main branch instead?
Note that when you newly build Autoware again, I recommend you to once remove build directory and install directory under autoware directory.

@fadimecetiner
Copy link
Author

Hello ;
Thanks for your advice. But ı already tried it before create the issue. I tried after your advice again but the result was same.

I want to give more details about the issue;
Screenshot from 2023-01-30 17-48-14
Screenshot from 2023-01-30 17-48-54
Screenshot from 2023-01-30 17-49-14

@shmpwk
Copy link
Contributor

shmpwk commented Jan 31, 2023

@fadimee
Could you reffer to this discussion?
https://github.com/orgs/autowarefoundation/discussions/3236

Could you share your log of Autoware from the start to error part?

@fadimecetiner
Copy link
Author

@shmpwk
I tried your suggestions on discussion you referred. Still same result. Here some other details:

  • Planning simulation and rosbag replay simulation tutorial works correctly.
  • When I check gpu with nvidia-smi I can see AWSIM use GPU. You can see in attachments.
  • Waiting for initialize of AWSIM or Autoware doesnt change result.
  • There are not cuda initialize error in Autoware output.
  • There are a new error on autoware output after reinstall autoware:
    '/localization/initialize: status code 1 'The vehicle is not stopped.'
  • You can find other details you asked on discussion 3236 in attachments

Autoware Log.txt

Screenshot from 2023-02-01 15-42-46
Screenshot from 2023-02-01 15-44-18
Screenshot from 2023-02-01 15-43-45

@shmpwk
Copy link
Contributor

shmpwk commented Feb 2, 2023

@fadimee
Thank you for your investigation.
It looks your environment is organized as we expected.

There are a new error on autoware output after reinstall autoware:
'/localization/initialize: status code 1 'The vehicle is not stopped.'

Autoware will not perform initial position estimation unless the vehicle has been stopped for at least 3 seconds.
This means that even if the vehicle has been stopped up to that point, initial position estimation will not be performed for 3 seconds after Autoware is activated.
I do not think there is a problem with the error thrown up for 3 seconds but could you set stop_check_enabled false
https://github.com/autowarefoundation/autoware.universe/blob/ce93396d7b17dbb37666a7251d148fa1dc26aa4d/launch/tier4_localization_launch/launch/util/util.launch.xml#L19 and set 2D pose estimate manually?

@fadimecetiner
Copy link
Author

@shmpwk
'/localization/initialize: status code 1 'The vehicle is not stopped.' Error solved with your solution but 2D Pose Estimate" still doesnt work. ı encountered wit a new error in output log;

[component_container-64] [WARN] [1675318671.306431325] [control.trajectory_follower.lane_departure_checker_node]: failed to get transform from map to base_link: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees. [component_container-64] [INFO] [1675318671.306494429] [control.trajectory_follower.lane_departure_checker_node]: waiting for self pose... [component_container-62] [INFO] [1675318672.066189420] [planning.scenario_planning.parking.costmap_generator]: waiting for initial pose... [rviz2-70] [INFO] [1675318675.175711744] [rviz2]: Setting estimate pose: Frame:map, Position(81990.9, 50469.4, 0), Orientation(0, 0, 0.0329564, 0.999457) = Angle: 0.0659246 [initial_pose_adaptor-67] [INFO] [1675318675.199432433] [default_ad_api.helpers.initial_pose_adaptor]: client call: /api/localization/initialize [component_container_mt-65] [INFO] [1675318675.199795401] [default_ad_api.node.localization]: server call: /api/localization/initialize [component_container_mt-65] [INFO] [1675318675.200257685] [default_ad_api.node.localization]: client call: /localization/initialize [pose_initializer_node-32] [INFO] [1675318675.200525850] [localization.util.pose_initializer_node]: server call: /localization/initialize [pose_initializer_node-32] [INFO] [1675318675.201731232] [localization.util.pose_initializer_node]: Deactivation succeeded [pose_initializer_node-32] [INFO] [1675318675.201997108] [localization.util.pose_initializer_node]: Call NDT align server. [ndt_scan_matcher-34] [WARN] [1675318675.202112729] [localization.pose_estimator.ndt_scan_matcher]: No InputSource [pose_initializer_node-32] [INFO] [1675318675.202283754] [localization.util.pose_initializer_node]: NDT align server failed. [pose_initializer_node-32] [INFO] [1675318675.202379953] [localization.util.pose_initializer_node]: server exit: /localization/initialize [service_log_checker-3] [ERROR] [1675318675.202582418] [system.service_log_checker]: /localization/initialize: status code 4 'NDT align server failed.' (/localization/util/pose_initializer_node)

I am not sure you noticed beacuse I didnt mentioned about it in my previous posts, I want to remind the map on autoware is not aligned correctly. You can see in picture below. I think that is the reason of issue. But I am not sure why it is not aligned and how I can fix it.

image

@shmpwk
Copy link
Contributor

shmpwk commented Feb 2, 2023

@fadimee

ı encountered wit a new error in output log

I couldn't figure out the cause of the problem from that log.
For example, NDT align server failed is an error but it just shows the pose estimation is failed.

As for the map, you first use AWSIM v1.0.1 but the map is different between that and v1.1.0 (or the latest version).
Could you confirm the map was updated?

@fadimecetiner
Copy link
Author

fadimecetiner commented Feb 2, 2023

ıs there anything I can do for fixing map alignment? Because lane lines and point cloud are not aligned correctly.

Edit: I am sure that I use correct version. I also tried again a clean installation of autoware and ros but the problem still continue.

Screenshot from 2023-02-02 11-07-59
Screenshot from 2023-02-02 11-08-25
Screenshot from 2023-02-02 11-08-57

@shmpwk
Copy link
Contributor

shmpwk commented Feb 2, 2023

@fadimee

I've checked the latest map and found something wrong with it.
Now I'm quickly asking our team about it.

[edit]
I asked our team and concluded that the map has no problem though the lanelet map and point cloud map are not coincident.

Screenshot from 2023-02-02 17-39-23

@shmpwk
Copy link
Contributor

shmpwk commented Feb 2, 2023

I continue to examine it but will reply tomorrow, Japan time.

@isouf
Copy link

isouf commented Feb 2, 2023

FYI this issue might be related to this.

@shmpwk
Copy link
Contributor

shmpwk commented Feb 2, 2023

@isouf
Thank you for your help. It looks your solution is here.
Also, autowarefoundation/autoware.universe#2753 can help us?

@isouf
Copy link

isouf commented Feb 2, 2023

@shmpwk thank you for the prompt response.

I can set the initial pose by changing the resolution of my screen. However, this was not always working as expected.

Following some further investigation I found a more efficient solution. Essentially, when I launch the docker image I pass --privileged argument. In particular:

rocker --nvidia --x11 --user --privileged --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:humble-latest-cuda

This is is now working for the Planning Simulation tutorial, I can set the initial pose without having to change the resolution of my screen. Perhaps this is not so relevant for the AWSIM init pose problem but it might give some pointers on how to resolve this issue.

@fadimecetiner
Copy link
Author

@shmpwk and @isouf I checked both solutions but the problem still exist.
@shmpwk Are there any news about your examination?

@shmpwk
Copy link
Contributor

shmpwk commented Feb 10, 2023

@fadimee I could not found the cause of your problem yet.
Let me examine one by one.

  • Could you share the video from launching Autoware?
  • Could you share your Autoware launching command ?
  • Do you use awsim-stable branch for launching Autoware?

@isouf
Copy link

isouf commented Feb 15, 2023

@shmpwk I am also trying to run the AWSIM simulator and I have the same issue. Attaching here the launch.log file.

Also, please see below answers to your questions:

Do you use awsim-stable branch for launching Autoware?

Yes.

Could you share your Autoware launching command ?

I am running Autoware and AWSIM from Docker as per #81. I run the Docker container using the following command:

rocker --nvidia --x11 --user --privileged --net host --volume $HOME/autoware --volume $HOME/autoware_map --volume $HOME/AWSIM_v1.1.0 -- ghcr.io/autowarefoundation/autoware-universe:humble-latest-awsim-cuda

I use the following to run Autoware inside the Docker container:

ros2 launch autoware_launch e2e_simulator.launch.xml vehicle_model:=sample_vehicle sensor_model:=awsim_sensor_kit map_path:=$HOME/autoware_map/nishishinjuku_autoware_map

Could you share the video from launching Autoware?

awsim_error-2023-02-15_17.16.44.mp4

@shmpwk
Copy link
Contributor

shmpwk commented Feb 17, 2023

@isouf
Looking at your launch_log, lidar_centerpoint dies for example, which might have cuda related problem.

@shmpwk
Copy link
Contributor

shmpwk commented Feb 17, 2023

You can also reffer to the other example of docker launching.
#91 (comment)

@isouf
Copy link

isouf commented Feb 17, 2023

Thank you @shmpwk. The lidar_centerpoint does not work because the /sensing/lidar/top/pointcloud_raw is not published, you can also see in the video above, Unity is not rendering the pointcloud.

Looking at the .config/unity3d/TIERIV/AWSIM/Player.log I noticed the following error:

Unrecoverable error (code=500): cuda error: out of memory (code=2) @ /code/src/DeviceBuffer.hpp:127

The nvidia-smi output reveals that AWSIM consumes the entire GPU memory (~4GB):

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.12    Driver Version: 525.85.12    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   59C    P0    39W /  40W |   3893MiB /  4096MiB |    100%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2343      G   /usr/lib/xorg/Xorg                 20MiB |
|    0   N/A  N/A     49023    C+G   ..._v1.1.0/AWSIM_demo.x86_64     3862MiB |
+-----------------------------------------------------------------------------+

How much memory would you expect to be consumed by AWSIM v1.1.0?

@shmpwk
Copy link
Contributor

shmpwk commented Mar 10, 2023

@isouf
Sorry for being late.
I tried Docker + AWSIM and looks they consumes 10GB with my Desktop 😞 (It works though)

$ nvidia-smi
Fri Mar 10 15:53:28 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0  On |                  N/A |
| 41%   71C    P0   224W / 250W |   8199MiB / 11264MiB |     98%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1208      G   /usr/lib/xorg/Xorg                532MiB |
|    0   N/A  N/A      1389      G   /usr/bin/gnome-shell               76MiB |
|    0   N/A  N/A      5370      G   ...146940414869142090,131072       25MiB |
|    0   N/A  N/A    903487      C   ...nt/lidar_centerpoint_node     1633MiB |
|    0   N/A  N/A    903534      C   ...ts/component_container_mt      877MiB |
|    0   N/A  N/A    903875      G   ...os/humble/lib/rviz2/rviz2       98MiB |
|    0   N/A  N/A    904445    C+G   ..._v1.1.0/AWSIM_demo.x86_64     4942MiB |

@yangjiameng
Copy link

@shmpwk
Hi,I have the same problem,2D Pose Estimate button doesnt work,I use AWSIM V1.1.0 and autoware galactic。

@shmpwk
Copy link
Contributor

shmpwk commented Mar 11, 2023

@yangjiameng
AWSIM v1.1.0 is for Ubuntu 22.04, Humble.
When you use Ubuntu 22.04, Galactic, please try AWSIM v1.0.2.

@yangjiameng
Copy link

@shmpwk
Thank you!And The topic don‘t appear by “ros2 topic list” when I use AWSIM v1.0.1。
And I have written “export ROS_LOCALHOST_ONLY=1
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

if [ ! -e /tmp/cycloneDDS_configured ]; then
sudo sysctl -w net.core.rmem_max=2147483647
sudo ip link set lo multicast on
touch /tmp/cycloneDDS_configured
fi”
in ~/.bashrc file.
But the AWSIM is breakdown

@shmpwk
Copy link
Contributor

shmpwk commented Mar 11, 2023

@yangjiameng

the AWSIM is breakdown

What do you mean by breakdown? The simulation is crashed ?
If your PC doesn't have sufficient memory, it sometimes happens.

FYI, I created AWSIM + docker instruction here

@Mufan187569
Copy link

@shmpwk
Hello,I have the same problem as yangjiameng .
AWSIM broken down,which means that it flashed out.

@shmpwk
Copy link
Contributor

shmpwk commented Mar 11, 2023

@Mufan187569

For Ubuntu 20.04, Galactic, you can refer to the v1.0.2 tutorial.
https://github.com/tier4/AWSIM/blob/v1.0.2/docs/GettingStarted/QuickStartDemo/index.md

This issue thread is for Vehicle init pose: failed to get transform from map to base_link.
When you have other topics, please post the other issues or discussions.

@Mufan187569
Copy link

@shmpwk
Thank you very much for sharing the tutorial with me. The AWSIM_demo.x86._64 mentioned in the tutorial is not found in v1.0.2, so how should I start AWSIM

@shmpwk
Copy link
Contributor

shmpwk commented Mar 11, 2023

@Mufan187569
You can download AWSIM_V1.0.1 binary in AWSIM ver 1.0.2.

[edit]
The binary name is AWSIM.x86_64.
AWSIM_demo.x86._64 is for later version.
We are sorry for confusing you and it would be great if you cast the fixing Pull Request.

@yangjiameng
Copy link

@shmpwk
OK! Thank you! I have successfully run autoware galactic and AWSIM v 1.0.1 in ubuntu 20.04.
But the planning no route。

@Mufan187569
Copy link

@shmpwk
Thank you, the vehicle can be initially positioned. But now there is a problem that when setting the goal position, the vehicle status shows that it is planning, not driving

@Mufan187569
Copy link

@shmpwk
Thank you. I have successfully run Autoware with AWSIM. I want to ask about the topic of AWSIM release,What's the difference between /sensing/lidar/top/pointcloud_raw and /sensing/lidar/top/pointcloud_ raw_ ex?
And now we are deploying autoware to real vehicles. What should we do to replace AWSIM radar?

@shmpwk
Copy link
Contributor

shmpwk commented May 1, 2023

@yangjiameng @Mufan187569
Sorry for too late reply. How' s it going?
If you solve the problem about Vehicle init pose: failed to get transform from map to base_link, I'd like to close this issue.

What's the difference between /sensing/lidar/top/pointcloud_raw and /sensing/lidar/top/pointcloud_ raw_ ex?

The latter one is extracted one. source.

And now we are deploying autoware to real vehicles. What should we do to replace AWSIM radar?

If you integrate real vehicle, you can ignore the radar. You can switch not to use radar in Autoware launch file.

@zhuyingxiang95
Copy link

zhuyingxiang95 commented May 15, 2023

I got almost the same issue. could someone give me some help. log file attached here.
launch.log

@shmpwk
Copy link
Contributor

shmpwk commented May 15, 2023

@zhuyingxiang95 Seems to be solved #129

@shmpwk shmpwk closed this as completed May 15, 2023
mitsudome-r pushed a commit to mitsudome-r/AWSIM that referenced this issue Jun 5, 2024
Signed-off-by: Lukasz Chojnacki <lukasz.chojnacki@robotec.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants