1k likes | 1.2k Views
CLARAty : C oupled L ayer A rchitecture for R obotic A u t onom y. Issa A.D. Nesnas Ames Research Center Carnegie Mellon University Jet Propulsion Laboratory University of Minnesota (FY03) CLARAty Workshop - January 13, 2003 Sponsors: Mars Technology Program Intelligent Systems Program.
E N D
CLARAty: CoupledLayerArchitecture forRoboticAutonomy Issa A.D. Nesnas Ames Research Center Carnegie Mellon University Jet Propulsion Laboratory University of Minnesota (FY03) CLARAty Workshop - January 13, 2003 Sponsors: Mars Technology Program Intelligent Systems Program
Presentation Overview • Architecture Overview • Challenges of Interoperability • Software Implementation and Status • CLARAty testbed • Selected Examples • Motion Control • Locomotion • Navigation • Summary CLARAty Workshop - I.A.N.
What is CLARAty? CLARAtyis a unified andreusable software that provides robotic functionality and simplifies the integration of new technologies on robotic platforms A research tool for technology development and maturation CLARAty Workshop - I.A.N.
CLARAty Development Team • NASA Ames Research Center • Maria Bualat • Clay Kunz • Randy Sargent • Anne Wright (lead) • Carnegie Mellon University • Kam Lasater • Reid Simmons (lead) • Chris Urmson • David Wettergreen • Andy Yang • Jet Propulsion LaboratoryCLARAty on FIDO Team • Hrand Aghazarian (35/34) • Terrance Huntsberger (35/34) • Chris Leger (35/34) • Matthew Robinson (35/34) CLARAty/Rocky8/Rocky7 • Max Bajracharya (34) • Edward Barlow (34) • Caroline Chouinard (36) • Gene Chalfant (34) • Hari Das (34) • Tara Estlin (36) • Dan Gaines (36) • Mehran Gangianpour (34) • Dan Helmick (34) • Won Soo Kim (34) • Michael Mossey (31) • Issa A.D. Nesnas (34) (Task Manager) • Ashitey Trebi-Ollennu (35/34) • Richard Petras (34) • Stergios Roumeliotis (Univ. of Minnesota) • Kevin Watson (34) Five Summer Students http://claraty.jpl.nasa.gov/team CLARAty Workshop - I.A.N.
Working Groups • CLARAty Navigation Group (Lead: Reid Simmons - CMU) • CLARAty Vision Group (Lead: Max Bajracharya - JPL) • CLARAty Mobility & Manipulation Group (Lead: TBD / Hari Das (former)) • CLARAty Estimation Group (Lead: Daniel Gaines - JPL) • CLARAty Decision Layer Group (Lead: Tara Estlin - JPL) • CLARAty Test/Release Group (Lead: TDB - JPL) • CLARAty Rocky Rover Group (Lead: Richard Petras - JPL) • K9 CLARAty Developers (Lead: Anne Wright - ARC) • CLARAty Science Working Group (Lead: Ted Roush ARC/Meemong Lee - JPL) • CLARAty Simulation Group (Lead: Gene Chalfant - JPL) http://claraty.jpl.nasa.gov/groups CLARAty Workshop - I.A.N.
A Two-Layered Architecture CLARAty =Coupled LayerArchitecture forRoboticAutonomy THE DECISION LAYER:Declarative model-based Mission and system constraintsGlobal planning INTERFACE:Access to various levelsCommanding and updates THE FUNCTIONAL LAYER:Object-oriented abstractionsAutonomous behaviorBasic system functionality Adaptation to a system
Adapting to a Rover Decision Layer Rocky 8 Models/ Heuristics Connector Multi-level access Connector Generic Functional Layer Rocky 8 Specialized Classes & Objects Hardware Drivers Simulation CLARAty Workshop - I.A.N.
The Decision Layer General Planners (e.g. CASPER) Activity Database Plans Executives (e.g. TDL) Rover Models FL Interface CLARAty Workshop - I.A.N.
ASPEN/CASPER System Architecture Search Repair Optimize Heuristics Real-time System Legend System Module Domain-specific information Socket connection PCN Timeline Manager Activities to execute Act status; updates Can be socket connection or embedded TCN Pathplanning (outside module) Network Constraint Propagation Activity, timeline, & conflict info Interface / GUI Activity info Conflict status ADB modifications (e.g., add, modify, delete) Search commands Activity Database Goals & Init State Rover Model Timeline updates Activities Activity permission updates ASPEN CASPER Act, state & resource updates TDL Executive CLARAty Workshop - I.A.N.
The Functional Layer Adaptations Rover Simulation Behaviors Rocky 8 Navigation FIDO Manipulation Path Planning Locomotion K9 Estimation Vision Science Rocky 7 Transforms Math Sensor Motion Control Communication Input/Output Hardware Drivers CLARAty Workshop - I.A.N.
Functional Layer Components Rover Instrument CoordMotors IO Locomotor Manipulator Digital_IO Analog_IO LeggedLoc RBLoc WheeledLoc Arm Mast Connector VisualTracker VisualNavigator StereoGen Motor Socket Camera Correlator FeatureDetector ControlledMotor BBMotor SocketMsg Specialized Data Structures Location Behavior State Path ColorImage Image Camera Image HTrans Resource Waypoint General Purpose Data Structures Array_2D Database Bit LinkedList Matrix String Container Pixel Vector Location Point Standard Template Library CLARAty Workshop - I.A.N.
Top Level Abstractions Rover Rover_Impl Locomotor Pose Estimator Navigator R8_Rover R7_Rover Sim_Rover Mapper Connector Path Planner Static or Object Owned R8_Locomotor Camera x N R8_Power Power System D* Planner Gestalt_Nav Optional R8_Mast Mast R8_Arm Arm R8_Camera CLARAty Workshop - I.A.N.
Architectural Traverse Example Decision Layer Commanding and State Updates Rover Path Information K9 Rover Navigator <<active>> Gestalt Navigator Asynchronous e.g. Rate Set at: 5 Hz Global Cost Func Path Planner D* Path Planner Mapper Asynchronous e.g. Rate Set at: 8 Hz Locomotor Grid Mapper <<active>> K9_Locomotor Asynchronous Terrain Sensor <<active>> Pose Estimator Stereo Engine EKF Pose Estimator Stereo Processor JPL Stereo Synchronous/or Asynchronous e.g. Rate Set at: 10Hz used by other activities Stereo Camera Camera R Camera L CLARAty Workshop - I.A.N.
Architectural Traverse Example Decision Layer Commanding and State Updates Rover Path Information K9 Rover Navigator <<active>> R7/Soj Navigator Asynchronous e.g. Rate Set at: 5 Hz Path Planner Tangent Graph Mapper Asynchronous e.g. Rate Set at: 8 Hz Locomotor Obstacle Mapper <<active>> K9_Locomotor Asynchronous Terrain Sensor <<active>> Pose Estimator Stereo Engine EKF Pose Estimator Stereo Processor JPL Stereo Synchronous/or Asynchronous e.g. Rate Set at: 10Hz used by other activities Stereo Camera Camera R Camera L CLARAty Workshop - I.A.N.
Navigation Architecture interface Navigator Locomotor 1 Navigator Callback 1 1 0..* 1 1 interface Action Selector State Estimator Waypoint 1 Map Based Selector Fuzzy Logic Selector Rover Bug Selector Vehicle Model 1 … CLARAty Workshop - I.A.N.
Architectural Components • Data Structure Components (DSC) • Array, Vector, Matrix, Map, Container, LinkedList, Bit • Image, Message, Resource • Generic Physical Components (GPC) • Locomotor, Arm, Mast, Spectrometer, … • Specialized Physical Components (SPC) • K9_Locomotor, K9_Arm, R8_Mast, FIDO_Motor,… • Generic Functional Components (GFC) • ObjectFinder, LayerDetector, VisualNavigator, StereoProcessor, Localizer • Specialized Functional Components (SFC) CLARAty Workshop - I.A.N.
Architectural Components Impl • Defining base abstract classes for the generic types • DSC - abstract Data_Obj class • GPC- Device class • GFC - Behavior class • Additional core classes • Template Mz<T> for measurement • Template Es<T> for estimated values • Template State<T> for state handling CLARAty Workshop - I.A.N.
Guiding Principles • Use domain knowledge to guide design • Make all assumptions explicit • Use abstraction layers to help master complexity • Use information hiding to protect implementation variability • Use interfaces and documentation to define behavior • Avoid ineffective over-generalization • Encapsulate system specific runtime models • Capabilities vary considerably across platforms • Hardware and hence runtime models vary across systems • Need for both cooperative and pre-emptive scheduling • Least common denominator solutions are unacceptable in hardware/firmware/software interactions CLARAty Workshop - I.A.N.
On Generic Algorithms • Technologies that are generic by design should not be constrained by the software architecture & implementation • Non-generic technologies should be accommodated on the appropriate platforms • Example (Generic): if you are working in navigation, you would not care about H/W architecture difference among different rovers • Example (Specific): if you are doing wheel/terrain interaction research, you might require specific hardware which one of the vehicles would support CLARAty Workshop - I.A.N.
Software Development Process AFS Backbone Authentication ... ARC JPL UW CMU Repository Repository CLARAty VxWorks K9 ATRV 3rd Party Web Releases Repository Some CLARAty Statistics ~170 Modules (reusable entity) ~31 Packages (module grps) ~3 rovers ~250,000 lines of C++ code ~Java/scripts/ and models Rocky 8 FIDO Rocky 7 Benchtops Benchtops Benchtops K9 CLARAty Workshop - I.A.N.
Infrastructure & Platform Support • Object-oriented Architecture and Design Patterns • C++ Implementation (with some Java) • AFS backbone • YaM for collaborative distributed development environment • ACE for OS independence • Qt for Graphics Display • Operating Systems & Architectures: CLARAty Workshop - I.A.N.
Levels of Software Integration • Level I - Encapsulated • Uses CLARAty components to interact with rover • Does not support a CLARAty API • Runs on at least one robot platform • Level II - Encapsulated & Integrated • Conforms to a generic CLARAty API (or parent class) • Level II - Integrated • Has no unsupported 3rd party dependencies • Runs on all applicable rover platforms • Level III - Refactored and Reviewed • Software reviewed by committee to ensure internal/external consistency • Uses all applicable CLARAty classes • Internally conforms to CLARAty conventions and coding standards • Level + - Reused • Re-used by other modules in CLARAty - dependent module • Provides access to all internal data products CLARAty Workshop - I.A.N.
Currently Supported Platforms K9 Linux x86 Rocky 8 Rocky 7 Ames VxWorks x86 VxWorks ppc JPL JPL FIDO FIDO ROAMS ATRV VxWorks x86 Linux Linux Solaris x86 JPL CMU JPL CLARAty Workshop - I.A.N.
Distributed Hardware Architecture Sun Sensor 1394 Bus RS232 Serial Compact PCI IMU x86 Arch Wireless ethernet 1394 FireWire I2C Bus Rocky 8 K9 • Rocky Widgets • Single Axis Controllers • Current Sensing • Digital I/O • Analog I/O I2C / Serial Bus • K9 Controllers • PIC Servos • Current Sensing • Digital & Analog I/O Potentiometers Actuator/Encoders CLARAty Workshop - I.A.N.
Custom Architecture/Variability Gyros Accels Video Switcher VME Arch AIO m68k Arch Framegrabbers Digital I/O Analog I/O Wireless ethernet AIO Rocky 7 Parallel Custom Interface MUX/Handshaking Potentiometers PID Controllers Actuator/Encoders CLARAty Workshop - I.A.N.
Centralized Hardware Mapped Architecture Video Switcher RS232 Serial PC104 IMU x86 Arch Framegrabbers Digital I/O Analog I/O Wireless ethernet Fido PID Control in Software Potentiometers Actuator/Encoders CLARAty Workshop - I.A.N.
Examples of CLARAty Reusability ControlledMotor Mz<Type> Controlled_Motor_Impl Linear_Axis Joint Non-Resuable Layer R7_Motor Fido_Motor R8_Motor Sim_Motor Trajectory Counter PID Controller HCTL_Chip R7_MC_Board MSI P460 Trajectory_Generator Widget_Motor DIO MSI P430 LM629_Chip ResuableHW reusable Non-reusable Analog In Analog Out Widget_Board MSI P415 MSI P430 CLARAty Workshop - I.A.N.
Code Reusability CLARAty Workshop - I.A.N.
Capabilities of Wheel Locomotor • Type of maneuvers: • Straight line motions (fwd / bkwd) • Crab maneuvers • Arc maneuvers • Arc crab maneuvers • Rotate-in-place maneuvers (arc turn r=0) • Driving Operation • Non-blocking drive commands • Multi-threaded access to the Wheel_Locomotor class – e.g. one task can use Wheel_Locomotor for driving while the other for position queries • Querying capabilities during all modes of operation. Examples include position updates and state queries • Built-in rudimentary pose estimation that assumes vehicle follows commanded motion CLARAty Workshop - I.A.N.
Generic Reusable Algorithms x y z Front C Front Front Front x x x x y C C z C y C y y z z z (d) Partially Steerable (e.g. Sojourner, Rocky 7) (b) Tricycle (one steering wheel) (a) Skid Steering (no steering wheels) (e) All wheel steering (e.g. MER, Rocky8, Fido, K9) (c) Two –wheel steering • Wheeled Locomotion – works for Rocky 8, Rocky 7, Fido, K9, ... (f) Steerable Axle (e.g.Hyperion) CLARAty Workshop - I.A.N.
Example: collaborative development for locomotor Version 2.0 Version 1.0 • Generalized design for wheeled locomotors • Full and partially steerable vehicle • Used generic motor classes • Implements fixed axle model • Developed continuous driving • Adapted to Rocky 8, Rocky 7, and Sim • Designed for Rocky 7 • Used Motor class • Separated wheel control from locomotion • Built-in pose estimation Redesign/ mature JPL - 1998 JPL - 2001 Version 3.0 Redesign/ mature Version 4.0 Add • Separated model from control • Add separate locomotor state • Add concept of wheel andsteerable wheel, Drive Cmd, Drive Sequence • Adapt to ATRV, Sim, Rocky 7, Rocky 8 • Use device and telemetryinfrastructureAdd adaptation to K9 FutureARC - 2003 CMU - 2002 CLARAty Workshop - I.A.N.
Code Resuability Results Module Lines of Code Status Depends On Wheel Locomotor 1445 Reusable Motion Sequence, 1D Solver, Homogeneous Transforms Motion Sequence 540 Reusable Vector Matrix, Vector, Array 1083 Reusable - 1D Solver 356 Reusable - Location, Homogeneous Transforms 341 Reusable Rotation Matrix, Point 2D Rotation Matrices 435 Reusable - Point 2D 131 Reusable - Controlled Motor 2080 Reusable Rocky 8 Locomotor 250 Non-reusable Rocky 8 Motor Rocky 8 Motor 334 Non-reusable Widget Motor, etc... Total 6995 584 (non-reusable) Total Reusable ~92% Analysis of amount of resuable code across implementations: CLARAty Workshop - I.A.N.
Base Package Developed Generic Physical Component Base classes • Math and Data Structure modules • Merging array/matrix between ARC/JPL. Added support for sub-arrays & STL iterators • Bits and I/O modules (JPL) • New implementation of bits, DIO, & AIO - more consistent, reentrant & efficient • Telemetry module (ARC) • Added telemetry modules to represent data and parameter sets, handles general serialization/deserialization, provides multi-threaded clients, & increases efficiency • Device module (ARC) • Provide base classes for all devices such as cameras, arms, masts, locomotors, etc. Uses telemetry classes and provides generic interfaces for accessing telemetry • Power System module (ARC) • Provides information on devices such as power sources, batteries, and battery chargers. Implemented specializations for K9 power hardware • Converge implementations and adapt for all platforms • Add Mz, Es, and State logging capabilities CLARAty Workshop - I.A.N.
Locomotion Package Front x y C z (d) Partially Steerable (e.g. Rocky 7) x y z C Front (e) All wheel steering (e.g. Rocky8, Fido, K9) Continuous Driving and Separated Model from Control • Developed algorithms for partially-steered and fully-steered vehicles • Developed continuous driving capability (JPL) • Demonstrated on Rocky8 & Rocky7, and FIDO (JPL) • Third generation redesign (CMU) • Separated locomotor model from control • Added wheels, drive cmds and sequences. • Adapting R8, R7, ATRV, FIDO, and K9 • Tested on ATRV, R8, R7, & ROAMS • Converge with Device and refine APIand provide models for estimation • Add ATRV adaptation to repository (c) Steerable Axle (e.g.Hyperion) CLARAty Workshop - I.A.N.
Vision Package Developed generic Image and Camera infrastructure • Developed generic infrastructure for vision • Generic Camera, Stereo Camera, Camera Models, Image, Image operations (e.g. rectification, edge and corner detection), Image I/O, and Image transport • Provided wrappers for vision algorithms • JPL Stereo, CAHVOR models, ARC Stereo, SVS Stereo, SLOG tracker • Adapted package to various rovers • Rocky 8, K9, FIDO, Rocky 7 are currently using the same vision infrastucture • Worked with Machine Vision Group to integrate visual odometry • Worked with RMSA team, Olson, Roush, M. Lee • Enhance operations/functionality for target tracking and stereovision • Integration of Wide-baseline Stereo (U. Washington) • Integration of Bundle Adjustment Techniques (JPL & Ohio State) CLARAty Workshop - I.A.N.
Completed and tested FIDO-based EKF port to CLARAty (JPL) Two tier Kalman Filter Estimating heading (IMU + odometry), x, and y (odometry) Created second generation design for the Estimator module (JPL & Univ. of Minnesota) Handle non-EKF based estimators Designed to better integrate with Locomotor and other model infrastructure Assume filter primary functions are to propagate state and update measurements Estimation Package 3DOF FIDO EKF integrated and tested in CLARAty • Implement Framework for more general estimation algorithm+(6DOF) • Integrate FIDO/R7 sun sensing algorithms CLARAty Workshop - I.A.N.
Navigation & Mapper Package Developed Generic Navigation Infrastructure • New modular design for the Navigator (CMU) • Based on generic action-selector - can be adapted to support navigation technologies • Specialized action selector to Map-based selector • Tightly integrated local and global cost functions (D*) • Navigator interfaces with Locomotor, Location Estimator, and Terrain Map generator. • Refactored Gestalt to separate terrain evaluation from action selection (JPL) • Developed infrastructure to process multi-tiered panoramic images for terrain evaluation (JPL) • Acquired complete 3-D map of Mars Yard • Integrate two navigation algorithms to exercise navigation framework CLARAty Workshop - I.A.N.
Developed adaptation of the CLARAty controlled motor classes to interface with ROAMS simulation (JPL) Tested Locomotor sending commands to wheels which in, turn, send commands to controlled motors (JPL) Specialized Sim_Motors turn commands into streams for socket-based communication Drove Simulated Rocky 8 rover with new locomotor (CMU) Interface between DL/FL (rover-level and ROAMS) is also available Simulation Package CLARAty Locomotor talking to ROAMS via motor cmds • Provide adaptations for inertial sensors, I/Os, cameras, and science instruments • Test functionality such as pose estimation, navigation and planning using ROAMS. • Provide API for integration with MSF CLARAty Workshop - I.A.N.
Interactions with T. Roush’s team for integration of science analysis and spectrometer functionality Analysis code checked in the repository: Carbonate Analysis Edge Layer detection Interactions with Meemong Lee’s for interface with science instruments, analysis, and simulation. Code available in repository Calibrated Reflectance Spectrum Uncalibrated Spectrum Spectrometer Science Package Infrastructure for Spectrometer and terrain analysis • Provide adaptations to integrate with science instrument simulator and possibly real spectrometers • Continue integration of science analysis CLARAty Workshop - I.A.N.
Communication Package Interface between DLs and FL • Decision Layer/Functional Layer communication module • K9 (ITAR-free) communication interface • Communication mechanism between adaptations of CLARAty classes and ROAMS • Uses CLARAty socket module • Provide easy and automated means for transporting CLARAty data structures (Data_Obj serialization and deserialization) • Modularize communication components and improve reuse • Complete study regarding use of TAO for DL/FL interaction CLARAty Workshop - I.A.N.
Decision Layer Package Decision Layer integrated D* Path Planner • Integrated D* Path Planner with Decision Layer • Developed infrastructure for sharing terrain map with FL • Migrating a version of CLEaR (CASPER/TDL - Linux) into CLARAty repository. Now available are: • TCM - Task Control Management used by TDL • Tangent Graph Path Planner (as used by DL) • D* Path Planner (as used by DL) • TDL and Java utilities • Unifying DL dependencies to use the CLARAty modules (e.g. path planners - tangent graph, D*), etc. • Converge more models between DL and FL • Interface with WITS and enhance interface with FL • Integrate another Decision Layer with Functional Layer (pending) CLARAty Workshop - I.A.N.
CLARAty Testbed (1/2) Rocky 8 Benchtop Dexter ManipulatorsRocky 7 Benchtop FIDO Benchtop CLARAty Workshop - I.A.N.
CLARAty Testbed (2/2) • 5 cPCI embedded targets (x86, ppc) • 2 Linux and 5 Solaris hosts/targets • AFS VxWorks installations (Tornado I, II, II.2, x86, ppc) • Mockups for Rocky 8, FIDO, and Rocky 7 • Remotely accessible to CLARAty developers & users • Web-based target status and control • Small lab sandbox built for indoor testing • Several remote and local users exercising testbed (MDS, CMU, ARC, JPL) • Online sign up for target/rover usage http://claraty.jpl.nasa.gov/testbed CLARAty Workshop - I.A.N.
Summary • CLARAty provides a repository of reusable software components at various abstraction levels • It attempts at capturing well-known robot technologies in a basic framework for researchers • It publishes the behavior and interfaces of its components • It allows researchers to integrate novel technologies at different levels of the architecture • It is a collaborative effort within the robotics community • It will run on multiple heterogeneous robots CLARAty Workshop - I.A.N.