Changes between Version 1 and Version 2 of WAM/DetailedSystemOperation
- Timestamp:
- Jan 20, 2012, 4:37:29 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WAM/DetailedSystemOperation
v1 v2 4 4 The 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. 5 5 6 NOTE: 7 There are several different models of the BarrettHand; this guide only deals with the newerBH8-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.) 8 8 9 9 Both 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: … … 44 44 == Software Architecture == 45 45 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.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 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. 47 47 48 48 Barrett 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. 49 49 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. 52 52 53 53 Unfortunately, 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: … … 55 55 * Writing to a file 56 56 * Communicating over a socket (even in non-blocking mode) 57 * Using the malloc()function in C or C++58 * Using the newoperator in C++57 * Using the `malloc()` function in C or C++ 58 * Using the `new` operator in C++ 59 59 60 60 The 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. … … 64 64 1. Initialize the products 65 65 1. 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 angles67 1. Use the measured motor angles to calculate joint angles68 1. Perform some calculations that result in a set of desired joint torques69 1. Use the desired joint torques to calculate motor torques70 1. Command the WAM Pucks to apply the desired motor torques71 1. Sleep for the remainder of the loop period66 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 72 72 1. In the original (non-real time) thread, produce different WAM behaviors as desired by instructing the control thread to perform different joint torque calculations 73 73