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

MasterClient get_published_topics() from another crate #187

Open
lucasw opened this issue Aug 4, 2024 · 1 comment
Open

MasterClient get_published_topics() from another crate #187

lucasw opened this issue Aug 4, 2024 · 1 comment

Comments

@lucasw
Copy link
Contributor

lucasw commented Aug 4, 2024

I ended up adding pub in a few places (https://github.com/lucasw/roslibrust/tree/pub_master_client) until I could get this rostopic list working:

https://github.com/lucasw/mcap_tools/blob/main/mcap_tools/src/bin/rostopic_list.rs

A step up from that could be to move the master client creation into roslibrust, and then less needs to be exposed, or something else with a master client hidden inside it and only support get_published_topics() (and others later, if other tools demand it)- or is there another route that already exists that I didn't see?

A duplicate rostopic list isn't the goal, but duplicating the record_all feature of rosbag record -a is- it polls the rosmaster once a second for all topics and then adds subscribers or removes them accordingly.

@Carter12s
Copy link
Collaborator

Yeah nice, this all tracks.

Was noticing as I was wandering through the crate earlier that we have a bunch of pub vs pub(crate) issues. I'm trying to make an effort now to really start finalizing the overall API of the crate, now that both the rosbridge and ros1 implementations are really working.

I previously went through this with rosbridge, and ended up adding a feature called rosapi that exposes these features via rosbridge's intended method (the calling services on the rosapi node). The "end game" I'd like to start moving things towards is having a RosApi trait and then implementing that trait on both ros1 and rosbridges's nodehandles.

I'm also starting in earnest to plan to break up the main roslibrust crate into a few crates that have more modular functionality. Someone I was talking to voiced some interest in having MasterClient in its own crate, and I mulling over whether that makes sense or not (it probably does).

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

No branches or pull requests

2 participants