Changes between Version 1 and Version 2 of WAM/DetailedSystemOperation


Ignore:
Timestamp:
Jan 20, 2012, 4:37:29 PM (12 years ago)
Author:
dc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WAM/DetailedSystemOperation

    v1 v2  
    44The WAM Arm is modular and comes in three major configurations: 4-DOF (degrees of freedom), 7-DOF with a Wrist, and 7-DOF with Gimbals. Both the 4-DOF and 7-DOF with Wrist configurations have a tool-plate at the end that supports attaching a BarrettHand, Barrett's 6-axis Force/Torque Sensor, and customer-designed tools and sensors.
    55
    6 NOTE:
    7 There are several different models of the BarrettHand; this guide only deals with the newer BH8-280 model. The base of the BH8-280 is blue, while older models are gold or black. Before plugging a BH8-280 into a WAM, make sure that the WAM's wiring is 280-compatible. (Contact support@barrett.com for information about upgrading an older WAM to be 280-compatible.)
     6    '''NOTE:'''[[br]]
     7    There are several different models of the BarrettHand, the most recent of which is the BH8-280 model. The base of the BH8-280 is blue, while older models are gold or black. Before plugging a BH8-280 into a WAM, make sure that the WAM's wiring is 280-compatible. (Contact support@barrett.com for information about upgrading an older WAM to be 280-compatible.)
    88
    99Both the Hand and the WAM make use of Barrett's proprietary brushless DC motor controllers, known as Pucks. Each Puck is mounted to the back of the motor it controls and contains:
     
    4444== Software Architecture ==
    4545
    46 In addition to having a CAN card, it is necessary for the Control PC to use a real time operating system. A normal computer operating system does not make any guarantees about when a particular program will be allowed to execute. If the operating system decided, for example, to write a large chunk of data out to the hard disk, it could be 10s or 100s of milliseconds before the program controlling the WAM regained control of the processor. During that entire period, the Pucks would continue to apply the last commanded torque. A person interacting with the robot would feel the arm jerk slightly when the WAM program issued large correctional torques to compensate for the drift that had occurred during the uncontrolled time. Under certain conditions, the robot might even become unstable (though the Safety Module is designed to detect this condition). For proper operation of the WAM, it's very important for the Pucks to receive their torque commands on time.
     46In addition to having a CAN card, it is necessary for the Control PC to use a real time operating system. A normal computer operating system does not make any guarantees about when a particular program will be allowed to execute. If the operating system decided, for example, to write a large chunk of data out to the hard disk, it could be 10s or 100s of milliseconds before the program controlling the WAM regained control of the processor. During that entire period, the Pucks would continue to apply the last commanded torque. A person interacting with the robot would feel the arm jerk slightly when the WAM program issued large correctional torques to compensate for the drift that had occurred during the uncontrolled time. Under certain conditions, the robot might even become unstable (though the Safety Module is designed to detect instability through velocity faults and torque faults). For proper operation of the WAM, it's very important for the Pucks to receive their torque commands on time.
    4747
    4848Barrett uses the Xenomai real time co-kernel in conjunction with the Ubuntu Linux distribution to form a real time operating system. Essentially, Xenomai allows the programmer to create a thread of execution that has a higher priority than all of Linux. Xenomai is also very careful about how it handles CPU interrupt requests.
    4949
    50 NOTE:
    51 Xenomai integrates very closely with a computer's specific hardware. It is sensitive to implementation details that are irrelevant to normal operating systems. It is often the case that information about these details is not published by computer equipment manufacturers. The implementation may even change across different revisions of the “same” product! It is not always possible to use a given computer to run the WAM. Because of this, Barrett strongly recommends using either the WAM's internal PC/104 or a pre-configured computer supplied by Barrett.
     50    '''NOTE:'''[[br]]
     51    Xenomai integrates very closely with a computer's specific hardware. It is sensitive to implementation details that are irrelevant to normal operating systems. It is often the case that information about these details is not published by computer equipment manufacturers. The implementation may even change across different revisions of the “same” product! It is not always possible to use a given computer to run the WAM. Because of this, Barrett strongly recommends using either the WAM's internal PC/104 or a pre-configured computer supplied by Barrett.
    5252
    5353Unfortunately, this real time functionality comes at a cost: there are many common operations that are not allowed in a real time thread. Forbidden operations include:
     
    5555 * Writing to a file
    5656 * Communicating over a socket (even in non-blocking mode)
    57  * Using the malloc() function in C or C++
    58  * Using the new operator in C++
     57 * Using the `malloc()` function in C or C++
     58 * Using the `new` operator in C++
    5959
    6060The requested action will still be performed if one of these features is used in a real time thread, but the thread will automatically drop from “primary mode” into “secondary mode”. A Xenomai thread running in primary mode is a real time thread. A Xenomai thread running in secondary mode behaves like a normal Linux thread; it does not make a real time guarantee. It is important to structure a WAM control program such that the real time sections do not use these forbidden operations.
     
    64641.      Initialize the products
    65651.      Start a real time control thread that does the following tasks once every 2 milliseconds:
    66  1.     Ask the WAM Pucks to report their motor angles
    67  1.     Use the measured motor angles to calculate joint angles
    68  1.     Perform some calculations that result in a set of desired joint torques
    69  1.     Use the desired joint torques to calculate motor torques
    70  1.     Command the WAM Pucks to apply the desired motor torques
    71  1.     Sleep for the remainder of the loop period
     66 a.     Ask the WAM Pucks to report their motor angles
     67 a.     Use the measured motor angles to calculate joint angles
     68 a.     Perform some calculations that result in a set of desired joint torques
     69 a.     Use the desired joint torques to calculate motor torques
     70 a.     Command the WAM Pucks to apply the desired motor torques
     71 a.     Sleep for the remainder of the loop period
    72721.      In the original (non-real time) thread, produce different WAM behaviors as desired by instructing the control thread to perform different joint torque calculations
    7373