f1tenth / f1tenth_gym_ros

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

robot doesnt appear on ubuntu20.04 foxy #44

Open Jixyuxn opened 2 months ago

Jixyuxn commented 2 months ago

Screenshot from 2024-07-01 16-00-17

robot doesnt appear. i already do rebuild and any solution on this repo(issue) anyone can help me?

AkshayLaddha943 commented 2 months 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.

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']
        ),
    ]
seominseok00 commented 2 months ago

Thankyou for helping @AkshayLaddha943, you mean just add that lines in launch file above # finalize ? I follow your lines and add "ld.add_action(static_transform_publishers)", but it appears attributeerror. or is there any other things you did?