diff --git a/crazyflie_py/crazyflie_py/crazyflie.py b/crazyflie_py/crazyflie_py/crazyflie.py index fd4117c93..01e2df50c 100644 --- a/crazyflie_py/crazyflie_py/crazyflie.py +++ b/crazyflie_py/crazyflie_py/crazyflie.py @@ -185,7 +185,8 @@ def __init__(self, node, cfname, paramTypeDict): # self.cmdVelocityWorldMsg.header.frame_id = '/world' def setGroupMask(self, groupMask): - """Set the group mask bits for this robot. + """ + Set the group mask bits for this robot. The purpose of groups is to make it possible to trigger an action (for example, executing a previously-uploaded trajectory) on a subset @@ -206,10 +207,14 @@ def setGroupMask(self, groupMask): ---- groupMask (int): An 8-bit integer representing this robot's membership status in each of the <= 8 possible groups. + """ # Note that this requires a recent firmware; older firmware versions # do not have such a parameter. - self.setParam('hlCommander.groupmask', groupMask) + try: + self.setParam('hlCommander.groupmask', groupMask) + except KeyError: + self.node.get_logger().error('setGroupMask: Your firmware is too old - Please update.') # def enableCollisionAvoidance(self, others, ellipsoidRadii): # """Enables onboard collision avoidance.