Motion Control Functions


Detailed Description

Use these functions to set motion parameters (velocity, acceleration, rotation rate, etc.), then execute them. Also provided are functions to stop motion.


Functions

NDICMDC_API BOOL NdiCmd_Coast (int handle)
 Coast.
NDICMDC_API BOOL NdiCmd_Brake (int handle)
 Brake.
NDICMDC_API BOOL NdiCmd_Reset (int handle)
 Reset.
NDICMDC_API BOOL NdiCmd_SetAcceleration (int handle, int accel)
 Set Acceleration.
NDICMDC_API BOOL NdiCmd_GetAcceleration (int handle, int *accel)
 Get Acceleration.
NDICMDC_API BOOL NdiCmd_SetVelocity (int handle, int velocity)
 Set Velocity.
NDICMDC_API BOOL NdiCmd_GetVelocity (int handle, int *velocity)
 Get Velocity.
NDICMDC_API BOOL NdiCmd_SetRotation (int handle, int rotation)
 Set Rotation Rate.
NDICMDC_API BOOL NdiCmd_GetRotation (int handle, int *rotation)
 Get Rotation Rate.
NDICMDC_API BOOL NdiCmd_SetDistance (int handle, long distance)
 Set Distance.
NDICMDC_API BOOL NdiCmd_GetDistance (int handle, long *distance)
 Get Distance.
NDICMDC_API BOOL NdiCmd_SetAngle (int handle, int angle)
 Set Angle.
NDICMDC_API BOOL NdiCmd_GetAngle (int handle, int *angle)
 Get Angle.
NDICMDC_API BOOL NdiCmd_SetXDistance (int handle, long xdistance)
 Set Delta Distance.
NDICMDC_API BOOL NdiCmd_GetXDistance (int handle, long *xdistance)
 Get Delta Distance.
NDICMDC_API BOOL NdiCmd_SetXAngle (int handle, int xangle)
 Set Delta Angle.
NDICMDC_API BOOL NdiCmd_GetXAngle (int handle, int *xangle)
 Get Delta Angle.
NDICMDC_API BOOL NdiCmd_Go (int handle)
 Go.


Function Documentation

NDICMDC_API BOOL NdiCmd_Brake ( int  handle  ) 

Brake.

This function actively brakes the servo or DC motor. Current will continue to be consumed.

Parameters:
handle an integer WheelCommander handle
Returns:

NDICMDC_API BOOL NdiCmd_Coast ( int  handle  ) 

Coast.

This function stops any current motion, and sets the servo or DC motors into low power mode.

Parameters:
handle an integer WheelCommander handle
Returns:

NDICMDC_API BOOL NdiCmd_GetAcceleration ( int  handle,
int *  accel 
)

Get Acceleration.

This returns the current acceleration value. The value returned will be a scaled version of the value passed to NdiCmd_SetAcceleration().

Parameters:
handle an integer WheelCommander handle
accel a pointer to an integer
Returns:

NDICMDC_API BOOL NdiCmd_GetAngle ( int  handle,
int *  angle 
)

Get Angle.

This returns the current rotation relative to the origin.

Parameters:
handle an integer WheelCommander handle
angle a pointer to an integer returning the angle rotated in degrees
Returns:

NDICMDC_API BOOL NdiCmd_GetDistance ( int  handle,
long *  distance 
)

Get Distance.

This returns the current position.

Parameters:
handle an integer WheelCommander handle
distance a pointer to an integer returning current position
Returns:

NDICMDC_API BOOL NdiCmd_GetRotation ( int  handle,
int *  rotation 
)

Get Rotation Rate.

This returns the measured rate of rotation.

Parameters:
handle an integer WheelCommander handle
rotation a pointer to an integer returning rate of rotation in degrees per second
Returns:

NDICMDC_API BOOL NdiCmd_GetVelocity ( int  handle,
int *  velocity 
)

Get Velocity.

This returns the current measured velocity.

Parameters:
handle an integer WheelCommander handle
velocity a pointer to an integer in units of distance per second
Returns:

NDICMDC_API BOOL NdiCmd_GetXAngle ( int  handle,
int *  xangle 
)

Get Delta Angle.

This returns the current angle relative to the origin, not a relative angle.

Parameters:
handle an integer WheelCommander handle
xangle a pointer to an integer returning the current angle in degrees
Returns:

NDICMDC_API BOOL NdiCmd_GetXDistance ( int  handle,
long *  xdistance 
)

Get Delta Distance.

This returns the current position in the robot's frame of reference, not the relative distance travelled.

Parameters:
handle an integer WheelCommander handle
xdistance a pointer to a long integer, returning the position
Returns:

NDICMDC_API BOOL NdiCmd_Go ( int  handle  ) 

Go.

This starts execution of either the velocity control loops, if only NdiCmd_SetVelocity() and/or NdiCmd_SetRotation() were called, or starts the position control loops, if any of the position, angle, or distance commands were called prior to this.

Parameters:
handle an integer WheelCommander handle
Returns:

NDICMDC_API BOOL NdiCmd_Reset ( int  handle  ) 

Reset.

This clears all motion parameters (velocity, rotation rate, position, and angle), and stops the servos or DC motors.

Parameters:
handle an integer WheelCommander handle
Returns:

NDICMDC_API BOOL NdiCmd_SetAcceleration ( int  handle,
int  accel 
)

Set Acceleration.

This sets the acceleration value used in NdiCmd_SetPosition(), NdiCmd_SetDistance(), NdiCmd_SetAngle(), and NdiCmd_SetXAngle().

Parameters:
handle an integer WheelCommander handle
accel an integer in units of distance per second squared
Returns:

NDICMDC_API BOOL NdiCmd_SetAngle ( int  handle,
int  angle 
)

Set Angle.

This sets the goal angle relative to the origin (which is reset to 0 degrees at position 0 on power on or execution of NdiCmd_Reset()).

Parameters:
handle an integer WheelCommander handle
angle an integer in degrees
Returns:

NDICMDC_API BOOL NdiCmd_SetDistance ( int  handle,
long  distance 
)

Set Distance.

This sets the goal position relative to the origin, which is zero at power on or execution of NdiCmd_Reset().

Parameters:
handle an integer WheelCommander handle
distance a long integer setting position in current units of distance
Returns:

NDICMDC_API BOOL NdiCmd_SetRotation ( int  handle,
int  rotation 
)

Set Rotation Rate.

This sets the rotation rate for use during velocity control mode.

Parameters:
handle an integer WheelCommander handle
rotation an integer in units of degrees per second
Returns:

NDICMDC_API BOOL NdiCmd_SetVelocity ( int  handle,
int  velocity 
)

Set Velocity.

This sets the velocity value for either velocity control mode or the maximum velocity for use during a positioning command.

Parameters:
handle an integer WheelCommander handle
velocity an integer in units of distance per second
Returns:

NDICMDC_API BOOL NdiCmd_SetXAngle ( int  handle,
int  xangle 
)

Set Delta Angle.

This sets a goal change in angle relative to the current pose.

Parameters:
handle an integer WheelCommander handle
xangle an integer angle to rotate by, in degrees
Returns:

NDICMDC_API BOOL NdiCmd_SetXDistance ( int  handle,
long  xdistance 
)

Set Delta Distance.

This sets a distance relative to the current position to travel.

Parameters:
handle an integer WheelCommander handle
xdistance a long integer in units of distance
Returns:


Generated on Mon Mar 2 17:01:02 2009 for Nubotics Device Interface DLL by  doxygen 1.5.5