-
Notifications
You must be signed in to change notification settings - Fork 145
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
merging with ApexAI/apex_rostest and repository reorganization #208
Comments
Some RFC points:
|
I would lean towards yes - in order to be distinguishable / searchable - since it has a completely different API / usage then the package from ROS 1. |
How tightly is it tied to launch? |
I don't fully understand what you're asking. It uses launch. I have some bullets above about what would be in it and why it would exist. |
You asked if |
I understand what you mean now, and yes that was our original thinking (it uses launch but it not part of it), but I just wanted to RFC it since it also seemed kind of wasteful since it will end up being (at least for now) very thin itself. |
@pbaughman could you look at the open PRs above? thx |
@hidmic can you collect the pr's that are against various packages to use the new interface under the todo bullet point in the original comment? I know you've connected them to this pr, but it would helpful for people using this issue as an entry point to have them in a bullet list above. |
@wjwwood do you think it's worth to have a separate If so, I'm going to need a repo :) |
Does At the very least we need something like I'll create the repository and if we don't need it I'll delete it again. |
Created it https://github.com/ros2/rostest and added your team to it. |
Is |
I asked, there were no alternatives proposed. |
Then we should come up with another name - since the concern that |
No, it does not inject them, though I personally think that the tool should not be the one that does it but the user explicitly through some fancy decorator or any of the
I see the appeal of a If all the above applies, then maybe we don't need the new repo? |
I'm not going to block the progress on this if no one can suggest an alternative. If you or anyone else has a better idea (I don't) then please suggest it, otherwise we need to continue.
If every test has the decorator, then I don't agree. It would be better to include it automatically, otherwise it becomes just boilerplate. Why would the user include that themselves? I saw that happened on the composition launch file pr, but I don't know what caused that confusion. I can see, somewhat, the point of view that for testing you might have the user include the default launch description manually on each of the tests, since they're using the launch API directly rather than a tool, but for plain
It may be an almost empty script or one that just invokes pytest with or without a plugin or something for now, but in the future it is needed to support XML based test files. You can't just invoke pytest on one of those, and requiring the user to write a pytest or python script just to invoke a launch XML where one of the processes is a gtest seems like an unnecessary burden. Also, please consider my original summary for the purpose of the
It goes beyond the command line tool. |
Would it solve the problem is there was a |
That package would be called |
I second ros2test name. @hidmic what is holding back above PRs to be merged? we looked them up yesterday and they were all approved. Do you need any help? |
@dejanpan after addressing all review comments, I started to see test failures locally. I'm still solving/fighting them. I plan to get this all in by Monday EOD, hopefully. |
@hidmic I tentatively moved this into "done" for the Dashing API freeze, feel free to disagree. |
|
@wjwwood I just realized I never posted my reply to #208 (comment).
I generally agree with the idea of reducing boilerplate as much as possible, and thus maybe a decorator is not the best solution. But regardless of which mechanism we may chose, I do think that explicit is almost always better than implicit. This is a special case, though, because every test would need it, just like every ROS aware launch file does. Injecting a launch description preamble into launch tests fixtures as they are today is somewhat tricky though, and requires some amount of plumbing, specially considering that the base launch test CLI has to remain ROS agnostic. So I started to wonder why we even need this in the first place. There's a large coupling between |
Basically the idea was that the preamble remain optional and replaceable, if I initialized them via the other actions then these two characteristics are hard to ensure. I guess you could have a function that replaces the default before you launch (and you could replace with empty). I'm not too worried about this point, but it was something that I was thinking about. Also, I very much wanted to dog-food this feature, by using existing features in launch, so adding some default actions in the command line tool was the least invasive option. I don't know how we would implement what you're describing, but my first thought would be an action that "ensures" the services exist, starting them if needed and doing nothing if they are already there. But that means when introspecting you'll see one of these actions with every lifecycle node or other feature that needs the rclpy node to work properly, and I think that would get noisy when introspecting. So then we either need to do something more sneaky, which I want to avoid and instead dog-food existing API's, or implement a new feature to "hide" actions that are considered details or something like that, and I fear that will be abused. All that being said, I think having the actions that need the features ensure they are started (whether that be with another action or something else) is not a bad idea. |
Also, to extend my first point about making this infrastructure replaceable, for testing a Node might need us to start a rclpy node when testing but not when launching, whereas a lifecycle node might require that when testing and launching, so it might not be straightforward to add an action to each other action which "needs" an rclpy node, because it may not be clear when that is. That's another benefit to doing it when you launch the launch file, because you can condition it based on the context you're running in rather than the content of the launch file. |
Hmm, I see the benefit for testing now. And yeah, we should add a check for the features to be present, though if we keep the preamble that can wait. Alright, fair enough, I'll take care of |
May or may not be helpful, but I just add the ROS specific startup stuff to the test launch descriptions that need it, and don't add it to the ones that don't. It's not elegant and it requires you to understand what's going on behind the scenes a little, but it works for me. |
Yeah, I'm afraid that's not going to work at scale, plus as I alluded to above, what "needs it under the hood" may change over time or based on the scenario, so it's probably best something the user doesn't have to declare. |
See also: ApexAI/apex_rostest#18
We plan to integrate the work done in https://github.com/ApexAI/apex_rostest into this repository and at the same time separate the ROS specific components of launch into a new separate repository (https://github.com/ros2/launch_ros).
This is the planned layout:
launch
launch_testing
apex_launchtest
from the repository ApexAI/apex_rostestlaunch_testing_ament_cmake
(new)apex_launchtest_cmake
from the repository ApexAI/apex_rostestlaunch_testing
launch_ros
test_launch_ros
ros2launch
launch_ros_testing
(new)apex_launchtest_ros
from the repository ApexAI/apex_rostestrostest
(new)rostest
(orros2 test
?) which will alias to the CLI inlaunch_testing
add_rostest(...)
to allow for future ROS specific integration<test_depend>rostest</test_depend>
Action items:
apex_rostest
apex_rostest/AMENT_IGNORE
to prevent them from getting picked up by CIapex_rostest/apex_launchtest
intolaunch_testing
launch_testing_ament_cmake
and merges code fromapex_rostest/apex_launchtest_cmake
launch_ros_testing
and merges code fromapex_rostest/apex_launchtest_ros
apex_rostest
based coderostest
package and add to it: (Add ros_testing metapackage and ros2test CLI package ros_testing#1)launch_testing
)Connected to #161.
The text was updated successfully, but these errors were encountered: