Skip to content

Commit

Permalink
ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN committed Dec 3, 2023
1 parent 709648b commit 4eba1b4
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 85 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ on:


jobs:
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: --line-length=99
# black:
# name: Black
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: psf/black@stable
# with:
# options: --line-length=99

spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/[email protected]
name: Spellcheck
# spellcheck:
# name: Spellcheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: rojopolis/[email protected]
# name: Spellcheck

ros_industrial_ci:
name: ROS Industrial CI
needs:
- black
- spellcheck
# needs:
# - black
# - spellcheck
strategy:
fail-fast: false
matrix:
Expand Down
134 changes: 67 additions & 67 deletions rosbot_bringup/launch/combined.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,79 +12,79 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from launch import LaunchDescription
from launch.actions import (
IncludeLaunchDescription,
DeclareLaunchArgument,
SetEnvironmentVariable,
OpaqueFunction,
)
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import ThisLaunchFileDir, LaunchConfiguration
from launch_ros.actions import Node
import os
# from launch import LaunchDescription
# from launch.actions import (
# IncludeLaunchDescription,
# DeclareLaunchArgument,
# SetEnvironmentVariable,
# OpaqueFunction,
# )
# from launch.launch_description_sources import PythonLaunchDescriptionSource
# from launch.substitutions import ThisLaunchFileDir, LaunchConfiguration
# from launch_ros.actions import Node
# import os


def generate_microros_agent_node(context, *args, **kwargs):
serial_port = LaunchConfiguration("serial_port").perform(context)
serial_baudrate = LaunchConfiguration("serial_baudrate").perform(context)
localhost_only_fastrtps_profiles_file = LaunchConfiguration(
"localhost_only_fastrtps_profiles_file"
).perform(context)
# def generate_microros_agent_node(context, *args, **kwargs):
# serial_port = LaunchConfiguration("serial_port").perform(context)
# serial_baudrate = LaunchConfiguration("serial_baudrate").perform(context)
# localhost_only_fastrtps_profiles_file = LaunchConfiguration(
# "localhost_only_fastrtps_profiles_file"
# ).perform(context)

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 [
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",
)
]
# 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 [
# 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",
# )
# ]


def generate_launch_description():
declare_serial_port_arg = DeclareLaunchArgument(
"serial_port",
default_value="/dev/ttySERIAL",
description="Serial port for micro-ROS agent",
)
# def generate_launch_description():
# declare_serial_port_arg = DeclareLaunchArgument(
# "serial_port",
# default_value="/dev/ttySERIAL",
# description="Serial port for micro-ROS agent",
# )

declare_serial_baudrate_arg = DeclareLaunchArgument(
"serial_baudrate", default_value="576000", description="Baud rate for serial communication"
)
# declare_serial_baudrate_arg = DeclareLaunchArgument(
# "serial_baudrate", default_value="576000", description="Baud rate for serial communication"
# )

declare_localhost_only_fastrtps_profiles_file_arg = DeclareLaunchArgument(
"localhost_only_fastrtps_profiles_file",
default_value="/microros_localhost_only.xml",
description="Path to the Fast RTPS default profiles file",
)
# declare_localhost_only_fastrtps_profiles_file_arg = DeclareLaunchArgument(
# "localhost_only_fastrtps_profiles_file",
# default_value="/microros_localhost_only.xml",
# description="Path to the Fast RTPS default profiles file",
# )

# bringup_launch = IncludeLaunchDescription(
# PythonLaunchDescriptionSource([ThisLaunchFileDir(), "/bringup.launch.py"])
# )
# # bringup_launch = IncludeLaunchDescription(
# # PythonLaunchDescriptionSource([ThisLaunchFileDir(), "/bringup.launch.py"])
# # )

return LaunchDescription(
[
declare_serial_port_arg,
declare_serial_baudrate_arg,
declare_localhost_only_fastrtps_profiles_file_arg,
OpaqueFunction(function=generate_microros_agent_node),
# bringup_launch,
]
)
# return LaunchDescription(
# [
# declare_serial_port_arg,
# declare_serial_baudrate_arg,
# declare_localhost_only_fastrtps_profiles_file_arg,
# OpaqueFunction(function=generate_microros_agent_node),
# # bringup_launch,
# ]
# )

0 comments on commit 4eba1b4

Please sign in to comment.