-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
152 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
services: | ||
|
||
rosbot: | ||
build: | ||
context: ../ | ||
dockerfile: Dockerfile.hardware | ||
devices: | ||
- ${SERIAL_PORT:?err} | ||
environment: | ||
- ROS_DOMAIN_ID=123 | ||
- ROS_LOCALHOST_ONLY=1 | ||
command: > | ||
ros2 launch rosbot_bringup combined.launch.py | ||
mecanum:=${MECANUM:-False} | ||
serial_port:=$SERIAL_PORT | ||
serial_baudrate:=576000 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
services: | ||
|
||
rosbot: | ||
build: | ||
context: ../../ | ||
dockerfile: Dockerfile.hardware | ||
network_mode: host | ||
ipc: host | ||
devices: | ||
- ${SERIAL_PORT:?err} | ||
environment: | ||
- FASTRTPS_DEFAULT_PROFILES_FILE=/shm-only.xml | ||
command: > | ||
ros2 launch rosbot_bringup combined.launch.py | ||
mecanum:=${MECANUM:-False} | ||
serial_port:=$SERIAL_PORT | ||
serial_baudrate:=576000 | ||
namespace:=robot1 | ||
ros2router: | ||
image: husarnet/ros2router:release-1.4.0 | ||
network_mode: host | ||
ipc: host | ||
volumes: | ||
- ./filter.yaml:/filter.yaml | ||
environment: | ||
- USE_HUSARNET=FALSE | ||
- ROS_LOCALHOST_ONLY=1 | ||
- ROS_DISTRO | ||
|
||
# 1. run `docker-compose up` on the robot | ||
# 2. On the second host in LAN you will see only single ros2 topic: | ||
# $ ros2 topic list | ||
# /parameter_events | ||
# /robot1/cmd_vel | ||
# /rosout | ||
# 3. You can use teleop_twist_keyboard to control the robot in robot1 namespace: | ||
# `ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/robot1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
allowlist: | ||
- name: "rt/robot1/cmd_vel" | ||
type: "geometry_msgs::msg::dds_::Twist_" | ||
blocklist: [] | ||
builtin-topics: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!--The only purpose of this file is to disable | ||
Fast-DDS SHM transport used by default to use UDPv4--> | ||
<dds> | ||
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles"> | ||
<transport_descriptors> | ||
<transport_descriptor> | ||
<transport_id>CustomUdpTransport</transport_id> | ||
<type>UDPv4</type> | ||
<interfaceWhiteList> | ||
<address>127.0.0.1</address> | ||
</interfaceWhiteList> | ||
</transport_descriptor> | ||
</transport_descriptors> | ||
|
||
<participant profile_name="participant_profile" is_default_profile="true"> | ||
<rtps> | ||
<userTransports> | ||
<transport_id>CustomUdpTransport</transport_id> | ||
</userTransports> | ||
|
||
<useBuiltinTransports>false</useBuiltinTransports> | ||
</rtps> | ||
</participant> | ||
</profiles> | ||
</dds> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
output=$(husarnet-dds singleshot) || true | ||
if [[ "$HUSARNET_DDS_DEBUG" == "TRUE" ]]; then | ||
echo "$output" | ||
fi | ||
|
||
# Check if XRCE_DOMAIN_ID_OVERRIDE is unset or empty | ||
if [ -z "$XRCE_DOMAIN_ID_OVERRIDE" ]; then | ||
# If ROS_DOMAIN_ID is set and not empty, set XRCE_DOMAIN_ID_OVERRIDE to its value | ||
if [ -n "$ROS_DOMAIN_ID" ]; then | ||
export XRCE_DOMAIN_ID_OVERRIDE="$ROS_DOMAIN_ID" | ||
fi | ||
fi | ||
|
||
# setup ros environment | ||
source "/opt/ros/$ROS_DISTRO/setup.bash" | ||
source "/ros2_ws/install/setup.bash" | ||
source "/ros2_ws_microros_agent/install/setup.bash" | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
output=$(husarnet-dds singleshot) || true | ||
if [[ "$HUSARNET_DDS_DEBUG" == "TRUE" ]]; then | ||
echo "$output" | ||
fi | ||
|
||
# Check if XRCE_DOMAIN_ID_OVERRIDE is unset or empty | ||
if [ -z "$XRCE_DOMAIN_ID_OVERRIDE" ]; then | ||
# If ROS_DOMAIN_ID is set and not empty, set XRCE_DOMAIN_ID_OVERRIDE to its value | ||
if [ -n "$ROS_DOMAIN_ID" ]; then | ||
export XRCE_DOMAIN_ID_OVERRIDE="$ROS_DOMAIN_ID" | ||
fi | ||
fi | ||
|
||
# setup ros environment | ||
source "/opt/vulcanexus/$ROS_DISTRO/setup.bash" | ||
source "/ros2_ws/install/setup.bash" | ||
source "/ros2_ws_microros_agent/install/setup.bash" | ||
|
||
exec "$@" |