ECA Arm Quick Start

Power on the arm by turning on the power supply, then pressing the power button on the raft.  It should illuminate green when the arm is powered.  

Open the debian virtual machine.  Make sure the serial to usb converter and xbox controller are connected to the VM in the VM -> Removable Devices menu.  Launch a terminal and navigate to ~/hovergroup/ivp-extend/raft

cd ~/hovergroup/ivp-extend/raft

The mission.moos file in this directory contains all the necessary configuration information for the various applications.  Launch the MOOSDB first, followed by the other applications in new terminal windows (ctrl-shift-t to open a new tab in the same directory).

MOOSDB mission.moos
iEcaArm mission.moos
iXbox360Controller mission.moos
pRaftControl mission.moos

If the arm driver starts misbehaving first try stopping (ctrl-c) and restarting it, then consider reconnecting the serial device or rebooting the virtual machine.  You should now be able to control the arm with the xbox controller.  Press the start button to enable/disable the arm and the back button to toggle between velocity and speed control.  Launch uXMS to monitor the variables being used:

uXMS mission.moos ECA_YAW_SPEED ECA_SHOULDER_SPEED ECA_ELBOW_SPEED ECA_WRIST_SPEED ECA_GRIP_SPEED ECA_YAW_POSITION ECA_SHOULDER_POSITION ECA_ELBOW_POSITION ECA_WRIST_POSITION ECA_GRIP_POSITION ECA_YAW_SPEED_CMD ECA_SHOULDER_SPEED_CMD ECA_ELBOW_SPEED_CMD ECA_WRIST_SPEED_CMD ECA_GRIP_SPEED_CMD ECA_UPDATE_RATE ECA_WRIST_VOLTAGE_CMD ECA_ELBOW_VOLTAGE_CMD ECA_GRIP_VOLTAGE_CMD ECA_SHOULDER_VOLTAGE_CMD ECA_YAW_VOLTAGE_CMD

For matlab control, open a new terminal window and navigate to ~/hovergroup/raft/mexmoos_eca before launching matlab

cd ~/hovergroup/raft/mexmoos_eca
matlab

Mextest.m and mexsine.m both contain basic examples of commanding the arm and recording data.  pRaftControl must be stopped before trying to control the arm from matlab or it will continue to send conflicting commands.  

iEcaArm

Both voltage and speed commands are possible, and the type of command used may vary across the actuators.  The command variables used are ECA_[JOINT]_VOLTAGE_CMD or ECA_[JOINT]_SPEED_CMD, where [JOINT] can be one of YAW, SHOULDER, ELBOW, WRIST, or GRIP.  If a given joint does not receive a command for 0.5 seconds, it will automatically be commanded to stop.  

Both voltage and speed commands have a range of 0 to 100, which is automatically mapped to the voltage or speed ranges.  Maximum speed is set in the mission file (default 12000), though the arm can achieve slightly different speeds across different joints.  Since 12000 is greater than the maximum achievable joint speed, commanding 100% speed is akin to commanding 100% voltage.  

Speed and position for each joint is reported to ECA_[JOINT]_SPEED and ECA_[JOINT]_POSITION.  The current comms rate (default 50 Hz) is posted to ECA_UPDATE_RATE.  This comms rate affects both commands and sensor readings, so the theoretical maximum delay from when a command is posted to the MOOSDB to being sent to the arm is 20ms at the default 50Hz rate.  Position and speed are in unknown units from the built in encoders.  Position may also wrap around between the mechanical hard stops.  

Other variable postings are:
ECA_VOLTAGE - voltage supplied to the arm
ECA_CURRENT - total arm current usage
ECA_TEMPERATURE - temperature in the controller housing
ECA_[JOINT]_CURRENT - unit-less current to each joint motor, can be used to detect stall conditions
ECA_[JOINT]_TEMPERATURE - temperature at each joint

Temperature should not be allowed to exceed 50 degrees.  

iRaftRoboteq

Commands are issued using the variables DESIRED_THRUST_LEFT and DESIRED_THRUST_RIGHT and should be in the range 0 to 100.  The command timeout is set by the motor driver's on-board configuration along with other options, such as slew rate limits (acceleration).  The ECA arm can be powered on and off by posting 1 or 0 to ECA_ARM_POWER, though this can again be bypassed through the on-board configuration.  

Data is reported to the following variables:
ROBOTEQ_BATTERY_VOLTAGE - input voltage
ROBOTEQ_MOTOR_CURRENT_[RIGHT/LEFT] - current through the motor windings
ROBOTEQ_BATTERY_CURRENT_[RIGHT/LEFT] - current from the battery
ROBOTEQ_TEMPERATURE_[RIGHT/LEFT]
ROBOTEQ_ESTOP - estop on or off (1 or 0)
ROBOTEQ_POWER_[LEFT/RIGHT] - actual output to motors, including effects from slew rate (0 to 1000)

Debug variables:
ROBOTEQ_REPORT_RATE - how fast sensor data (specifically power output) is reported in Hz
ROBOTEQ_COMMAND_RATE
ROBOTEQ_NACK_RATE - should be zero
ROBOTEQ_ACK_RATE - should be the same as command rate  

pRaftControl

pRaftControl allows the arm and motor controller to be controlled using the xbox 360 controller.  Mappings are:
left and right thrust - left and right analog stick y axis
eca arm yaw - dpad x axis
eca arm shoulder - dpad y axis
eca arm elbow - a and buttons
eca arm wrist - left and right trigger
eca arm grip - left and right button 

Electrical Details:

Thruster cables run black to top left, white to top right.

Roboteq pinouts:
  2:    TxOut - green - DB9 pin 2
  3:    RxIn - blue - DB9 pin 3
  4:    DIN1 - estop
  9:    DOUT2 - sink for arm relay control
  14:  +5v - estop (NC)


  • No labels