From 27026bf064602b31cfece42ea2b339a8948576b8 Mon Sep 17 00:00:00 2001 From: Matas Keras Date: Tue, 4 Jul 2023 14:37:54 -0400 Subject: [PATCH] launches automatically --- Docker_PX4/Dockerfile | 2 +- compose.yaml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Docker_PX4/Dockerfile b/Docker_PX4/Dockerfile index 8812fb1..8c4e3d7 100644 --- a/Docker_PX4/Dockerfile +++ b/Docker_PX4/Dockerfile @@ -384,7 +384,7 @@ RUN echo "arrow" | sudo -S apt install ros-melodic-tf2-geometry-msgs #RUN rosdep update #RUN cd ~/catkin_ws && catkin config --extend /opt/ros/melodic #RUN source ~/catkin_ws/deve/setup.bash -RUN cd ~/catkin_ws && catkin build +#RUN cd ~/catkin_ws && catkin build RUN bash ~/catkin_ws/src/oscillation_ctrl/px4_setup/ubuntu_sim_ros_melodic.sh #RUN git config --global --add safe.directory /home/arrow/Firmware RUN cd ~/PX4-Autopilot && DONT_RUN=1 make px4_sitl_default gazebo diff --git a/compose.yaml b/compose.yaml index f5b26e6..a78a9c7 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,7 +1,12 @@ services: px4: build: Docker_PX4 - command: bash + command: bash -c "source /opt/ros/melodic/setup.bash && + source /home/arrow/catkin_ws/devel/setup.bash && + source home/arrow/PX4-Autopilot/Tools/simulation/gazebo-classic/setup_gazebo.bash home/arrow/PX4-Autopilot/ home/arrow/PX4-Autopilot//build/px4_sitl_default && + export ROS_PACKAGE_PATH=/home/arrow/catkin_ws/src/oscillation_ctrl:/opt/ros/melodic/share:/home/arrow/PX4-Autopilot:/home/arrow/PX4-Autopilot/Tools/sitl_gazebo:/home/arrow/PX4-Autopilot:/home/arrow/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic && + + roslaunch px4 multi_uav_mavros_sitl.launch" tty: true privileged: true volumes: @@ -20,4 +25,4 @@ services: # # capabilities: [gpu] - +