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

Add ROS service/client widget #92

Merged
merged 3 commits into from Apr 6, 2022
Merged

Conversation

IsabelParedes
Copy link
Collaborator

The function generates a widget similar to the publisher/subscriber widget.

Add example of widget working with turtlesim Spawn
service definition.

[Ticket: X]
def call_srv(arg):
msg_to_send = srv_type._request_class()
widget_dict_to_msg(msg_to_send, widget_dict)
rospy.wait_for_service(srv_name)
Copy link
Member

Choose a reason for hiding this comment

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

we could move the wait_for_service call outside the callback, and we could also give a timeout (it's an optional parameter).

What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it necessary to wait for the service? We could also simply check if the service is there and throw an error if it's not, would that be better?

notebooks/ROS Service.ipynb Outdated Show resolved Hide resolved
@wolfv
Copy link
Member

wolfv commented Apr 5, 2022

Looks great to me!

Clean up ROS Service notebook and move wait_for_service function
outside the callback.

[Ticket: 92]
@wolfv wolfv merged commit 3cffe93 into RoboStack:master Apr 6, 2022
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.

None yet

2 participants