Group Commands
Group Commands
This is something of a feature request/discussion. Have you considered adding in group commands to the packet serial command set? This is a feature of some other motor controllers I have used that can be useful.
It would be implemented by giving each controller a group address in addition to its regular address. For commands that could make sense to be issued to a group, a controller will react to commands that come over the bus address to its group address, but not respond. Basically this could include all of the commands that currently respond with 0xFF.
In my experience the most useful group command has been a "begin motion" command, something that also doesn't currently exist for the RoboClaws. This would allow trajectories to be loaded to multiple RoboClaws that are on the same bus, and then trigger them to start simultaneously with a group command. (Otherwise there would be a delay in the commands starting due to communication time.) Not knowing what goes on internal to the RoboClaw, this could be hard to implement, but perhaps the buffered commands already come close.
As I was writing this, I calculated the communication time to be about 3ms for a command 67 at 115200bps. Which with a maximum of 8 RoboClaws per bus, is only a 21ms delay between the first and last RoboClaws starting their motion. So maybe this is not all that big of a deal.
It would be implemented by giving each controller a group address in addition to its regular address. For commands that could make sense to be issued to a group, a controller will react to commands that come over the bus address to its group address, but not respond. Basically this could include all of the commands that currently respond with 0xFF.
In my experience the most useful group command has been a "begin motion" command, something that also doesn't currently exist for the RoboClaws. This would allow trajectories to be loaded to multiple RoboClaws that are on the same bus, and then trigger them to start simultaneously with a group command. (Otherwise there would be a delay in the commands starting due to communication time.) Not knowing what goes on internal to the RoboClaw, this could be hard to implement, but perhaps the buffered commands already come close.
As I was writing this, I calculated the communication time to be about 3ms for a command 67 at 115200bps. Which with a maximum of 8 RoboClaws per bus, is only a 21ms delay between the first and last RoboClaws starting their motion. So maybe this is not all that big of a deal.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: Group Commands
We have thought about it but like you showed the time delay between commands is pretty minimum.
I will think on how to do it and if it can be done easily we'll add it, but we are getting pretty close to maximum usage out of the Roboclaw processor now(eg: no code space left).
I will think on how to do it and if it can be done easily we'll add it, but we are getting pretty close to maximum usage out of the Roboclaw processor now(eg: no code space left).