f1tenth / f1tenth_gym_ros

Containerized ROS communication bridge for F1TENTH gym environment.
MIT License
153 stars 103 forks source link

Invalid frame ID "map" passed to canTransform #43

Open gurselturkeri opened 2 months ago

gurselturkeri commented 2 months ago

I have installed all dependencies but when I launch the file I get an error. How can I solve that?

[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.14/src/buffer_core.cpp

Screenshot from 2024-06-15 00-12-08

sahil-chaudhary commented 2 months ago

Hey @gurselturkeri , I am suffering from same problem. Were you able to solve the problem? Screenshot_20240629_083746 Screenshot_20240629_083746

AkshayLaddha943 commented 1 month ago

I had the same issue in Ubuntu 20.04, I changed the launch file and added static_transform_publisher from robot frame to map, then the robot appeared fully.

I added the following lines inside the launch file -

    static_transform_publishers = [
    Node(
        package='tf2_ros',
        executable='static_transform_publisher',
        name='static_tf_pub',
        arguments=['0', '0', '0', '0', '0', '0', 'map', 'ego_racecar/base_link']
    ),
        Node(
            package='tf2_ros',
            executable='static_transform_publisher',
            name='static_tf_pub_base_to_front_left_wheel',
            arguments=['-0.5', '0.5', '0', '0', '0', '0', 'map', 'ego_racecar/front_left_wheel']
        ),
        Node(
            package='tf2_ros',
            executable='static_transform_publisher',
            name='static_tf_pub_base_to_front_right_wheel',
            arguments=['-0.5', '-0.5', '0', '0', '0', '0', 'map', 'ego_racecar/front_right_wheel']
        ),
    ]