-
Notifications
You must be signed in to change notification settings - Fork 205
Sending a new packet type to commander_generic #79
Comments
There is some generic packet support, but it would be better to add native support:
I'll do that eventually, but PRs are welcome! |
Hi @whoenig, More than happy to contribute. A question though; If we are to implement a packet format that complies with the new cf generic packet format, I feel like all we have to do is to add another header param for the packet type to setPointPacket. (Referring to this diagram - bitcraze/crazyflie-firmware#113 (comment)). Am I correct? |
AFAIU, the current ROS cf packet calls to the port 0x03 and channel 0. But in order to comply with the new generic packetDecoder approach, we have to call channel 0x07. (as per here: https://github.com/bitcraze/crazyflie-firmware/blob/c55ed40b05b370e73ae85c957636aac78c87f20a/src/modules/src/crtp_commander.c#L58 ) So is it correct to say we need to overload the crtp constructer if we are to add a new packet type with the new header values? |
I think there should be a new crtp type that uses a union inside (with one struct for each type), see https://github.com/bitcraze/crazyflie-firmware/blob/master/src/modules/src/crtp_commander_generic.c for a full list. Perhaps, something like this:
Another option would be to add a specific crtp packet for each of the possible "generic" types (avoiding confusing overloaded constructors). |
Most generic setpoints are implemented now (e.g., |
Hi @whoenig ,
How can we set the packet type value in the setpoint request? I am trying to modify the code in order to send a new packet type as mentioned in cf firmware and just couldn't figure out the place you have set the packet type.
Issue for the new commander_generic implementation
bitcraze/crazyflie-firmware#113
The text was updated successfully, but these errors were encountered: