Date post: | 01-Jan-2016 |
Category: |
Documents |
Upload: | kevin-robertson |
View: | 217 times |
Download: | 0 times |
CS 8903 DemoCS 8903 DemoWireless Wireless
Interface for the Interface for the Bioloid RobotBioloid Robot
Chetna KaurChetna Kaur
Problem StatementProblem Statement• Set up a Wireless Communication
Interface for PC-Bioloid communication.
• Dynamically control the Bioloid’s movements from an external program using wireless communication.
• Build an interface for c5m based systems to interface with and dynamically control the Bioloid.
IntroductionIntroduction
The Bioloid KitThe Bioloid Kit
• Easy to configure into a variety of robotic creatures.
• Can interact with surroundings while performing complex movements [18 Servos].
• Head contains a sensor module which features an infrared receiver.
• Also has three proximity sensors (left, right and front) that can measure distance and luminosity.
• The brain of the Bioloid is the CM-5 module which runs an Atmel ATMega128 based mcu.
Programming the BioloidProgramming the Bioloid
• A full motion editor to program your own custom movements
• Visual programming environment for behavior logic.
• A Terminal for configuration of components and other maintenance tasks.
Motion EditorMotion Editor
• Capture the current positions of the motors/ Pose of the robot.
• Build frame-by-frame Motion Sequences
• Complex animations can be quickly programmed and tested.
• Motions can be downloaded into the Bioloid's memory and called from the Behaviour Control Program.
Behavior Control ProgramBehavior Control Program• A graphical
programming environment to control the behaviour of the bioloid.
• Allows the programmer to transition the state of a the robot when a particular stimulus or events is triggered.
PC-to-Bioloid PC-to-Bioloid Wireless Wireless
Communication Communication InterfaceInterface
Building the Wireless Building the Wireless Interface Interface
• Bioloid supports the Zig-100 Wireless Communication Module
• Supports ZigBee Communication Protocol
Building the Wireless Building the Wireless InterfaceInterface
– Install one Zig-100 module in the Bioloid robot's CM-5 control module.
– Connect the second Zig-100 to a Zig2Serial adapter.
– Install and configure the USB2Dynamixel module.
– Use the USB2Dynamixel converter between the PC and the Zig2Serial Board.
– Configure the Zig100 module from the Terminal program
– Issue commands to the robot via the computer's serial port!
Zig 100 Communication Zig 100 Communication ProtocolProtocol
• CM5 is programmed to send and receive integers (0-65535) using Zig100.
• Packet format explained with example
The data in this example is integer 2049 = 01 + 256decimal * 08
Here is the CM5/Zig100 format, as hex bytes:
FF 55 01 FE 08 F7
where:
FF 55 is the header.
FE is checksum for 01 -> 255decimal - 01 = FE (i.e. Complement of byte)
F7 is checksum for 08 -> 255decimal - 08 = F7 (i.e. Complement of byte)
Algorithm for PC-Bioloid Algorithm for PC-Bioloid CommunicationCommunication
Open Serial PortSet baud rate to 57142Loop
If input from keyboard/other programBegin
Accept InputCode it to CM5 format Write to Serial Port
EndIf input from USB Serial Port Then Begin
Read it Decode CM5 format Do processing
End End Loop
Behavior Control Program to Behavior Control Program to receive datareceive data
• Show Development Environment Now
Protocol to drive the motorsProtocol to drive the motors• Essential to define the protocol/commands for
communication between an external program and Bioloid.
• Currently defined for communicating positions of the 18 Motors.
• Command = Motor Id *1024 + Motor Position
• Encode (Motor Id and Position) and send from PC-based program.
• Receive and decode in Behavior Control Program.
• Set the Motor’s position!
Interfacing with the C5M Interfacing with the C5M code basecode base
C5M Based System
Interface CM5/ BioloidInter RobotCommProtocol
Zig BeeProtocol
Interface DesignInterface Design
Joint Positions Handler
SerialCommunication
Module
Config
IRCP UDP Module(Receiver)
Interface Manager
C5M Based System(IRCP UDP Sender)
Zig100
IRCPIRCP• Essentially designed for Inter-module
communication in Interactive Robots• Protocol is based on UDP – can be
used for communication between multiple processes on a single computer and between different computers
IRCP Packet FormatIRCP Packet Format
Motion Control Using IRCPMotion Control Using IRCP
• Motor System will work in a slave mode.
• All modules that communicate with a motor system will have agreed on a set of joint names.
• The Master will request a Motor System Information sub-packet from the motor system (slave), which will list the names of the joints supported by the motor system and assign each one an integer index.
• The master will verify that the joint names are as expected and assign indices to each of these motors.
• All future communication with the motor system will refer to each joint by its index for efficiency.
• Once this is set up the Master can now send messages to Set The Joint Positions (and also several other messages).
Setting Motor PositionsSetting Motor Positions• Minor Type: SET_TARGET_POSITIONS
• Subpacket Payload contains Index Matched Array
• Index = Motor Id; Value = Motor Position
Index 1 Index 2 Index nValue 1 Value 2 Value n……….
Mapping MotorsMapping Motors• Need to map the Motion of the C5M
based robot to the Bioloid
• Motor Map used to Map Motor Ids. Read from config file and and installed on start-up.
• Map the motor positions.
Encode and Send to CM5Encode and Send to CM5• Maintain a map of the last values
which were sent for each of the motors of the Bioloid.
• Encode and send messages to CM5 for every motor whose position has changed.
• CM5 will decode the message and set the motor position.
Interfacing with the Interfacing with the HuggableHuggable
Request Motor Information (Minor Type: MOTOR_NAMES)
Send Indexed Array containing Huggables Motor Names (Minor Type : REQUEST_RESPONSE)
Send target positions for Huggable Motors (SET_TARGET_POSITION)
Map to Bioloid Motors
InterfaceHuggable Bioloid
Send Motor Positions to Bioloid
Huggable’s MotorsHuggable’s Motorspublic static final String[] motorNameMap = new String[] {
“neckUpDown", "neckTwist", "neckLeftRight", "rEarUpDown", "lEarUpDown", "rEyebrowRotate", "lEyebrowRotate", "lshoulderUpDown", "rshoulderUpDown", "rshoulderRotate", "lshoulderRotate", "lhipLeftRight", "rhipLeftRight", "lhipUpDown", "rhipUpDown", "rAnkleUpDown", "lAnkleUpDown"
};
Currently we ignore most of these and map only lshoulderUpDown, rshoulderUpDown, rshoulderRotate, lshoulderRotate to the Bioloid Motors
DemoDemo
• Show Demo Now!
Next Step Next Step Forward?Forward?
Questions?Questions?