f1tenth / f1tenth_gym_ros

Containerized ROS communication bridge for F1TENTH gym environment.
MIT License
154 stars 106 forks source link

Rviz invalid frame id 'map' #27

Closed thedevmanek closed 1 year ago

thedevmanek commented 1 year ago

Describe the bug Rviz simulation does not show the map. Only shows a white car in the middle. To Reproduce Steps to reproduce the behavior: Follow instructions given in readme.

source /opt/ros/foxy/setup.bash
source install/local_setup.bash
ros2 launch f1tenth_gym_ros gym_bridge_launch.py

Expected behavior A car with surroundings should be visible. Screenshots If applicable, add screenshots to help explain your problem.' Screenshot_2022-10-24-15-42-12_1920x1080


root@ccac2fd79f64:/sim_ws# ros2 launch f1tenth_gym_ros gym_bridge_launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2022-10-24-15-36-16-659486-ccac2fd79f64-583
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rviz2-1]: process started with pid [586]
[INFO] [gym_bridge-2]: process started with pid [588]
[INFO] [lifecycle_manager-3]: process started with pid [590]
[INFO] [map_server-4]: process started with pid [592]
[INFO] [robot_state_publisher-5]: process started with pid [594]
[lifecycle_manager-3] [INFO] [1666605976.751587789] [lifecycle_manager_localization]: Creating
[robot_state_publisher-5] Parsing robot urdf xml string.
[robot_state_publisher-5] Link ego_racecar/back_left_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/back_right_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/front_left_hinge had 1 children
[robot_state_publisher-5] Link ego_racecar/front_left_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/front_right_hinge had 1 children
[robot_state_publisher-5] Link ego_racecar/front_right_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/laser_model had 0 children
[robot_state_publisher-5] [INFO] [1666605976.755687609] [ego_robot_state_publisher]: got segment ego_racecar/back_left_wheel
[robot_state_publisher-5] [INFO] [1666605976.755870726] [ego_robot_state_publisher]: got segment ego_racecar/back_right_wheel
[robot_state_publisher-5] [INFO] [1666605976.755891398] [ego_robot_state_publisher]: got segment ego_racecar/base_link
[robot_state_publisher-5] [INFO] [1666605976.755907391] [ego_robot_state_publisher]: got segment ego_racecar/front_left_hinge
[robot_state_publisher-5] [INFO] [1666605976.755921708] [ego_robot_state_publisher]: got segment ego_racecar/front_left_wheel
[robot_state_publisher-5] [INFO] [1666605976.755936724] [ego_robot_state_publisher]: got segment ego_racecar/front_right_hinge
[robot_state_publisher-5] [INFO] [1666605976.755953904] [ego_robot_state_publisher]: got segment ego_racecar/front_right_wheel
[robot_state_publisher-5] [INFO] [1666605976.755971504] [ego_robot_state_publisher]: got segment ego_racecar/laser_model
[lifecycle_manager-3] [INFO] [1666605976.757300886] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[lifecycle_manager-3] [INFO] [1666605976.758294553] [lifecycle_manager_localization]: Starting managed nodes bringup...
[lifecycle_manager-3] [INFO] [1666605976.758334012] [lifecycle_manager_localization]: Configuring map_server
[map_server-4] [INFO] [1666605976.760646446] [map_server]:
[map_server-4]  map_server lifecycle node launched.
[map_server-4]  Waiting on external lifecycle transitions to activate
[map_server-4]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-4] [INFO] [1666605976.760741985] [map_server]: Creating
[map_server-4] [INFO] [1666605976.760967425] [map_server]: Configuring
[map_server-4] [ERROR] [map_io]: Failed processing YAML file /sim_ws/src/f1tenth_gym_ros/maps/levine.yaml at position (-1:-1) for reason: bad file
[map_server-4] [ERROR] [1666605976.761120512] []: Caught exception in callback for transition 10
[map_server-4] [ERROR] [1666605976.761130569] []: Original error: Failed to load map yaml file: /sim_ws/src/f1tenth_gym_ros/maps/levine.yaml
[map_server-4] [WARN] [1666605976.761151451] []: Error occurred while doing error handling.
[map_server-4] [FATAL] [1666605976.761164441] [map_server]: Lifecycle node map_server does not have error state implemented
[lifecycle_manager-3] [ERROR] [1666605976.761600445] [lifecycle_manager_localization]: Failed to change state for node: map_server
[lifecycle_manager-3] [ERROR] [1666605976.761628659] [lifecycle_manager_localization]: Failed to bring up all requested nodes. Aborting bringup.
[rviz2-1] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[rviz2-1] libGL error: MESA-LOADER: failed to retrieve device information
[rviz2-1] libGL error: MESA-LOADER: failed to open amdgpu: /usr/lib/dri/amdgpu_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
[rviz2-1] libGL error: failed to load driver: amdgpu
[rviz2-1] libGL error: failed to open /dev/dri/card0: No such file or directory
[rviz2-1] libGL error: failed to load driver: radeonsi
[rviz2-1] libGL error: MESA-LOADER: failed to retrieve device information
[rviz2-1] libGL error: MESA-LOADER: failed to open amdgpu: /usr/lib/dri/amdgpu_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
[rviz2-1] libGL error: failed to load driver: amdgpu
[rviz2-1] libGL error: failed to open /dev/dri/card0: No such file or directory
[rviz2-1] libGL error: failed to load driver: radeonsi
[rviz2-1] [INFO] [1666605976.961126532] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1666605976.961219976] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rviz2-1] [INFO] [1666605977.008845320] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] Parsing robot urdf xml string.
[rviz2-1] Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[rviz2-1]          at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp
[rviz2-1] Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[rviz2-1]          at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp
[rviz2-1] Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist

**Desktop (please complete the following information):**
 - OS: 6.0.2-arch1-1
 - Browser Firefox

**Additional context**
Add any other context about the problem here.
xkhainguyen commented 1 year ago

How do you solve this problem? I definitely changed my map path in to "/home/username/sim_ws..." @thedevmanek @hzheng40

thedevmanek commented 1 year ago

How do you solve this problem?

I definitely changed my map path in to "/home/username/sim_ws..."

@thedevmanek @hzheng40

In my case, f1tenth_ros_gym was not mounted correctly.

Toefinder commented 1 year ago

How do you solve this problem? I definitely changed my map path in to "/home/username/sim_ws..." @thedevmanek @hzheng40

In my case, f1tenth_ros_gym was not mounted correctly.

@thedevmanek can you elaborate? I'm having this very same issue

xkhainguyen commented 1 year ago

If you use Docker, you don't need to modify that path @Toefinder

thedevmanek commented 1 year ago

If you use Docker, you don't need to modify that path @Toefinder

Correct while running rocker the . : represents location mapping so just gotta make sure that one inserts right path.