dennisss / tansa

Dancing Robotics Platform
MIT License
39 stars 16 forks source link

Support controlling groups of drones at a time #7

Closed tessmichi closed 7 years ago

tessmichi commented 7 years ago

Drones have memberships to groups, ensure multiple groups can be handled at a time.

Include handing multiple groups as well.

dennisss commented 7 years ago

Thinking ahead after 8a142a60d3946f5335d0803c4ced66d68515057e, it would be good to define what the group coordinates are relative to. Will they be relative to the initial positions of the drones (offset translations from start of action)? Or should we define a 'center' for a group that may be at the absolute position of one drone of the middle of them?

tessmichi commented 7 years ago

Agreed, I tried to bring this up in slack but I think it got drowned out. I personally like the first option - the idea of using an "offset" from each drone's relative initial position, but would have to evaluate each option further as I currently have concerns for each one. For example, if we use the "offset" idea, are we sure that a group's movement will always consist of the same "offset" from each member's "home"? One scenario - let's say we have four drones that start on four corners of a square. Then we want them to work as a group moving within the square. The offsets in respect to each drone's "home" would have different magnitudes and even signs per drone. Unless we use a different location instead of a drone's "home"? What if we used the location at which a drone enters the group as its "start of action"? Would that fix the problem? The "center" option is interesting as well, but the down side I see is that, for each time we create a new group of drones throughout a choreography, we have to redefine each drone's relative location from the "center" What do you think about these concerns? Which is more doable, or what am I missing here?

dennisss commented 7 years ago

I discussed this with Kyle while you were sick and right now we think it may be best to define all the groups at a higher level outside of actions like drones. Each definition would have the initial positions of all drones and the position of the initial center. All actions referencing that group would be computed based on the center point and all drones would be offset from that.

tessmichi commented 7 years ago

Awesome, thanks!

tessmichi commented 7 years ago

Update on discussion outside of github:

We have three options.

(1) Supported currently by JOCS If the drones are specified and the "start" and "end" are specified as the center of the group, then the code would handle calculating specific locations per drone. This would mean that, if a group of drones has a startPointCenter at [0,0,0], then each drone's "offset" from this center is GATHERED in the code by grabbing the state of the drone's trajectory at the time that this motion starts. From there, each point for that drone will consist of using that offset along with the center of the group to ensure each drone follows the same actions but on their own respective paths.

(2) Supported currently by JOCS Each drone's movement will have its own action event in the jocs. So, no action will apply to >1 drone. This is what Mike will incorporate in the first iteration of creating jocs to represent the first 3 minutes of the choreography.

(3) Not supported currently by JOCS The beginning of the JOCS file could outline each "group" that will be used in each action. In this description, each drone will also be given a "start" location for the amount of time that it is part of that group. So when that group starts being used, this is where the drone is at that moment. So when the group is referenced in creating an "action" in the jocs, the "start" and "end" will be offsets to these "relative homes" of the drones. These relative homes are only in effect when the group they are defined within is being used.

Must still decide which of these 3 we will stick with in the long run.

abramowitzK commented 7 years ago

Implemented in: ca0ec5f67d0a18db0405f537c96835d62b5a231a