Closed joshuamorton closed 7 years ago
Right, the second one works better as an api, but isn't technically feasible unless we make it
launcher = Launcher('params.launch')
@launcher.launch_node('buzzmobile', 'gps_mapper')
...
At least, I'd need to do dark evil things to even approach making the second work otherwise.
On Sat, Nov 12, 2016 at 3:44 PM Raphael Gontijo Lopes < notifications@github.com> wrote:
@iRapha commented on this pull request.
In buzzmobile/tests/sense/test_inputer.py https://github.com/gtagency/buzzmobile/pull/121:
- @rostest_utils.launch_node('buzzmobile', 'inputer.py', 'params.launch')
Oh that's interesting. What you're doing in the background is adding the node to the launch file and launching everything together, right?
In answer to your question, I think that might be preferable. My main concern in separating things is if we want to launch multiple nodes for an integration test, there is currently no easy way of both using a launch file (say, for rosparams), and starting up multiple nodes.
So either way would work as an api:
@launch_nodes(('buzzmobile', 'gps_mapper'), ('buzzmobile', 'lidar_to_frame'), ('buzzmobile', 'frame_merger'), launch='params.launch')def test_merging_frames_integration(self): def cb(world_model): self.success = world_model is correct with check_topic('world_model', Image, cb): sleep(1) # or something, it'll take time to merge. not sure what's best practice assert self.success
or
@with_launch_file('params.launch')@launch_node('buzzmobile', 'gps_mapper')@launch_node('buzzmobile', 'lidar_to_frame')@launch_node('buzzmobile', 'frame_merger')def test_merging_frames_integration(self): def cb(world_model): self.success = world_model is correct with check_topic('world_model', Image, cb): sleep(1) # or something, it'll take time to merge. not sure what's best practice assert self.success
Note that in the second one, @with_launch_file is also optional. So running nodes without a launch file is possible
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gtagency/buzzmobile/pull/121, or mute the thread https://github.com/notifications/unsubscribe-auth/AEz4AJ8UcISF5xAOGjYA6yLA8CT_O377ks5q9iVEgaJpZM4KwTYQ .
Please tell me what to explain and comment on.
Fixes #113