-
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
Major re-org to crate / repository structure #215
base: master
Are you sure you want to change the base?
Conversation
@lucasw / @ssnover this is ready for a review now. It is a pretty big change to overall crate structure, but I think aligns things much more where I want development to head. I think it sets things up well to eventually include a ros2 backend with either zenoh or dds, and I think it sets us up very well to start making the generic traits for TopicProvider and ServiceProvider the a first class API that both allows folks to swap backends around and to use MockRos for testing. |
Reading on mobile right now, but just going to ask clarifying questions and I'll review later:
|
For users the intended entrypoint is still roslibrust The "standard" usage would be to depend on roslibrust with at least one backend enabled via a feature flag. Depending on roslibrust with no backends enabled can be done (see rosapi) to implement generic behaviors without a particular backend specified as well. Not expecting anyone outside of roslibrust development to depend on roslibrust_common and I'm super happy to rename that to roslibrust_core or potentially |
roslibrust/Cargo.toml
Outdated
# TODO MAJOR remove this feature | ||
rosapi = [] | ||
# Intended for use with tests, includes tests that rely on a locally running rosbridge |
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.
Flagging for myself I still need to clean this up before merge
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.
Mostly nitpicks and questions about tracking todos.
@@ -4,7 +4,7 @@ | |||
#[cfg(feature = "ros1_test")] | |||
mod tests { | |||
use log::*; | |||
use roslibrust::ros1::{NodeError, NodeHandle}; | |||
use roslibrust_ros1::{NodeError, NodeHandle}; |
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.
Since integration tests will have similar visibility to internals as user code, I think it's probably best for the integration test to look like what we expect it to look like for users; i.e. keep roslibrust::ros1::
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.
Oh looking at this now, I see this is under src
instead of tests
which is where integration tests ought to go (since they have the same visibility into the crate as a user of the crate does).
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.
Good catch I'll re-org!
@@ -197,7 +194,7 @@ impl NodeServerHandle { | |||
|
|||
let md5sum; | |||
let md5sum_res = | |||
roslibrust_codegen::message_definition_to_md5sum(topic_type, msg_definition); | |||
roslibrust_common::md5sum::message_definition_to_md5sum(topic_type, msg_definition); | |||
match md5sum_res { |
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 is an aside, but perhaps:
let md5sum = roslibrust_common::md5sum::message_definition_to_md5sum(
topic_type,
msg_definition
).map_err(|err| {
log::error!("{err:?}");
Err(NodeError::IoError(io::ErrorKind::ConnectionAborted.into()))
})?;
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.
It might be nice to change the name of message_definition_to_md5sum
to from_message_definition
since it's already namespaced under md5sum
module.
Description
A major re-organization of the components of roslibrust per: https://github.com/orgs/RosLibRust/discussions/214
Some facets of this:
Fixes
Closes:
number
Checklist