osrf / ros2_test_cases

Tracking of tests to be performed on a ROS 2 release
16 stars 4 forks source link

Creating an Action #1146

Closed marcoag closed 6 months ago

marcoag commented 6 months ago

Check the documentation for the 'Creating an Action' page

Configuration

Links

Process

Step 1 - I was able to follow the documentation.

Step 2 - The documentation seemed clear to me.

Step 3 - The documentation didn't have any obvious errors.

slowrunner commented 6 months ago

For the config:

I followed the "Creating an Action" tutorial:

1) Successfully followed the doc 2) Doc was clear:

3) The doc had no errors

$ source install/local_setup.bash
$ ros2 interface show custom_action_interfaces/action/Fibonacci 
marcoag commented 6 months ago

I believe the idea of using local_setup.bash is to make sure it only includes the packages in the install space. You can find more info on it on the ament documentation on the section of environment creation.

Will close this as completed, thanks a lot for testing!

clalancette commented 6 months ago
  • the phrase "before the ament_package() line, in the custom_action_interfaces:" - before the ament_package() is very clear but I wasn't sure what "in the custom_action_interfaces:" meant. If it had said "in the custom_action_interfaces package.xml file", I would not have expected I need to find "custom_action_interfaces:" in the package.xml file.

Yeah, you are right. That sentence was confusing. I've opened up https://github.com/ros2/ros2_documentation/pull/4378 to clarify it.

Another thing confused me - why do here I source the install/local_setup.bash instead of the usual install/setup.bash?

We aren't consistent in our documentation on sourcing setup.bash vs. local_setup.bash. The former sources everything, while the latter only sources the current workspace. Thus the latter can be faster, but you need to know what you've sourced already. In this case we know that we've already sourced the "top-level" setup.bash (otherwise earlier steps would not have worked), so we can just source the local workspace local_setup.bash.