Top Banner
Simulating PX4 Flight Control with ROS/Gazebo Thomas Gubler
14

Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example:...

Mar 10, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

Simulating PX4 Flight Control with ROS/Gazebo

Thomas Gubler

Page 2: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

PX4 Flight Control

Onboard Messaging - uORB

DriversPX4 Flight Control

Onboard Messaging - uORB

Drivers

NuttX

Page 3: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

Simulate what you fly

Simulate whole robot

Fly what you simulate(d)

Page 4: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>
Page 6: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

PX4 Flight Control

Linux

ROS / Messaging

Gazebo PluginsMessaging Abstraction

Layer

Page 7: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

PX4 Flight Control

Onboard Messaging - uORB

Drivers

Onboard Messaging - uORB

NuttX

Messaging Abstraction Layer

DriversPX4 Flight Control

Page 8: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

Message Definition

uint64 timestamp

float32[19] channels

uint8 channel_count

...

ROS .msg format

Example:

Page 9: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

Publisher<px4_rc_channels> rc_channels_pub;

px4_rc_channels rc_channels_msg;

// Fill message with data here

// Publish

_rc_channels_pub.publish(rc_channels_msg);

// Callback

void rc_channels_callback_function(const px4_rc_channels &msg) {

PX4_INFO("I heard: [%llu]", msg.data().timestamp);

}

// Subscribe

_n.subscribe<px4_rc_channels>(rc_channels_callback_function, 10);

Publish

Receive

Page 10: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

Linux

ROS / Messaging

Gazebo PluginsMessage Layer

AbstractionROSNode

UDP

Mavros Mavlink Flight Control

Page 11: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

PX4 Flight Control

Onboard Messaging - uORB

Drivers

Onboard Messaging - uORB

Drivers

NuttX

Message Layer Abstraction

Flight Control

serial

Mavlink

Linux

ROS / Messaging

Custom

ROS

Nodes Mavros

Page 12: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

Future

Port all PX4 modules

Experiment with mobility

Robotic applications

Try it yourself: Tutorial on px4.io

Page 14: Control with ROS/Gazebo Simulating PX4 Flight · Control with ROS/Gazebo Thomas Gubler. PX4 Flight Control Onboard Messaging - uORB Drivers NuttX. ... ROS .msg format Example: Publisher<px4_rc_channels>

px4.io

thomasgubler.com

Image Sources:

px4.io, gazebosim.org, ros.org, ASL ETHZ, Intel

Thanks to:

UAVentureCVG ETH ZurichASL ETH Zurich

PX4 Community