f1tenth / f1tenth_gym_ros

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

Robot model not loading (different from previous issue) #26

Closed michael-shaham closed 1 year ago

michael-shaham commented 1 year ago

There's been an issue with this before, but I believe this is different.

To Reproduce

cd ~/
git clone https://github.com/f1tenth/f1tenth_gym_ros.git
cd f1tenth_gym_ros
docker build --no-cache -t f1tenth_gym_ros -f Dockerfile .
rocker --nvidia --x11 --volume .:/sim_ws/src/f1tenth_gym_ros -- f1tenth_gym_ros
source /opt/ros/foxy/setup.bash
source install/local_setup.bash
ros2 launch f1tenth_gym_ros gym_bridge_launch.py

Expected behavior The robot model does not load for me (reproduced on two different computers, but since we're working in docker containers it shouldn't matter too much). See screenshots of rviz and the error messages below.

Screenshots Robot model not loading: f1tenth_gym_ros_model_not_load

This message repeats forever: f1tenth_gym_ros_repeated_error

But somewhere in the repeated messages, you should see this error: f1tenth_gym_ros_ackermann_error

Temporary fix I fixed this issue by cloning the ros2 branch of ackermann_msgs directly into /sim_ws/src/ and building from source, but seems like a temporary workaround. I haven't had enough time to dig too deep into what might've caused this, though I believe it may be related to some ROS updates, since I could only reproduce the error on another computer after using the --no-cache command when building the docker image.

TristanMoe commented 1 year ago

@michael-shaham any updates on this? I have the same issue, and I have a clean pull from the master branch.

michael-shaham commented 1 year ago

I'm still just using my temporary fix. Still not sure what needs to be done to fix this without cloning ackermann_msgs into the workspace.

hzheng40 commented 1 year ago

Can you try adding apt-get dist-upgrade to the Dockerfile after the apt installs?

michael-shaham commented 1 year ago

Tried in a few different locations (after the tmux install and also after the rosdep install), both times attempting to do just a dist-upgrade and an update first before dist-upgrade and always get the same error:

The command `apt-get dist-upgrade` returned a non-zero code: 1
hzheng40 commented 1 year ago

Did you add -y? The line in Docker file should read RUN apt-get -y dist-upgrade

hzheng40 commented 1 year ago

It seems to fix the issue on my side (the repeating tf buffer warning takes longer to stop when it's run the first time). I'll make a push with the fix.

michael-shaham commented 1 year ago

Yup, worked for me too. Thanks!