Presentation is loading. Please wait.

Presentation is loading. Please wait.

ROSLab: a High Level Programming Language for Robotic Applications

Similar presentations


Presentation on theme: "ROSLab: a High Level Programming Language for Robotic Applications"— Presentation transcript:

1 ROSLab: a High Level Programming Language for Robotic Applications
PPR Meeting 1/22 ROSLab: a High Level Programming Language for Robotic Applications Nicola Bezzo, Andrew King, Junkil Park, Radoslav Ivanov, Peter Gebhard, Insup Lee University of Pennsylvania Monday November 4th 2013 Nov. 4th 2013

2 Demonstration on Quadrotor and UGV Current and Future Work
PPR Meeting Outline 2/22 Outline Review of ROS Overview of ROSLab How it works Demonstration on Quadrotor and UGV Current and Future Work Insect Robot Integration Hardware Generation Conclusion Nov. 4th 2013

3 Based in Menlo Park, California Hardware: PR2, Texai, Turtlebot
PPR Meeting ROS 3/22 Based in Menlo Park, California Hardware: PR2, Texai, Turtlebot Software: ROS Code reusability 100 ROBOTS 70 SENSORS/INTERFACES 2000+ LIBRARIES Nov. 4th 2013

4 Meta-operating System/ Middleware for Robots
PPR Meeting ROS 4/22 What is ROS? Meta-operating System/ Middleware for Robots IPC App App Message passing IPC TCP/IP – UDP C++, Python ROS App App UBUNTU HARDWARE Nov. 4th 2013

5 Operating System (Ubuntu 12.04)
5/22 COMPUTER Operating System (Ubuntu 12.04) ROS (Groovy) 2) Subscribe to GPS 1) Subscribe to TWIST ROS Master 2) Advertise to TWIST 1) Advertise to GPS 3) Host + Port 4) Topic Request Controller Node GPS Node Motor 5) Topic Stream ROS Drivers SENSORS ACTUATORS

6 MICROCONTROLLER SYNTHESIS
PPR Meeting ROSLab 6/22 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 MICROCONTROLLER SYNTHESIS Nov. 4th 2013

7 ROS Pseudo Code - Example
PPR Meeting Pseudo Code 1/3 7/22 ROS Pseudo Code - Example  Headers #include <ros/ros.h> #include <messages/encoder.h> #include <messages/imu.h> #include <other messages> #include <cstdio>  Declaration of variables float odomPoseX; int fl_enc; Callbacks void encoderCallback(const messages::encoder_msg::ConstPtr& enc_message) { } void imuCallback(const messages::imu_msg::ConstPtr& imu_message) Nov. 4th 2013

