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 merging support to coms #7

Open
tylerferrara opened this issue Feb 11, 2022 · 2 comments
Open

Add merging support to coms #7

tylerferrara opened this issue Feb 11, 2022 · 2 comments

Comments

@tylerferrara
Copy link
Contributor

tylerferrara commented Feb 11, 2022

Auto Merging ♻

1. Broadcaster finds a robot
2. Broadcaster gets local map using NetSimMerger.get_latest()
3. Broadcaster sends msg.Merge over the network
4. Listener gets msg.Merge
5. Listener gets local map using NetSimMerger.get_latest()
6. Listener replies with msg.Merge over the network
7. Listener calls NetSimMerger.request_merge()
8. Broadcaster gets reply and calls NetSimMerger.request_merge() with new map

State Machine Merging 🤖

1. State machine says ("Lets merge with ROBOT_B")
2. State machine makes call NetSimMerger.merge_with(robot_B)
       Within NetSimMerger.merge_with:
        - Get the local map
        - Craft a ms.Merge
        - Publish to topic: `/coms_listening`
3. coms.sim.Sim.Broadcaster listens to `/coms_listeneing` and pushes the message over the network [waits for reply]
4. ROBOT_B: coms.sim.Listener obtains msg.Merge
5. ROBOT_B: gets local map
6. ROBOT_B: replies with its own msg.Merge
7. ROBOT_B: calls NetSimMerger.request_merge()
8. coms.sim.Sim.Broadcaster hears reply
9. coms.sim.Sim.Broadcaster calls NetSimMerger.request_merge()

NOTE: Implement sending messages as a service request in coms.sim.Sim

@tylerferrara
Copy link
Contributor Author

@cj-mclaughlin @nikopoulospet
Should we:

A - send unmerged map back to broadcaster (current plan)

B - merge the local map first, before sending back to broadcaster
plan B is synchronous and requires the map to be merged, slowing down replies

tylerferrara pushed a commit that referenced this issue Feb 11, 2022
Add support for merging ROS nodes

Part of #7
@nikopoulospet
Copy link
Contributor

nikopoulospet commented Feb 12, 2022

Service callbacks/ handlers are executed in their own thread so I don't think it would matter

https://nu-msr.github.io/me495_site/lecture08_threads.html
https://answers.ros.org/question/9543/rospy-threading-model/?answer=13894#post-id-13894

tylerferrara pushed a commit that referenced this issue Feb 12, 2022
Add support for merging ROS nodes

Part of #7
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