f1tenth / f1tenth_gym_ros

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

Dockerfile incompatible with f1tenth_gym python branch #14

Closed travelbureau closed 2 years ago

travelbureau commented 3 years ago

Describe the bug The Dockerfile looks for a cmakelists in order to build the c++ components of the old f1tenth_gym implementation; however, the git clone op in build_docker pulls the new python branch.

To Reproduce Steps to reproduce the behavior:

  1. Clone this repo
  2. cd to this repo
  3. Run: ./build_docker.sh
  4. See error

Expected behavior builder_docker.sh runs successfully.

Desktop (please complete the following information):

Additional context The solution is either to clone the old c++ branch in build_docker or confirm that the interface is compatible with the new code and remove from the Dockerfile:

RUN cd f1tenth_gym && \
    mkdir build && \
    cd build && \
    cmake .. && \
    make

and possibly:

    cp ./build/sim_requests_pb2.py ./gym/ && \
andreabernard commented 3 years ago

I solved the problem with a workaround. I have changed the contents of the build_docker.sh file with the following lines:

#!/bin/bash
if [ ! -d f1tenth_gym ] ; then
    git clone https://github.com/f1tenth/f1tenth_gym
    cd f1tenth_gym
    git checkout cpp_backend_archive
    cd ../
else
    echo f1tenth_gym exists, not cloning.
fi
docker build -t f1tenth_gym -f Dockerfile .

Hope help you.

hzheng40 commented 2 years ago

Ported to ros2 and the python version of f1tenth_gym.