Skip to content

Commit

Permalink
modify for f1tenth sim
Browse files Browse the repository at this point in the history
  • Loading branch information
VishGit1234 committed Jan 15, 2025
1 parent e634e1a commit 59aee96
Show file tree
Hide file tree
Showing 16 changed files with 115 additions and 1,371 deletions.
58 changes: 0 additions & 58 deletions docker/gazebo/gazeboserver.Dockerfile

This file was deleted.

57 changes: 57 additions & 0 deletions docker/sim/sim.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# MIT License

# Copyright (c) 2020 Hongrui Zheng

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

FROM ros:foxy

SHELL ["/bin/bash", "-c"]

# dependencies
RUN apt-get update --fix-missing && \
apt-get install -y git \
nano \
vim \
python3-pip \
libeigen3-dev \
tmux \
ros-foxy-rviz2
RUN apt-get -y dist-upgrade
RUN pip3 install transforms3d

# f1tenth gym
RUN git clone https://github.com/f1tenth/f1tenth_gym
RUN cd f1tenth_gym && \
pip3 install -e .

# Clone source code
WORKDIR /sim_ws/src
RUN git clone https://github.com/f1tenth/f1tenth_gym_ros.git
WORKDIR /sim_ws/src/f1tenth_gym_ros
RUN source /opt/ros/foxy/setup.bash && \
cd /sim_ws/ && \
apt-get update --fix-missing && \
rosdep install -i --from-path src --rosdistro foxy -y && \
colcon build

WORKDIR /sim_ws
# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash
COPY docker/sim/sim_ros_entrypoint.sh /sim_ws/sim_ros_entrypoint.sh
ENTRYPOINT ["./sim_ros_entrypoint.sh"]
7 changes: 7 additions & 0 deletions docker/sim/sim_ros_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

# setup ROS2 environment
source /opt/ros/foxy/setup.bash
source install/local_setup.bash
exec "$@"
Empty file modified docker/wato_ros_entrypoint.sh
100644 → 100755
Empty file.
19 changes: 0 additions & 19 deletions modules/docker-compose.gazebo.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions modules/docker-compose.sim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
sim:
build:
context: ..
dockerfile: docker/sim/sim.Dockerfile
# cache_from:
# - "${GAZEBO_SERVER_IMAGE:?}:${TAG}"
# - "${GAZEBO_SERVER_IMAGE:?}:main"
# args:
# BASE_IMAGE: ${BASE_IMAGE_OVERRIDE-}
# image: "${GAZEBO_SERVER_IMAGE:?}:${TAG}"
image: f1tenth:latest
# ports:
# - "${GAZEBO_PORT:?}:9002"
profiles: [deploy, develop]
command: /bin/bash -c "ros2 launch f1tenth_gym_ros gym_bridge_launch.py"
# tty: true
# command: /bin/bash
9 changes: 0 additions & 9 deletions src/gazebo/CMakeLists.txt

This file was deleted.

210 changes: 0 additions & 210 deletions src/gazebo/launch/env.urdf

This file was deleted.

Loading

0 comments on commit 59aee96

Please sign in to comment.