-
Notifications
You must be signed in to change notification settings - Fork 683
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
feat: add control launch xml #2832
Conversation
3b74e93
to
a04032b
Compare
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
a04032b
to
3de16e8
Compare
<!-- external cmd selector --> | ||
<composable_node pkg="external_cmd_selector" plugin="ExternalCmdSelector" name="external_cmd_selector"> | ||
<remap from="~/service/select_external_command" to="~/select_external_command"/> | ||
<remap from="~/input/local/control_cmd" to="/api/external/set/command/local/control"/> | ||
<remap from="~/input/local/shift_cmd" to="/api/external/set/command/local/shift"/> | ||
<remap from="~/input/local/turn_signal_cmd" to="/api/external/set/command/local/turn_signal"/> | ||
<remap from="~/input/local/heartbeat" to="/api/external/set/command/local/heartbeat"/> | ||
<remap from="~/input/remote/control_cmd" to="/api/external/set/command/remote/control"/> | ||
<remap from="~/input/remote/shift_cmd" to="/api/external/set/command/remote/shift"/> | ||
<remap from="~/input/remote/turn_signal_cmd" to="/api/external/set/command/remote/turn_signal"/> | ||
<remap from="~/input/remote/heartbeat" to="/api/external/set/command/remote/heartbeat"/> | ||
<remap from="~/output/control_cmd" to="/external/selected/external_control_cmd"/> | ||
<remap from="~/output/gear_cmd" to="/external/selected/gear_cmd"/> | ||
<remap from="~/output/turn_indicators_cmd" to="/external/selected/turn_indicators_cmd"/> | ||
<remap from="~/output/hazard_lights_cmd" to="/external/selected/hazard_lights_cmd"/> | ||
<remap from="~/output/heartbeat" to="/external/selected/heartbeat"/> | ||
<remap from="~/output/current_selector_mode" to="~/current_selector_mode"/> | ||
<param from="$(var external_cmd_selector_param_path)"/> | ||
<extra_arg name="use_intra_process_comms" value="$(var use_intra_process)"/> | ||
</composable_node> | ||
|
||
<!-- external cmd converter --> | ||
<composable_node pkg="external_cmd_converter" plugin="external_cmd_converter::ExternalCmdConverterNode" name="external_cmd_converter"> | ||
<param from="in/external_control_cmd" to="/external/selected/external_control_cmd"/> | ||
<param from="in/shift_cmd" to="/external/selected/gear_cmd"/> | ||
<param from="in/emergency_stop" to="/external/selected/heartbeat"/> | ||
<param from="in/current_gate_mode" to="/control/current_gate_mode"/> | ||
<param from="in/odometry" to="/localization/kinematic_state"/> | ||
<param from="out/control_cmd" to="/external/selected/control_cmd"/> | ||
<param from="out/latest_external_control_cmd" to="/api/external/get/command/selected/control"/> | ||
<param name="csv_path_accel_map" value="$(find-pkg-share raw_vehicle_cmd_converter)/data/default/accel_map.csv"/> | ||
<param name="csv_path_brake_map" value="$(find-pkg-share raw_vehicle_cmd_converter)/data/default/brake_map.csv"/> | ||
<param name="ref_vel_gain" value="3.0"/> | ||
<param name="wait_for_first_topic" value="true"/> | ||
<param name="control_command_timeout" value="1.0"/> | ||
<param name="emergency_stop_timeout" value="3.0"/> | ||
<extra_arg name="use_intra_process_comms" value="$(var use_intra_process)"/> | ||
</composable_node> | ||
</node_container> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Question] Why did you change here from IncludeLaunchDescription
?
autoware.universe/launch/tier4_control_launch/launch/control.launch.py
Lines 199 to 223 in 0324e05
# external cmd selector | |
external_cmd_selector_loader = IncludeLaunchDescription( | |
PythonLaunchDescriptionSource( | |
[FindPackageShare("external_cmd_selector"), "/launch/external_cmd_selector.launch.py"] | |
), | |
launch_arguments=[ | |
("use_intra_process", LaunchConfiguration("use_intra_process")), | |
("target_container", "/control/control_container"), | |
( | |
"external_cmd_selector_param_path", | |
LaunchConfiguration("external_cmd_selector_param_path"), | |
), | |
], | |
) | |
# external cmd converter | |
external_cmd_converter_loader = IncludeLaunchDescription( | |
PythonLaunchDescriptionSource( | |
[FindPackageShare("external_cmd_converter"), "/launch/external_cmd_converter.launch.py"] | |
), | |
launch_arguments=[ | |
("use_intra_process", LaunchConfiguration("use_intra_process")), | |
("target_container", "/control/control_container"), | |
], | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's more straightforward to write all the contents in xml, I think. There is only one load_composable_nodes
in external_cmd_converter/selector python launch file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay to replace it here. (It would be ideal to do it in another PR, though.)
Then, don't you need to remove the old .py
files of external_cmd_converter/selector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff looks good to me. If scenario tests pass, I think it's okay.
This pull request has been automatically marked as stale because it has not had recent activity. |
Description
add control xml launch to simplify launch.
Related links
Tests performed
Notes for reviewers
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.