Skip to content

moveit_controller_manager.launch: pass execution_type via pass_all_args#2928

Merged
v4hn merged 2 commits intomoveit:masterfrom
ubi-agni:improve-msa
Oct 22, 2021
Merged

moveit_controller_manager.launch: pass execution_type via pass_all_args#2928
v4hn merged 2 commits intomoveit:masterfrom
ubi-agni:improve-msa

Conversation

@rhaschke
Copy link
Copy Markdown
Contributor

While we need to pass execution_type to fake_moveit_controller_manager.launch, the controller_manager.launch files of real robots shouldn't be required to define this argument. However, if they don't, roslaunch fails with an unused args exception.
Passing the argument via pass_all_args="true" should solve that issue.
Fixes #2786.

…gs="true"

While we need to pass execution_type to fake_moveit_controller_manager.launch,
the controller_manager.launch files of real-robot shouldn't be required
to define this argument. However, if they don't roslaunch fails with an
`unused args` exception (see moveit#2786).
Passing arguments via pass_all_args should solve that issue.
@marioney
Copy link
Copy Markdown

While we need to pass execution_type to fake_moveit_controller_manager.launch

I think it's not even used in the fake_moveit_controller_manager.launch, the argument is declared there but it's not used.

Also if the argument is removed in trajectory_execution.launch.xml I guess we can also remove it in the robot specific controller manager https://github.com/ros-planning/moveit/blob/e763f768e3cd252ecb933a26678c95d718de37ba/moveit_setup_assistant/templates/moveit_config_pkg_template/launch/moveit_controller_manager.launch.xml#L4

Copy link
Copy Markdown
Contributor

@v4hn v4hn left a 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 not even used in the fake_moveit_controller_manager.launch, the argument is declared there but it's not used.

It's not used in the launch file, but meant to be used in substitutions in the loaded yaml file.

@rhaschke It's a nice trick I would not have thought of, but please add a comment above the include that explains why you pass all (some unnecessary) parameters.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 22, 2021

Codecov Report

Merging #2928 (e763f76) into master (f3ac607) will increase coverage by 0.02%.
The diff coverage is n/a.

❗ Current head e763f76 differs from pull request most recent head 6453670. Consider uploading reports for the commit 6453670 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2928      +/-   ##
==========================================
+ Coverage   61.33%   61.34%   +0.02%     
==========================================
  Files         373      373              
  Lines       31766    31766              
==========================================
+ Hits        19479    19485       +6     
+ Misses      12287    12281       -6     
Impacted Files Coverage Δ
...nning_scene_monitor/src/planning_scene_monitor.cpp 68.27% <0.00%> (+0.14%) ⬆️
...dl_kinematics_plugin/src/kdl_kinematics_plugin.cpp 78.25% <0.00%> (+0.39%) ⬆️
...on/pick_place/src/approach_and_translate_stage.cpp 74.03% <0.00%> (+0.65%) ⬆️
...meterization/work_space/pose_model_state_space.cpp 83.02% <0.00%> (+1.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3ac607...6453670. Read the comment docs.

@rhaschke rhaschke mentioned this pull request Oct 22, 2021
@v4hn v4hn merged commit 61d18f2 into moveit:master Oct 22, 2021
@rickstaa
Copy link
Copy Markdown
Contributor

@rhaschke Sorry to be nitpicking, but I think I'm missing something here. In my tests and also the panda_moveit_config the pass_all_args="true" is not needed since @mintar added the following code 5 months ago (see 781a82c):

https://github.com/ros-planning/moveit/blob/dc318f95f6e3c19cebbc0d14136277fb46749f78/moveit_setup_assistant/templates/moveit_config_pkg_template/launch/moveit_controller_manager.launch.xml#L3-L4

This can be seen by running roslaunch moveit_bug_2786_example_repo main.launch moveit_controller_manager:=fake and roslaunch moveit_bug_2786_example_repo main.launch while building the following example repository.

I think there is nothing wrong with #2928 but if you use pass_all_args="true" you can remove the following code:

https://github.com/ros-planning/moveit/blob/dc318f95f6e3c19cebbc0d14136277fb46749f78/moveit_setup_assistant/templates/moveit_config_pkg_template/launch/moveit_controller_manager.launch.xml#L3-L4

Personally, I liked @mintar more since it is more explicit and thus easier to see what is going on.

@rickstaa
Copy link
Copy Markdown
Contributor

I only tested on ROS noetic, so it could be that it works differently on different ROS versions.

@rhaschke rhaschke deleted the improve-msa branch October 22, 2021 15:05
@rhaschke
Copy link
Copy Markdown
Contributor Author

rhaschke commented Oct 23, 2021

@rickstaa and @marioney, you are both right.
This line can be removed (which I did it for moveit/panda_moveit_config@52bc5c8):
https://github.com/ros-planning/moveit/blob/dc318f95f6e3c19cebbc0d14136277fb46749f78/moveit_setup_assistant/templates/moveit_config_pkg_template/launch/moveit_controller_manager.launch.xml#L3-L4

I am open to both, removing or keeping the line. I agree with Rick's point that it explicitly states why we need the argument.
My PR was mainly addressing issues with existing MoveIt configs that don't (yet) have this line - but that doesn't help if they don't recreate via MSA either ...
@v4hn: What's your opinion?

@v4hn
Copy link
Copy Markdown
Contributor

v4hn commented Oct 23, 2021

I prefer the implicit argument passing with your new patch and would remove the unused argument slot in the real execution manager again.
It's bike shedding to debate this a lot though. Feel free to push either solution.

@rickstaa
Copy link
Copy Markdown
Contributor

@v4hn I think you are right, it leads to less code and the comment explains what is happening.

@rhaschke rhaschke mentioned this pull request Oct 25, 2021
3 tasks
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Nov 5, 2021
…gs (moveit#2928)

While we need to pass execution_type to fake_moveit_controller_manager.launch,
the controller_manager.launch files of real-robot shouldn't be required
to define this argument. However, if they don't roslaunch fails with an
`unused args` exception (see moveit#2786).
Passing arguments via pass_all_args should solve that issue.
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Nov 5, 2021
…gs (moveit#2928)

While we need to pass execution_type to fake_moveit_controller_manager.launch,
the controller_manager.launch files of real-robot shouldn't be required
to define this argument. However, if they don't roslaunch fails with an
`unused args` exception (see moveit#2786).
Passing arguments via pass_all_args should solve that issue.
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Nov 5, 2021
…gs (moveit#2928)

While we need to pass execution_type to fake_moveit_controller_manager.launch,
the controller_manager.launch files of real-robot shouldn't be required
to define this argument. However, if they don't roslaunch fails with an
`unused args` exception (see moveit#2786).
Passing arguments via pass_all_args should solve that issue.
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Nov 5, 2021
…gs (moveit#2928)

While we need to pass execution_type to fake_moveit_controller_manager.launch,
the controller_manager.launch files of real-robot shouldn't be required
to define this argument. However, if they don't roslaunch fails with an
`unused args` exception (see moveit#2786).
Passing arguments via pass_all_args should solve that issue.
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Dec 15, 2021
…gs (moveit#2928)

While we need to pass execution_type to fake_moveit_controller_manager.launch,
the controller_manager.launch files of real-robot shouldn't be required
to define this argument. However, if they don't roslaunch fails with an
`unused args` exception (see moveit#2786).
Passing arguments via pass_all_args should solve that issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

moveit setup assistant generates buggy launch files

4 participants