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

Add A300 to supported platforms #63

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Changes from 2 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
53 changes: 18 additions & 35 deletions clearpath_generator_gz/clearpath_generator_gz/launch/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,66 +149,49 @@ def __init__(self, setup_path: str = '/etc/clearpath/') -> None:
}]
)

# Common components for all platforms
self.common_platform_components = [
self.cmd_vel_node,
self.odom_base_node
]

# Components required for each platform
self.platform_components = {
Platform.J100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.J100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
self.gps_0_bridge_node,
],
Platform.A200: [
self.cmd_vel_node,
self.odom_base_node,
],
Platform.A300: [
self.cmd_vel_node,
self.odom_base_node,
],
Platform.DD100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.A200: self.common_platform_components,
Platform.A300: self.common_platform_components,
Platform.DD100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.DD150: [
self.cmd_vel_node,
self.odom_base_node,
self.imu_0_bridge_node,
Platform.DD150: self.common_platform_components + [
self.imu_0_bidge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.DO100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.DO100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.DO150: [
self.cmd_vel_node,
self.odom_base_node,
Platform.DO150: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.GENERIC: [
self.cmd_vel_node,
self.odom_base_node,
],
Platform.R100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.GENERIC: self.common_platform_components,
Platform.R100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.W200: [
self.cmd_vel_node,
self.odom_base_node,
Platform.W200: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
Expand Down Expand Up @@ -237,7 +220,7 @@ def generate_platform(self) -> None:
platform_service_launch_writer.add_launch_file(self.platform_launch_file)

# Platform components
for component in self.platform_components[self.platform_model]:
for component in self.latform_components[self.platform_model]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...how did that not trigger an error when i tested it? now i have so many questions about what's wrong with my environment. that's alarming...

platform_service_launch_writer.add(component)

platform_service_launch_writer.generate_file()
Expand Down