ADVRHumanoids/xbot2_examples

[XBot How To] Using different message packets for a driver

Closed this issue · 2 comments

If I understood well, a driver can communicate on one side with a client using a Packet1 type, and on the other side with the robot using a Packet2 type. How can I perform this?

See the code class DeviceDriverTpl : public DeviceTplCommon<rx_type, tx_type> here we have only "one side" communication.

Theoretically I should need something like: class DeviceDriverTpl : public DeviceTplCommon<rx_type_side1, tx_type_side1, rx_type_side2, tx_type_side2>

Am I wrong?

The template determines the internal _rx and _tx structures, as well as the internal messages being sent inside the framework. Your role as implementer of DeviceDriverTpl::sense_impl and DeviceDriverTpl::move_impl is to fill/read those structs from any representation available to you when speaking with the actual device.

Closing because that was not how xbot2 worked, it was my misunderstanding