BowlerKernel
Public Member Functions | List of all members
com.neuronrobotics.sdk.addons.kinematics.WheeledDriveEngine Class Reference
Inheritance diagram for com.neuronrobotics.sdk.addons.kinematics.WheeledDriveEngine:
Inheritance graph
[legend]
Collaboration diagram for com.neuronrobotics.sdk.addons.kinematics.WheeledDriveEngine:
Collaboration graph
[legend]

Public Member Functions

void DriveArc (MobileBase source, TransformNR newPose, double seconds)
 
void DriveVelocityStraight (MobileBase source, double cmPerSecond)
 
void DriveVelocityArc (MobileBase source, double degreesPerSecond, double cmRadius)
 

Detailed Description

The Class WheeledDriveEngine.

Definition at line 9 of file WheeledDriveEngine.java.

Member Function Documentation

◆ DriveArc()

void com.neuronrobotics.sdk.addons.kinematics.WheeledDriveEngine.DriveArc ( MobileBase  source,
TransformNR  newPose,
double  seconds 
)

Driving kinematics should be implemented in here

This method should not block You will get that called every 0.1 to 0.01 seconds by the jog widget with a small displacement transform. If the last command finishes before a new one comes in, reset the driving device. if a new command comes in then keep moving. Assume that the most important thing here is time synchronicity.you may get it called with a large transform, larger than you can take in one step,a nd you may get a transform with a step size so small it would never move. You will need to warp and stretch the transform coming in to make sure there are an integer number of steps, with at least some minimum step length.

Be sure to have any threads you create timeout and die, don't wait for disconnect, as you are developing that will be a pain in the ass

Essentially, this command defines a velocity (transform/second)and you need to maintain that velocity, descretized into steps, and stop as soon as the last velocity term times out also, do not assume it will ever be pure rotation nor pure translation, assume all commands are a combo of both.

Parameters
sourcethe source
newPosethe new pose that should be achived.
secondshow many seconds it should take

Implements com.neuronrobotics.sdk.addons.kinematics.IDriveEngine.

Definition at line 15 of file WheeledDriveEngine.java.

◆ DriveVelocityArc()

void com.neuronrobotics.sdk.addons.kinematics.WheeledDriveEngine.DriveVelocityArc ( MobileBase  source,
double  degreesPerSecond,
double  cmRadius 
)

Tells the robot to start driving at a speed without any endpoint. The encoding will track the progress. The radius is how much turn arch is needed

Parameters
sourcethe source
degreesPerSecondis now much orientation will change over time
cmRadiusis the radius of the turn. 0 is turn on center, infinity is driving straight

Implements com.neuronrobotics.sdk.addons.kinematics.IDriveEngine.

Definition at line 33 of file WheeledDriveEngine.java.

◆ DriveVelocityStraight()

void com.neuronrobotics.sdk.addons.kinematics.WheeledDriveEngine.DriveVelocityStraight ( MobileBase  source,
double  cmPerSecond 
)

Tells the robot to start driving at a speed without any endpoint. The encoding will track the progress.

Parameters
sourcethe source
cmPerSecondthe cm per second

Implements com.neuronrobotics.sdk.addons.kinematics.IDriveEngine.

Definition at line 24 of file WheeledDriveEngine.java.


The documentation for this class was generated from the following file: