Skip to content

Commit

Permalink
Docker layer swap joy message
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz committed Jun 22, 2017
1 parent b9f1532 commit 78f63de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu `lsb_release -cs`
ros-kinetic-joy \
&& apt-get clean

RUN wget -P /tmp/ https://bitbucket.org/osrf/gazebo_models/get/default.tar.gz \
&& mkdir -p $HOME/.gazebo/models \
&& tar -xvf /tmp/default.tar.gz -C $HOME/.gazebo/models --strip 1 \
&& rm /tmp/default.tar.gz

RUN mkdir -p /tmp/workspace/src
COPY prius_description /tmp/workspace/src/prius_description
Expand All @@ -35,10 +39,4 @@ RUN /bin/bash -c 'cd /tmp/workspace \

RUN rosdep update

RUN wget -P /tmp/ https://bitbucket.org/osrf/gazebo_models/get/default.tar.gz \
&& mkdir -p $HOME/.gazebo/models \
&& tar -xvf /tmp/default.tar.gz -C $HOME/.gazebo/models --strip 1 \
&& rm /tmp/default.tar.gz


CMD ["/bin/bash", "-c", "source /opt/ros/kinetic/setup.bash && source /tmp/workspace/devel/setup.bash && roslaunch prius_description gazebo.launch"]
8 changes: 4 additions & 4 deletions prius_plugin/nodes/joystick_translator
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class Translator:
command.throttle = 0.0

if message.buttons[3]:
command.shift_gears = Joy.FORWARD
command.shift_gears = Control.FORWARD
elif message.buttons[1]:
command.shift_gears = Joy.NEUTRAL
command.shift_gears = Control.NEUTRAL
elif message.buttons[0]:
command.shift_gears = Joy.REVERSE
command.shift_gears = Control.REVERSE
else:
command.shift_gears = Joy.NO_COMMAND
command.shift_gears = Control.NO_COMMAND

command.steer = message.axes[STEERING_AXIS]
self.last_published = message
Expand Down

0 comments on commit 78f63de

Please sign in to comment.