Due to the relative high updates necessary for stable control, we are using custom written C++ programs, with an hardware interrupt driven update loop. The interrupt is driven by the s626 IO board, which even under Windows XP, ensures exact timing of updates. The code is developed under Microsoft visual C++ 6.0 and can be freely downloaded. A good place to start is the project ManipulandumTest.cpp, which has the basic functionality for testing and updating the robot, spatial calibration, etc.
This is a sample program that demonstrates the initialization of the robot, an interrupt-driven update loop, simulates different force environments, allows for testing and fault search, and implements a routine for the spatial calibration of the robot. At start of the program, a small white text-display window opens with a command prompt (>). At command line you can use the following commands
- cntr: set the global coordinate to (0,0) for the current joint configuration of the robot.
- state: updates all system variables of the robot on the Text display, until a key is pressed
- valves v1 v2 v3 v4: Sets the voltages to the four valves to the values (useful for testing individual valves)
- force x y: sets the forces produced at the endpoint to (x,y)
- updateforce num: Simulates a certain force environment
- 0: Null field
- 1: Spring
- 2: resistive field
- 3: Curl field
- cal infile outfile: performs spatial calibration (see calibration page)