Skip to content
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

Simplify /get_scene service #746

Merged
merged 7 commits into from
Feb 9, 2021
Merged

Simplify /get_scene service #746

merged 7 commits into from
Feb 9, 2021

Conversation

scpeters
Copy link
Contributor

Currently to get scene information, a delphyne user must advertise a service that expects a Scene message, then call /get_scene with the name of that service. This process is simplified to use only one service call by returning the Scene message directly from /get_scene.

The ProcessSceneRequest method is now unused, so it is removed.

These changes have broken the simulation_runner_test, which expects the old behavior of the /get_scene service. This test will need to be updated before merging.

Copy link
Collaborator

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise: I don't have anything against this patch.

I will inspect in detail the issues in the test and get back with some comments.

@scpeters
Copy link
Contributor Author

scpeters commented Feb 4, 2021

I updated the failing test to use the /world_control service instead of /get_scene in 33b7ba0

@scpeters
Copy link
Contributor Author

scpeters commented Feb 4, 2021

my update to the test is a bit flaky on github actions machines 😢

Currently to get scene information, a delphyne user must advertise
a service that expects a Scene message, then call /get_scene with
the name of that service. This can be done with only one service
call by returning the Scene message directly from /get_scene.

The simulation_runner_test still needs to be updated.
@scpeters
Copy link
Contributor Author

scpeters commented Feb 8, 2021

rebased and attempting to fix the modified test in 4d8147f. it passes locally for me, so it's a little blind, trying to guess what is going wrong on github actions

@scpeters
Copy link
Contributor Author

scpeters commented Feb 8, 2021

all the actions just failed. I've updated the setup-ros tag to use to the latest one (0.1.2) in eae6578

@scpeters
Copy link
Contributor Author

scpeters commented Feb 8, 2021

I had to rerun the gcc actions one time due to other flaky tests, but I think the test I've updated is now working, so this should be good to go as long as scan_build passes

agalbachicar
agalbachicar previously approved these changes Feb 8, 2021
Copy link
Collaborator

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


scene_request_msg.set_response_topic(service_name);
// Wait and ensure no steps are taken
std::this_thread::sleep_for(std::chrono::milliseconds(100));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use timeout variable? Probably a better name can be selected so we reference it by the time it represents rather than the function it has.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added waitDuration in f07cb03

Copy link
Collaborator

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scpeters scpeters merged commit 16dc83e into master Feb 9, 2021
@scpeters scpeters deleted the scpeters/simplify_get_scene branch February 9, 2021 01:49
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.

2 participants