Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpolzin committed Nov 29, 2023
1 parent e4ee8c9 commit bca1a7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ COPY ros_as5048b src/.

RUN . /opt/ros/${ROS_DISTRO}/setup.sh && colcon build --symlink-install --event-handlers console_direct+

RUN echo 'alias build="colcon build --symlink-install --event-handlers console_direct+"' >> /etc/bash.bashrc
RUN echo 'source /colcon_ws/install/setup.bash; ros2 run ros_as5048b ros_as5048b_publisher --ros-args -p i2c_device:=${I2C_DEVICE} -p i2c_address:=${I2C_ADDRESS}' >> /run.sh && chmod +x /run.sh
RUN echo 'alias run="su - ros --whitelist-environment=\"I2C_DEVICE,I2C_ADDRESS\" /run.sh"' >> /etc/bash.bashrc

RUN echo 'alias build="colcon build --symlink-install --event-handlers console_direct+"' >> /etc/bash.bashrc && \
echo 'source /colcon_ws/install/setup.bash; ros2 run ros_as5048b ros_as5048b_publisher --ros-args -p i2c_device:=${I2C_DEVICE} -p i2c_address:=${I2C_ADDRESS}' >> /run.sh && chmod +x /run.sh && \
echo 'alias run="su - ros --whitelist-environment=\"I2C_DEVICE,I2C_ADDRESS\" /run.sh"' >> /etc/bash.bashrc
6 changes: 5 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ docker run -it --rm \
--device=/dev/i2c-1 \
--env I2C_DEVICE=1 \
--env I2C_ADDRESS=0x40 \
--volume ./ros_as5048:/colcon_ws/src/ros_as5048 \
-v /dev:/dev \
ghcr.io/rosblox/${REPOSITORY_NAME}:humble



#--volume ./ros_as5048b:/colcon_ws/src/ros_as5048b \

0 comments on commit bca1a7e

Please sign in to comment.