-
Notifications
You must be signed in to change notification settings - Fork 6
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
DRAFT: Native service client #147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional context.
roslibrust/src/lib.rs
Outdated
|
||
/// For now starting with a central error type, may break this up more in future | ||
#[derive(thiserror::Error, Debug)] | ||
pub enum RosLibRustError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these here out of rosbridge
module as I start to use concrete domain-specific error types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this conflicts with the other error handling that recently got merged, stuff is getting really messy around errors now and will need some close eyes.
Agreed that we should unify to a single global error type for all clients in an ideal world.
srv_definition: String::from_iter( | ||
[T::Request::DEFINITION, "\n", T::Response::DEFINITION].into_iter(), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integration testing with roscpp and rospy will reveal whether this method of service definition generation is fine. I believe it should be.
@@ -118,3 +117,44 @@ impl ConnectionHeader { | |||
Ok(header_data) | |||
} | |||
} | |||
|
|||
pub async fn establish_connection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function breaks out the functionality being used elsewhere.
f184540
to
2764c13
Compare
2764c13
to
5a29d03
Compare
@ssnover Do we want to get this one merged? |
@ssnover I finally got a chance to take a deeper look at this one today and got it to a basic working state! There were a few small things that needed to be tweaked, but it did work out. |
I think I'm tempted to merge this as is (or maybe a few more fixes), there is so much I want to overhaul in roslibrust now that I'm looking at it again with fresh eyes... |
If it's functional I think it's worth merging and then iterating. I don't currently have time to work on this to a significant degree, but I can review PRs. |
The unwrap in ROS name creation seems not ideal. |
…n test service clients how I want to
Okay I have successfully working service server that is compatible with our service_client! This is far from "done", but gets us to a point where we can start writing some round-trip tests of service_client to service_server and actually starting making things robust. Many major TODOs left, but I can finally add two int together. |
AIGHT I'm merging this. Huge amount of work still to go, but we do have working service servers and service clients, and can start to test them with themselves! |
Description
This introduces ROS1 native service clients. I still need to test it and write an example, and there are a lot of tangential changes which I expect I may break out into separate pull requests.
Checklist