Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using new husarnet/ros image with a better support for SHM host<>docker communication #45

Merged
merged 10 commits into from
Jan 4, 2024

Conversation

DominikN
Copy link
Member

@DominikN DominikN commented Dec 29, 2023

  1. Using a new husarnet/ros base image with a new ros_entrypoint.sh template:
#!/bin/bash
set -e

output=$(husarnet-dds singleshot) || true
if [[ "$HUSARNET_DDS_DEBUG" == "TRUE" ]]; then
  echo "$output"
fi

# setup ros environment
source "/opt/ros/$ROS_DISTRO/setup.bash"
test -f "/ros2_ws/install/setup.bash" && source "/ros2_ws/install/setup.bash"

if [ -z "$USER" ]; then
    export USER=root
elif ! id "$USER" &>/dev/null; then
    useradd -ms /bin/bash "$USER"
fi

# <additional-user-commands>

if [ $# -eq 0 ]; then
    exec gosu $USER /bin/bash
else
    exec gosu $USER "$@"
fi

This template allows running the container as a different user (specified with USER env). Thanks to that the shm communication setup between the container and a host is simpler. # <additional-user-commands> allows you to easily inject e.g. the lauching of the ROS 2 node for healthcheck bringup (as in this PR).

  1. Using a new rosbot_ros ROS 2 package (v0.12.0) with a firmware providing the hardware STM32 CPU ID over the /get_cpu_id service. Moreover this firmware introduces the new mechanism of selecting the serial interface over which it's trying to reach the Micro ROS Agent (FTDI or SBC pinout)

@DominikN DominikN merged commit 6a9bdf5 into ros2 Jan 4, 2024
@DominikN DominikN deleted the shm-simple-test branch January 4, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant