Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN committed Dec 5, 2023
1 parent 11d821b commit 1e7b908
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
cp -r src/ros2_controllers/diff_drive_controller src/
cp -r src/ros2_controllers/imu_sensor_broadcaster src/
rm -rf src/ros2_controllers
rm -rf src/rosbot_bringup
- name: Running ROS Industrial CI
uses: ros-industrial/industrial_ci@master
Expand Down
50 changes: 33 additions & 17 deletions rosbot_bringup/launch/combined.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@


def generate_microros_agent_node(context, *args, **kwargs):
# Additional environment variable setup actions
env_setup_actions = []

# Check if ROS_DOMAIN_ID is set and not empty
ros_domain_id = os.environ.get("ROS_DOMAIN_ID")
if ros_domain_id:
env_setup_actions.append(
SetEnvironmentVariable(
name="XRCE_DOMAIN_ID_OVERRIDE",
value=ros_domain_id
)
)

serial_port = LaunchConfiguration("serial_port").perform(context)
serial_baudrate = LaunchConfiguration("serial_baudrate").perform(context)
localhost_only_fastrtps_profiles_file = LaunchConfiguration(
Expand All @@ -35,27 +48,30 @@ def generate_microros_agent_node(context, *args, **kwargs):
if os.environ.get("ROS_LOCALHOST_ONLY") == "1":
# with localhost only setup fastdds is required with a custom config
rmw_implementation = "rmw_fastrtps_cpp"
return [
env_setup_actions.extend([
SetEnvironmentVariable(name="RMW_IMPLEMENTATION", value=rmw_implementation),
SetEnvironmentVariable(
name="FASTRTPS_DEFAULT_PROFILES_FILE", value=localhost_only_fastrtps_profiles_file
),
Node(
package="micro_ros_agent",
executable="micro_ros_agent",
arguments=["serial", "-D", serial_port, "-b", serial_baudrate],
output="screen",
),
]
else:
return [
Node(
package="micro_ros_agent",
executable="micro_ros_agent",
arguments=["serial", "-D", serial_port, "-b", serial_baudrate],
output="screen",
)
]
])

microros_agent_node = Node(
package="micro_ros_agent",
executable="micro_ros_agent",
arguments=["serial", "-D", serial_port, "-b", serial_baudrate],
output="screen",
)

return env_setup_actions + [microros_agent_node]
else:
microros_agent_node = Node(
package="micro_ros_agent",
executable="micro_ros_agent",
arguments=["serial", "-D", serial_port, "-b", serial_baudrate],
output="screen",
)

return env_setup_actions + [microros_agent_node]


def generate_launch_description():
Expand Down

0 comments on commit 1e7b908

Please sign in to comment.