Fixed file paths

This commit is contained in:
Derek Witcpalek
2020-04-18 17:10:12 -04:00
parent 43909349e2
commit 36f17ee3c4
4 changed files with 8 additions and 6 deletions

View File

@@ -25,14 +25,15 @@ RUN passwd --delete rrrobot
# add to sudo users
RUN usermod -aG sudo rrrobot
# set the entry point
WORKDIR /home/rrrobot
WORKDIR /app/rrrobot_ws
RUN mkdir /home/rrrobot
RUN chown -R rrrobot:rrrobot /home/rrrobot
# Initialize the environment in .bashrc
RUN echo "source /opt/ros/melodic/setup.bash" >> /home/rrrobot/.bashrc
RUN echo "source /usr/share/gazebo/setup.sh" >> /home/rrrobot/.bashrc
RUN echo "export GAZEBO_MODEL_PATH=/home/rrrobot/rrrobot_ws/src/gazebo_models:\$GAZEBO_MODEL_PATH" >> /home/rrrobot/.bashrc
RUN echo "export GAZEBO_PLUGIN_PATH=/opt/ros/melodic/lib:/home/rrrobot/rrrobot_ws/lib:\$GAZEBO_PLUGIN_PATH" >> /home/rrrobot/.bashrc
RUN echo "export GAZEBO_MODEL_PATH=/app/rrrobot_ws/src/gazebo_models:\$GAZEBO_MODEL_PATH" >> /home/rrrobot/.bashrc
RUN echo "export GAZEBO_PLUGIN_PATH=/opt/ros/melodic/lib:/app/rrrobot_ws/lib:\$GAZEBO_PLUGIN_PATH" >> /home/rrrobot/.bashrc
USER rrrobot

View File

@@ -1,2 +0,0 @@
sudo cp world/gear.py /opt/ros/melodic/lib/osrf_gear/gear.py
sudo cp world/gear.world.template /opt/ros/melodic/share/osrf_gear/worlds/gear.world.template

3
rrrobot_ws/src/rrrobot/scripts/rrrobot_run.sh Normal file → Executable file
View File

@@ -1,5 +1,8 @@
#!/bin/bash
sudo cp ../launch/rrrobot.launch /opt/ros/melodic/share/osrf_gear/launch
sudo cp ../../../world/gear.py /opt/ros/melodic/lib/osrf_gear/gear.py
sudo cp ../../../world/gear.world.template /opt/ros/melodic/share/osrf_gear/worlds/gear.world.template
roslaunch osrf_gear rrrobot.launch

View File

@@ -35,7 +35,7 @@ world_dir = os.path.join(rospack.get_path('osrf_gear'), 'worlds')
launch_dir = os.path.join(rospack.get_path('osrf_gear'), 'launch')
template_files = [
#os.path.join(world_dir, 'gear.world.template'),
'/home/rrrobot/rrrobot_ws/world/gear.world.template',
'/app/rrrobot_ws/world/gear.world.template',
os.path.join(launch_dir, 'gear.launch.template'),
os.path.join(launch_dir, 'gear.urdf.xacro.template'),
]