8 int main (int argc, char** argv) { ros::init(argc, argv, “node_name”);
PPR Meeting Pseudo Code 2/3 8/22  Main Program int main (int argc, char** argv) { ros::init(argc, argv, “node_name”); ros::NodeHandle node; ros::Publisher vel_pub; vel_pub = node.advertise<geometry_msgs::Twist>("/cmd_vel", 1); ros::Subscriber enc_sub; enc_sub = node.subscribe("/encoder", 1, encoderCallback); ros::Subscriber imu_sub; imu_sub = node.subscribe("/imu", 1, imuCallback); ros::Rate r(50.0); geometry_msgs::Twist command; Nov. 4th 2013

9 create your own logic, e.g.: Cruise Control
PPR Meeting Pseudo Code 3/3 9/22 while(ros::ok()) { ros::spinOnce(); create your own logic, e.g.: Cruise Control “if (measured velocity < 0.5) { command.linear.x += 0.005; } else if (measured velocity > 0.5) { command.linear.x -= 0.005; } else { }” vel_pub.publish(command); r.sleep(); } return 0; Nov. 4th 2013

10 GUI based Programming Language
PPR Meeting ROSLab 10/22 GUI based Programming Language CONTROLLER ACTUATORS ENCODER IMU See next slide Nov. 4th 2013

11 = #include <messages/encoder.h>
PPR Meeting ROSLab 11/22 #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 Nov. 4th 2013

12 How does ROSLab generate code?
PPR Meeting ROSLab 12/22 How does ROSLab generate code? Written in Java Formal Code Generation to C++ / ROS 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 Nov. 4th 2013

13 PPR Meeting Demo 13/22 Demo - Quadrotor Nov. 4th 2013

14 PPR Meeting Demo 14/22 Demo - UGV Nov. 4th 2013

15 ROSLab on MIT Insect Robot
PPR Meeting Current Work 15/22 ROSLab on MIT Insect Robot Current Work on Insect Robot Insect treated like a black-box (controlled with joystick) ZigBee communication (main focus) Joy node Insect Joy Insect node Nov. 4th 2013

16 ROSLab LL-SW HW ROS NODE (e.g., Quad_joy) TRPY CONTROLLER TRPY
16/22 TRPY LL-SW CONTROLLER TRPY POSE ESTIMATE PWM PWM PWM PWM Accel/Ang Vel M1 M2 M3 M4 RADIO μC IMU HW

17 ROSLab LL-SW HW ROS NODE (e.g., Quad_joy) TRPY CONTROLLER TRPY
17/22 TRPY LL-SW CONTROLLER TRPY POSE ESTIMATE PWM PWM PWM PWM Accel/Ang Vel M1 M2 M3 M4 RADIO μC μC IMU HW

18 Quadrotor HW Components
PPR Meeting Future Work 18/22 Quadrotor HW Components RADIO MICROCONTROLLER HALF-BRIDGE FOR MOTORS IMU Nov. 4th 2013

19 Peripheral Setup #define ZIGBEE_SPI 3 //Number, ex: 1
PPR Meeting Future Work 19/22 Peripheral Setup #define ZIGBEE_SPI 3 //Number, ex: 1 #define ZIGBEE_SCK_PORT A //Letter, ex: A #define ZIGBEE_SCK_PIN 1 //Number, ex: 1 #define ZIGBEE_SCK_AF 6 //Number, ex: 1 #define ZIGBEE_MISO_PORT A //Letter, ex: A #define ZIGBEE_MISO_PIN 2 //Number, ex: 1 #define ZIGBEE_MISO_AF 6 //Number, ex: 1 #define ZIGBEE_MOSI_PORT A //Letter, ex: A #define ZIGBEE_MOSI_PIN 3 //Number, ex: 1 #define ZIGBEE_MOSI_AF 6 //Number, ex: 1 #define ZIGBEE_SS_PORT A //Letter, ex: A #define ZIGBEE_SS_PIN 4 //Number, ex: 1 #define IMU_I2C 1 //Number, 1 or 2 #define IMU_SCL_PORT A //Letter, ex: A #define IMU_SCL_PIN 15 //Number, ex: 1 #define IMU_SDA_PORT A //Letter, ex: A #define IMU_SDA_PIN 14 //Number, ex: 1 Nov. 4th 2013

20 Challenges Limited number of ports in a microcontroller; Power Usage;
PPR Meeting Future Work 20/22 Challenges Limited number of ports in a microcontroller; Power Usage; Limited processing power: how to make sure everything can run with some timing guarantees? Hardware physical setup. For insect we would like to specify: the number of legs and DOF; sensors. For quad we would like to specify: the number of propellers; Nov. 4th 2013

21 Conclusions Why ROSLab Simple; Intuitive; Fast; Modular/Reusable
PPR Meeting Conclusions 21/22 Conclusions Why ROSLab Simple; Intuitive; Fast; Modular/Reusable 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 Nov. 4th 2013

22 PPR Meeting Questions 22/22 THANK YOU! Nov. 4th 2013


Download ppt "ROSLab: a High Level Programming Language for Robotic Applications"

Similar presentations


Ads by Google