Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,5 +419,8 @@
"LUTS",
"nanosec",
"VRLA"
"CPFI",
"BBHI",
"UDP"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def make_configure_mcu(namespace: str, clearpath_config) -> LaunchFile.Process:
[LaunchFile.Variable("FindExecutable(name='ros2')"),
' service call platform/mcu/configure',
' clearpath_platform_msgs/srv/ConfigureMcu',
' \"{{domain_id: {0},'.format(clearpath_config.system.domain_id),
' robot_namespace: \\\'{0}\\\'}}\"'.format(namespace)]
' "{{domain_id: {0},'.format(clearpath_config.system.domain_id),
' robot_namespace: \\\'{0}\\\'}}"'.format(namespace)]
]
)

Expand All @@ -99,6 +99,32 @@ def make_proton_launch(namespace: str, platform: str) -> LaunchFile:
)


def make_firmware_info_node(namespace: str, platform_model: str) -> LaunchFile.Node:
"""Build the node that checks firmware info advertisements against the expected Proton."""
return LaunchFile.Node(
package='clearpath_hardware_interfaces',
executable='firmware_info.py',
name='firmware_info',
namespace=namespace,
parameters=[{
'expected_proton_major': 1,
'expected_proton_minor': 0,
'expected_proton_patch': 1,
'expected_platform_id': {
'w200': 0,
'dd100': 1,
'dd150': 1,
'do100': 1,
'do150': 1,
'r100': 2,
'a300': 3,
'j100': 4,
}.get(platform_model, -1),
'firmware_info_timeout_sec': 3.0,
}],
)


# ---------------------------------------------------------------------------
# IMU / GPS
# ---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def get_mcu_components(self) -> list:
components.append(nodes.make_configure_mcu(namespace, cfg))
elif mcu.protocol == mcu.PROTON:
if self.PROTON_PLATFORM is not None:
if self.PROTON_PLATFORM != 'j100':
components.append(
nodes.make_firmware_info_node(namespace, self.platform_model))
components.append(nodes.make_proton_launch(namespace, self.PROTON_PLATFORM))
return components

Expand Down
5 changes: 5 additions & 0 deletions clearpath_hardware_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ install(
DESTINATION share/${PROJECT_NAME}
)

install(PROGRAMS
${PROJECT_NAME}/firmware_info/firmware_info.py
DESTINATION lib/${PROJECT_NAME}
)

## EXPORTS
ament_export_include_directories(
include
Expand Down
Loading
Loading