160 likes | 173 Views
Develop a simplified high-level programming language for robotic applications and complete robot synthesis. Generate high-level and low-level code, as well as hardware descriptions. Includes examples of printable quadrotor electronics synthesis and printable insect robotics.
E N D
ROSLab: A High-level Programming Environment for Robotic Co-design Nicola Bezzo, Peter Gebhard, Andrew King, Junkil Park, Oleg Sokolsky, Insup Lee
Objective 1)Development of a Simplified High-Level Programming Language for Robotic Applications. 2) Complete Robot Synthesis. • HL code generation • LL code generation • Hardware description generation PRINTABLE QUADROTOR ELECTRONICS SYNTHESIS Y. Mulgaonkar, V. Kumar (UPenn) PRINTABLE INSECT M. Piccoli, M. Yim (UPenn) A. Mehta, M. Tolley, D. Rus (MIT) A. Mehta, M. Tolley, D. Rus (MIT)
Graphical Block - ROS Code Pairing #include <messages/encoder.h> void encoderCallback (const messages::encoder_msg::ConstPtr& enc_message) { EncoderVelC = “operation involving number of ticks read by encoder” } ros::Subscriber enc_sub; enc_sub = node.subscribe ("/encoder_topic", 1, encoderCallback); = ENCODER /encoder_topic EncoderVelC
How does ROSLab generate code? • Formal Code Generation to C++ / ROS • data structure and semantic check • port type check • Template with “holes” • $includes$ • $pub_ports$ • $sub_port_values$ • $sub_port_callbacks$ • int main(int argc, char **argv) { //----MAIN • ros::init(argc, argv, $node name$); • ros::NodeHandle node; • $pub_connections$ • $sub_callback_setup$ • ros::Rate r(100); • while(ros::ok()) { //----WHILE • ros::spinOnce(); • // ***** ADD YOUR CODE HERE ***** • // ********************************* • r.sleep(); • } // --- end while • return EXIT_SUCCESS; • } // --- end main • Advertise Example • $port_name$ = node.advertise<$port_type$> ("$port_topic$", 1); port_name port_topic port_type
ROSLab Demo https://www.youtube.com/watch?v=QguFMBYzgTE
SCHEDULING OF CONTROLLERS T0 = 0 Δt = 1 TF = 2 sec T1 = 1 1 Hz 1 Hz SENSOR 1 CONTROLLER 1 CruiseControl VX 2 Hz 2 Hz SENSOR 2 Controller 2 Obstacle Avoid. WZ 2 Hz Controller 3 Waypoint Nav - Fixed delay
SCHEDULING OF CONTROLLERS T0 = 0 Δt = 2 TF = 3 sec T1 = 1 1 Hz 1 Hz SENSOR 1 CONTROLLER 1 CruiseControl VX 1 Hz P 2 Hz 2 Hz SENSOR 2 Controller 2 Obstacle Avoid. WZ 2 Hz Controller 3 Waypoint Nav - Planner to decide which controller is active/inactive
TIME CONSTRAINT • Freshness constraint: bounds the time it takes for data to flow through the system • F(Y|X)=10 Y delivered at time t, then X-value to compute Y is sampled no earlier than t-10 ms • Separation constraint: constraints the jitter between consecutive values on a single output channel • l(Y)=3 Y delivered at a minimum rate of 3ms • u(Y)=13 Y delivered at a maximum rate of 13ms
Control System Scheduling S C A τ θ θS v RATE TS = ? TC = ? TA = ? freshness / separation freshness: F(τ|θ) = f(θs(t-1)) separation: S(τ) = g(θs(t-1)) STABILITY PROPERTIES
SPECIFICATION: -flight time -payload -speed …. High-level Software Low-level Software Mechanical Hardware Electronics
Robot Codesign – ROSLab Architecture HL-SW SUPERVISOR Joystick CONTROLLER 1 Vicon SWITCH QUADROTOR CONTROLLER 2 SENSOR 1 TRPY CONTROLLER 3 SENSOR N
HL-SW ROS NODE Switch TRPY LL-SW CONTROLLER TRPY POSE ESTIMATE PWM PWM PWM PWM Accel/AngVel M2 M1 M3 M4 RADIO μC IMU Electronics
M2 M1 M3 M4 RADIO μC IMU Electronics LINK LINK BODY LINK LINK Mechanical
ROSLab – Mechanical Design https://www.youtube.com/watch?v=zWkCnhuEsrU
ROSLab – Electronics Design RADIO μC L0 - ROSLab R.S1μC.S1 1 1 PA.0.S1.1/S2/S3 R μC S1 L1 – Service/Pins 2 2 PA.1.S2/S3/S4 S2 3 3 PB.0.S1/S2/S3 S3 L2 – Assignment Greedy Algorithm R.S1.1 μC.S1.1/S2/S3.AF0.PA.0 L3 – Low Level μC and Hardware Specification *.xml *.h
Conclusion • ROSLab to generate a complete description of a robot. • MIT Printable Segway and Penn Quadrotor as reference testbed to demonstrate the complete co-design • Scheduling and Real-time analysis • Prove Properties • Time execution: e.g., response time analysis • Information flow: e.g., output depends only on inputs • Simulation tool: e.g., power draw given HW setup • First release available at: http://precise.github.io/ROSLab/