background image

Activ

Media Robotics 

 

11

Generic Servo Positioning Mode Commands 

You may use the Pioneer 2 Arm’s generic Servo Positioning command to position a joint.  
The command consists of three bytes:  the header (0xFF), a servo-selector byte, and the 
position value byte.  The servo-selector byte’s most significant bit (b7) always is off (0) to 
distinguish servo-positioning commands from control-mode commands.  Its remaining bits 
(b

0-6

) select the servo number, for a total of up to seven joints.  Only joints one—the base 

swivel—through six—the gripper—are active with the Pioneer 2 Arm. 

The servo-positioning byte allows up to 255 different servo positions, although in practice, 
the range of positions for any individual joint and depending on the individual Arm varies 
to roughly 200 positions around values 25-235.  Our P2OS-based servers let you set realistic 
position boundaries (min and max) and center offsets, so that your client-side code is 
portable from Arm to Arm.   See following sections for details. 

For example, using the generic command to turn the Pioneer 2 Arm fully clockwise 
around its base (servo number 1), you may send the generic command byte sequence: 

0xFF, 0x1, 0xFF 

P2OS HOST to AUX Serial Port Communications 

To send generic control and servo-positioning commands from your client software to the 
Pioneer 2 Arm controller, you need to use the P2OS TTY2 command number 42 with an 
integer (two-byte) or string argument.  This is necessary since all generic commands from 
your software to the Pioneer 2 Arm pass through your Pioneer 2’s HOST serial port and 
through P2OS to the Arm-attached AUX serial port on the robot’s microcontroller. 

Similarly, to retrieve responses from the Arm controller using generic commands, use the 
P2OS 

GETAUX

 command number 43 and corresponding 

SERAUXpac

 server information 

packet.   Command and packet details are in the 

Pioneer 2 Operations Manual

.  The 

various client-development environments for Pioneer 2 support these functions, including 
Saphira and ARIA. 

For example, to raise the Arm up (joint servo number 2) to roughly its center position, you 
may use the Saphira client sequence: 

unsigned char pos_servo[3] = {0xFF, 0x00, 0x00}; 
pos_servo[1] = 0x02;  /* Select servo number 2 */ 
pos_servo[2] = 0x7F;  /* Center position */ 
sfRobotComStrn(42,pos_servo,3); /* Saphira creates command packet and sends it; 

P2OS transfers string out through AUX port to Arm */ 

You see easily how quickly Pioneer 2 Arm control through its generic command set 
becomes tedious.  We leave the details for retrieving generic command responses, such 
as for the Arm version number, to the astute reader; we don’t recommend using the 
generic Arm controls, and don’t want to belabor the point… 

 P2OS Arm Servers 

P2OS version 1_H introduces advanced control functions for safe and convenient 
operation of the Pioneer 2 Arm.  These include commands to enable and disable power 
to the Arm’s servos, to move the Arm to a new position—joint-by-joint and each at a 
controllable speed—and to query for current arm position and status.   The servers also 
include safety watchdogs that monitor Arm status and functions, and which act to 
minimize power consumption as well as help protect your Pioneer 2 Arm and 
surroundings from damage. 

Summary of Contents for Pioneer 2 Arm

Page 1: ...Pioneer 2 Arm...

Page 2: ...edia Robotics Developers and users are authorized by revocable license to develop and operate custom software for personal research and educational use only Duplication distribution reverse engineerin...

Page 3: ...g the unit or any of its accessories Keep equipment away from hair or fur Inappropriate Operation Inappropriate operation voids your warranty Inappropriate operation includes but is not limited to Dro...

Page 4: ...ION AND DEVELOPMENT SOFTWARE 7 P2ArmDemo 7 SAFETY WATCHDOGS 8 Power and Connection Related Automatic Shutdown 8 Timed Shutdown 8 Gripper Release Timer 9 Warm Reset 9 CHAPTER 3 PROGRAMMING 10 GENERIC C...

Page 5: ...mputer to Robot 19 Step 2 Enable FLASH 19 Step 3 Put Microcontroller into Download Mode 19 Step 4 Run p2oscf 19 Step 5 Changing Configuration Parameters 20 Step 6 Save Your Work 20 EDITING P2OS ARM PA...

Page 6: ...vi...

Page 7: ...ferential skid steering version intended for outdoor all terrain AT operation Otherwise the platforms are nearly identical and share accessories including the Pioneer 2 Arm All Pioneers come with onbo...

Page 8: ...Operating System P2OS servers Your client software communicates with and controls the Arm through these P2OS servers Arm Package Your Pioneer 2 Arm is factory installed Our experienced manufacturing...

Page 9: ...anuals Access to private robotics newsgroups Direct access to the ActivMedia Robotics technical support team Software We maintain a 24 hour seven day per week Web server where customers may obtain sof...

