cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
osaBH8_280 Class Reference

A clas for a BH8_280 device. More...

#include <osaBH8_280.h>

Public Types

enum  Errno { ESUCCESS, EFAILURE }
 

Public Member Functions

 osaBH8_280 (osaCANBus *canbus)
 Default constructor. More...
 
 ~osaBH8_280 ()
 Default destructor. More...
 
osaBH8_280::Errno Initialize ()
 Initialize the arm. More...
 
osaBH8_280::Errno GetPositions (vctDynamicVector< double > &positions)
 Return the configuration of the BH8_280 (4/7DOF) More...
 
osaBH8_280::Errno SetPositions (const vctDynamicVector< double > &positions)
 Send joints positions. More...
 
osaBH8_280::Errno SetMode (Barrett::Value mode)
 Set joints torques. More...
 
void Hi ()
 

Detailed Description

A clas for a BH8_280 device.

Whole Arm Manipulator (BH8_280) is a 4-7DOF robot manufactured by Barrett Tech. From a device perspective the BH8_280 can be interfaced from either an ethernet device (wired or wireless) or a CAN device. On the BH8_280, the ethernet device is connected to a PC104. Thus, when using ethernet you can communicate with the onboard computer through a shell or client/server. The downside of this is that the PC104 does all the (CAN) communication with the motors and much of the computation as well. The PC104 can be bypassed and the motor can be controlled by an external PC (see the documentation on how to configure the switches). For this, the external PC must have a CAN device and the communication with the hardware must be established and maintained. The osaBH8_280 class implements a BH8_280 that can be controlled from an external PC. Thus it manages the CAN bus, the pucks present on the CAN bus and the BH8_280's safety module. Operations are pretty basic: set motors torques, set motor positions and get motor positions.

Member Enumeration Documentation

Enumerator
ESUCCESS 
EFAILURE 

Constructor & Destructor Documentation

osaBH8_280::osaBH8_280 ( osaCANBus canbus)

Default constructor.

Initiallize the BH8_280. This configures the pucks, groups and the safety module. You can use osaBH8_280 with any CAN device, has long as it is derived from the devCAN base class.

Parameters
canbusThe CAN device used by the BH8_280. This device must be derived from the devCAN classe.
See Also
osaCANBus
osaBH8_280::~osaBH8_280 ( )

Default destructor.

Member Function Documentation

osaBH8_280::Errno osaBH8_280::GetPositions ( vctDynamicVector< double > &  positions)

Return the configuration of the BH8_280 (4/7DOF)

Get joints positions This broadcast a position query to the pucks and process all their replies. First, the replies (in encoder ticks) are converted to motors positions and then to joint angles.

Parameters
positions[out]The resulting motor positions in radians
Returns
ESUCCESS if no error occurred. EFAILURE otherwise.
void osaBH8_280::Hi ( )
osaBH8_280::Errno osaBH8_280::Initialize ( )

Initialize the arm.

Configure the groups and the pucks

osaBH8_280::Errno osaBH8_280::SetMode ( Barrett::Value  mode)

Set joints torques.

Set the torques of each joint. First this converts the joints torques to motors torques. Then it packs the torques in two CAN frames. The first frame is addressed the upper arm group and the second frame is addressed to the forearm group (if present).

Parameters
torques[in]The motor torques
Returns
ESUCCESS if no error occurred. EFAILURE otherwiseSet velocity warning The safety module intercepts joints positions and compute joints velocities from them. After "zeroing" the joints (setting their initial values), the safety module compute the Cartesian velocity of the elbow and the Cartesian velocity of the 4DOF end-effector. If any of these velocities is greater than the velocity warning limit, the safety module will display a warning on the 7-segment of the display pendant ("E" for elbow and "A" for arm) and the "Warning Velocity" LED will be on. The warning won't affect anything other than warn you to slow down before a velocity fault shuts down the arm.Set velocity fault The safety module intercepts joints positions and compute joints velocities from them. After "zeroing" the joints (setting their initial values), the safety module compute the Cartesian velocity of the elbos and the Cartesian velocity of the 4DOF end-effector. If any of these velocities is greater than the velocity fault threshold, the safety module will shutdown the arm and display the fault on the 7-segment of the display pendant ("E" for elbow and "A" for arm) and the "Velocity Fault" LED will be on. Set torque warning The safety module intercepts joints currents that are sent to the pucks. If any of these torques is greater than the torque warning limit, the safety module will display a warning on the 7-segment of the display pendant (the number of the joint with too much torque) and the "Warning Torque" LED will be on. The warning won't affect anything other than warn you to ease down the torque before a torque fault shuts down the arm. Keep in mind that this torque limit is "one size fits all". That is the torque warning limit of motor 1 will apply to motor 7 and vice versa.Set torque fault The safety module intercepts joints currents that are sent to the pucks. If any of these torques is greater than the torque fault limit, the safety module will shutdown the arm and display a warning on the 7-segment of the display pendant (the number of the joint with too much torque) and the "Fault Torque" LED will be on. Keep in mind that this torque limit is "one size fits all". That is the torque warning limit of motor 1 will apply to motor 7 and vice versa.Set the modes of the pucks
osaBH8_280::Errno osaBH8_280::SetPositions ( const vctDynamicVector< double > &  positions)

Send joints positions.

The BH8_280 has relative encoders, which means that you must "zero" the encoders each time the BH8_280 is powered. For this you manually move the BH8_280 to a know configuration and then call SendPosition. First, the safety module is turned off to avoid triggering a velocity fault. Then, the joints positions are converted to encoder counts and each position is overwritten by "setting" the position on each puck. Finally, the safety module is turned back on. Note that this does not "move" the robot, it only tells each puck the absolute position of its encoder.

Parameters
positions[in]The motor positions in radians
Returns
ESUCCESS if no error occurred. EFAILURE otherwise.

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