Home Community Blog Buy Now

Misty Community Forum

DriveArc command does not trigger a locomotion event

I think this is a bug, I could be wrong though. In C# if you subscribe to the locomotion event, it doesn’t get triggered by “DriveArc” commands. Here is an example output where I subscribed to the “RobotCommand” event (basically any time any command is given) and also the “LocomotionCommand” event. “Processing locomotion event: MistyRobotics.SDK.Messengers.RobotMessenger” is the message that displays whenever a locomotion event is received. You can see that when a “Drive” command is received, the locomotion event is triggered, but when “DriveArc” is received there is no locomotion event.

It doesn’t really affect my code but I noticed it and so I figured I might as well post it.

This is possibly a misnomer for the LocomotionCommand which makes it seem like it should be thrown for every drive command. However if we look at the information in a message sent for that event: {"eventName":"LocomotionCommand","message":{"actionId":0.0,"angularVelocity":0.0,"created":"2021-03-02T17:47:07.7535093Z","linearVelocity":-0.25,"useTrapezoidalDrive":true,"valueIndex":0.0}}
We can see it only has a handful of data in it, the main parts being the linearVelocity and angularVelocity, however neither of those are sent in the DriveArc command.

Gotcha, that makes sense