setVelocity method
override
Set the linear and angular velocities of the base, expressed as mm/sec and degrees/sec vectors.
// Set the linear velocity to 50mm/s forward, and the angular velocity
to 15 deg/s counterclockwise
//
await myBase.setVelocity(Vector3(0, 50, 0), Vector3(0, 0, 15));
For more information, see Base component.
Implementation
@override
Future<void> setVelocity(Vector3 linear, Vector3 angular, {Map<String, dynamic>? extra}) async {
final request = SetVelocityRequest()
..name = name
..linear = linear
..angular = angular
..extra = extra?.toStruct() ?? Struct();
await client.setVelocity(request);
}