Replies: 1 comment 1 reply
-
Another option would be to have an API on the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To enable collision avoidance programmatically in the script (as opposed to in the launch file), the user must pass a list of the other
Crazyflie
objects to avoid:crazyswarm/ros_ws/src/crazyswarm/scripts/collisionAvoidance.py
Lines 71 to 73 in 73cce6b
The simulator does not parse the launch file, so in practice this is the only way to enable collision avoidance, unless you're OK running your multi-robot script on hardware without ever testing in simulation.
The API is like this because
Crazyflie
objects in the simulator don't know about each other.If we had instead given each
Crazyflie
a pointer back to theCrazyflieServer
, we wouldn't have needed theothers
argument. This would be more user-friendly. But now removing theothers
argument would break the API because there is another positional argument after it.On the other hand, the argument could be an opportunity to catch bugs: we could add a check that all the
others
are on the same radio channel asself
. Technically it is not wrong to have two separate collision avoidance groups on different channels (as long as the groups are guaranteed not to collide with each other by other means), so theothers
argument is the most general way to verify that the radio channels match the user's intent.Opinions?
Beta Was this translation helpful? Give feedback.
All reactions