User guide

Copyright © 2010, Dr Robot Inc. All Rights Reserved.
www.DrRobot.com
- 20 -
Motion Control/Sensing System:
Jaguar comes with a special version of PMS5005 as its motion control and sensing board. It follows the Dr Robot
WiRobotSDK protocol and user could control and access Jaguar by Dr Robot ActiveX control
(DrRobotSentinelActivexControl.ocx) and WiRobot gateway program.
Based on the protocol, you can develop your own program on any system. You could request protocol sample
code from Dr Robot using C++/Java. You should contact Dr Robot with any questions regarding SDK API and
protocol.
The communication port is connected at WiFi module-I port 1.
Gateway program will connect to this board at 192.168.0.60, port 10001.
Here is C# sample code to control Jaguar System with ActiveX control,
myJaguar is DrRobotSentinelActiveXControl.
Arm Motor control: By default the system provides synchronized control, so the left/right arm motors only use
channel 0 PWM signal, but you can get each encoder reading for left arm and right arm.
private void myJaguar_MotorSensorEvent(object sender, EventArgs e)
{
//here reads back PWM value for all motors
leftArmMotor.pwmOutput = myJaguar.GetMotorPWMValue1();
rightArmMotor.pwmOutput = myJaguar.GetMotorPWMValue1();
//right motor still uses PWM channel 0
leftWheelMotor.pwmOutput = myJaguar.GetMotorPWMValue4();
rightWheelMotor.pwmOutput = myJaguar.GetMotorPWMValue5();
leftArmMotor.encoderDir = myJaguar.GetEncoderDir1();
leftArmMotor.encoderPos = myJaguar.GetEncoderPulse1();
leftArmMotor.encodeSpeed = myJaguar.GetEncoderSpeed1();
rightArmMotor.encoderDir = myJaguar.GetEncoderDir2();
rightArmMotor.encoderPos = myJaguar.GetEncoderPulse2();
rightArmMotor.encodeSpeed = myJaguar.GetEncoderSpeed2();
}
You can read board voltage(5V) and battery voltage in standard sensor Event.
private void myJaguar_StandardSensorEvent(object sender, EventArgs e)
{
boardVol = ((double) myJaguar.GetSensorBatteryAD1() / 4095 * 9);
motVol = ((double) myJaguar.GetSensorBatteryAD2() / 4095 *
33.749);
}
You can read motor temperature sensor in custom sensor event, function Trans2Temperature() is based on the
sensor specification to translate AD value to temperature celcius degree.
Also you can read left/right wheel motor encoder in this event.
private void myJaguar_CustomSensorEvent(object sender, EventArgs e)
{
//here can read back left wheel motor and right wheel motor
encoder information
leftWheelMotor.encoderPos = myJaguar.GetEncoderPulse4();
leftWheelMotor.encodeSpeed = myJaguar.GetEncoderSpeed4();