Page 10: ...neer users Access to the pioneer users newslist is limited to subscribers so your address is safe from spam However the list currently is unmoderated so please confine your comments and inquiries to i...

Page 11: ...CAUTION Always align your Pioneer 2 Arm into it s HOME position before use 1 Put the Arm into its home position The tip of the Arm s V shaped mounting base should point towards the rear of the robot a...

Page 12: ...ons last programmed into the con troller And if power is removed from the servos the Arm will fall into its mechanically limpest position Since the Arm s joint positions cannot be known they are assum...

Page 13: ...communications with your robot and its accessories thereby obviating the need for additional wireless modems or an expensive onboard PC with multiple serial ports Perhaps more importantly we ve inclu...

Page 14: ...atic Shutdown Because it is attached to the Pioneer 2 microcontroller your software may command and control the Pioneer 2 Arm only while it has an established client server connection with P2OS Moreov...

Page 15: ...2 s FLASH memory and modified with the p2oscf configuration utility The timer defaults to five minutes and can be disabled The timer gets reset every time your software opens the gripper to or near it...

Page 16: ...ther hand give you control over joint speeds and maintain current position information as well as a variety of other advanced and convenient features Which is why we recommend that you program to the...

Page 17: ...er 2 Arm pass through your Pioneer 2 s HOST serial port and through P2OS to the Arm attached AUX serial port on the robot s microcontroller Similarly to retrieve responses from the Arm controller usin...

Page 18: ...s _AUTOPARK 80 0 65535 Disable the autopark watchdog 0 or reset it to some time in seconds other than default AutoParkTimer in FLASH _GRIPPARK 81 0 65535 Disable the gripper watchdog 0 or reset it to...

Page 19: ...connected n 1 0 7 Number of Pioneer 2 Arm joints default is six 0 if no Arm n 2 0 127 Servo 1 s speed setting n 3 0 255 Servo 1 s home position setting n 4 0 127 Servo 1 s minimum position value n 5 1...

Page 20: ...vidual joint speeds on the fly with the ARM_SPEED command number 78 or set their start up defaults through FLASH parameters see next chapter 1 127 milliseconds delay each Speeds may be set at any time...

Page 21: ...number 1 6 as command parameter or all command parameter 255 of your Pioneer 2 Arm joints to their home default positions Use the ARM_PARK command number 76 to send all the joints to their home positi...

Page 22: ...it for restoration of communication bit 1 of the status byte 2 Issue the ARM_INIT command 3 Use ARM_STAT and ARM_INFO SIP requests to reinitialize any client side variables that my be tracking joint p...

Page 23: ...d 1 127 ms per tick void sfP2ArmStop int joint Stop moving joint 1 6 or all 255 joints void sfP2ArmPark void Send Arm home and disable servo power void sfP2ArmAutoPark int waitSecs Forces ArmPark afte...

Page 24: ...n values for each joint at the extremes maximum and minimum The servos behaviors at the extremes are unpredictable The speed parameters are default joint speeds in 10 millisecond increments Unlike the...

Page 25: ...rect connection Step 2 Enable FLASH Locate the FLASH switch on the Pioneer 2 Console It s recessed and may be covered by an accessory Use a flat bladed screwdriver or other thin instrument to move the...

Page 26: ...robot s FLASH If you don t save your changes to FLASH they won t take effect We also strongly recommend that you save your work to disk as well for later retrieval should your microcontroller get dam...

Page 27: ...it is closed presumably gripping something for time seconds 0 disables Command Description keyword value Alone keyword displays current edited value Add value argument to change current value c or con...

Page 28: ...e end of the keyword refers to the joint Values are a positive decimal or hexadecimal 0xN numbers from 0 to 255 except speeds which are constrained from 1 to 127 For example to change the home positio...

Page 29: ...2184 fax 603 924 9100 voice In the body of your email or fax message describe the problem in as much detail as possible Also include your name email and mail addresses as well as phone and fax numbers...

Page 30: ...minum and plastic with foam covered gripper fingers MOTION 5 DOF arm and 1 DOF gripper POWER 5 and 12 VDC supplied by Pioneer robot ARM RANGE 50 cm fully extended GRIPPER RANGE Gripper fingers part to...

Page 31: ...control 10 GETAUX 11 Gripper release 9 GripperParkTimer 9 Home 6 15 HOST port 11 Installation 5 Joints 1 Konolige Kurt 1 Newsgroups 4 p2Arm 16 p2Arm directory 16 P2ArmDemo 7 P2OS 1 10 12 Arm servers 1...

Page 32: ...ers and manufacturers of ActivMedia Robotics products shall bear no liabilities for operation and use of the robot accessory or any accompanying software except that covered by the warranty and period...

Page 33: ...44 Concord Street Peterborough NH 03458 603 924 9100 603 924 2184 fax http www activrobots com...

Reviews: