{"id":412490,"date":"2024-06-29T22:34:32","date_gmt":"2024-06-29T22:34:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=412490"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=412490","title":{"rendered":"<span>UAVCAN HITL UAV Simulator for PX4<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Hi from\u00a0<a href=\"http:\/\/raccoonlab.org\/\" rel=\"noopener noreferrer nofollow\">RaccoonLab<\/a>, a team of enthusiasts in field robotics! We want to share our true-HITL UAVCAN-based simulator for PX4. Quick demo:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/613f4d78122cc8f638696795\" data-style=\"\" id=\"613f4d78122cc8f638696795\" width=\"\"><\/div>\n<p>This post is based on our PX4 Developer Summit 2021 <a href=\"https:\/\/sched.co\/m8Ug\" rel=\"noopener noreferrer nofollow\">lighting talk<\/a>. <\/p>\n<p>We believe a unified UAVCAN bus for drone onboard electronics will become a mainstream approach shortly. Our simulator is already based on UAVCAN (in opposition to UART-MAVLINK) and emulates exactly the same messages as real UAVCAN-sensors.<\/p>\n<p>The project is part of our team&#8217;s efforts to create reliable control systems and applications in the field of aerial robotics.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/848\/317\/a3d\/848317a3d107a5d51b37875daac020b3.jpeg\" alt=\"RaccoonLab\" title=\"RaccoonLab\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/848\/317\/a3d\/848317a3d107a5d51b37875daac020b3.jpeg\" data-blurred=\"true\"\/><figcaption>RaccoonLab<\/figcaption><\/figure>\n<p>Our team is called RaccoonLab, it&#8217;s an acronym for robotics and control and also because coons are funny.<\/p>\n<h2>Motivation<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c7e\/b1e\/26e\/c7eb1e26ee3bf99094c8f46e7d09da7a.jpeg\" alt=\"Motivation\" title=\"Motivation\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c7e\/b1e\/26e\/c7eb1e26ee3bf99094c8f46e7d09da7a.jpeg\" data-blurred=\"true\"\/><figcaption>Motivation<\/figcaption><\/figure>\n<p>The project itself is focused on a proof-of-concept of a new approach for HITL simulation. But it has a wider scope and its motivation is connected with the new UAVCAN-bus-oriented architecture of onboard electronics. We believe a unified digital bus for onboard drone electronics will be the dominant approach shortly. After all, cars already have an onboard CAN bus. Why do drones have to be behind?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/35a\/c7d\/eab\/35ac7deab1826dec82c5d3fa6b090a1a.jpeg\" alt=\"Motivation\" title=\"Motivation\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/35a\/c7d\/eab\/35ac7deab1826dec82c5d3fa6b090a1a.jpeg\" data-blurred=\"true\"\/><figcaption>Motivation<\/figcaption><\/figure>\n<p>Let&#8217;s imagine, we want to develop a highly reliable onboard control system for an air taxi or last-mile drone delivery based on the PX4 ecosystem.<\/p>\n<p>I&#8217;m sure, in such a case, we&#8217;ll need distributed architectures to provide fault tolerance and reliability. Also, we need tools to test our control system in the configuration as close as possible to the final flight configuration.\u00a0<\/p>\n<h2>Problem<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/23f\/1cd\/917\/23f1cd9179b6de6ea9f69b5d85d07d8c.jpeg\" alt=\"Problem\" title=\"Problem\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23f\/1cd\/917\/23f1cd9179b6de6ea9f69b5d85d07d8c.jpeg\" data-blurred=\"true\"\/><figcaption>Problem<\/figcaption><\/figure>\n<p>We address the problem, that the current MAVLINK-HITL approach has a list of drawbacks:<\/p>\n<ul>\n<li>\n<p>autopilot software configuration differs considerably from flight configuration, and it does matter;<\/p>\n<\/li>\n<li>\n<p>digital onboard bus and emulation at the device at a protocol level are not supported;<\/p>\n<\/li>\n<li>\n<p>also, we found, UAV dynamics itself needs more attention for more physically accurate simulation.<\/p>\n<\/li>\n<\/ul>\n<h2>Solution<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/23a\/08b\/2a7\/23a08b2a799d432fcd460ddf1091bfe4.jpeg\" alt=\"Solution\" title=\"Solution\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23a\/08b\/2a7\/23a08b2a799d432fcd460ddf1091bfe4.jpeg\" data-blurred=\"true\"\/><figcaption>Solution<\/figcaption><\/figure>\n<p><a href=\"https:\/\/github.com\/InnopolisAero\/innopolis_vtol_dynamics\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/InnopolisAero\/innopolis_vtol_dynamics<\/a><\/p>\n<p>Here is our solution.\u00a0We created a communication package to simulate UAVCAN sensors at the protocol level. We simulated accurate UAV dynamics of the VTOL plane and quadcopter. Autopilot couldn&#8217;t even differ HITL simulation and real flight mode. We also integrated with Innopolis 3d simulator for high-level perception system simulation and visualization.<\/p>\n<h2>Dynamics<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/4a2\/7e3\/ee2\/4a27e3ee21d57ef88f47b14f9be7b5c6.jpeg\" alt=\"Dynamics\" title=\"Dynamics\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4a2\/7e3\/ee2\/4a27e3ee21d57ef88f47b14f9be7b5c6.jpeg\" data-blurred=\"true\"\/><figcaption>Dynamics<\/figcaption><\/figure>\n<p>VTOL plane simulation is based on full rigid body dynamics. Aerodynamics simulation is based on CFD study. And actuators models are obtained on a special test bench.<\/p>\n<h2>Profit<\/h2>\n<p>This simulator already works as a proof-of-concept and is freely available on Github. <\/p>\n<p>We are proud, that our simulator already was used to find the <a href=\"https:\/\/github.com\/PX4\/PX4-Autopilot\/issues\/18151\" rel=\"noopener noreferrer nofollow\">bug<\/a> of airspeed sensor filtration code and test <a href=\"https:\/\/github.com\/PX4\/PX4-Autopilot\/pull\/18145#issuecomment-906518924\" rel=\"noopener noreferrer nofollow\">fixes<\/a>. It&#8217;s proof of the value it could give to developers.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/39c\/305\/d4a\/39c305d4a46f22ec5ecab065ce24a403.png\" alt=\"Profit\" title=\"Profit\" width=\"1012\" height=\"1458\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/39c\/305\/d4a\/39c305d4a46f22ec5ecab065ce24a403.png\"\/><figcaption>Profit<\/figcaption><\/figure>\n<h2>Welcome<\/h2>\n<p>We hope, we&#8217;ll find adopters and contributors among PX4 developers, testers, and researchers.<\/p>\n<p>Let&#8217;s make UAVCAN HITL a new standard for PX4!<\/p>\n<p>Thank you for your attention and welcome to our <a href=\"https:\/\/github.com\/InnopolisAero\/innopolis_vtol_dynamics\" rel=\"noopener noreferrer nofollow\">Github repo<\/a> and RaccoonLab&#8217;s <a href=\"https:\/\/www.instagram.com\/raccoon.lab\/\" rel=\"noopener noreferrer nofollow\">social networks<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/577666\/\"> https:\/\/habr.com\/ru\/articles\/577666\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Hi from\u00a0<a href=\"http:\/\/raccoonlab.org\/\" rel=\"noopener noreferrer nofollow\">RaccoonLab<\/a>, a team of enthusiasts in field robotics! We want to share our true-HITL UAVCAN-based simulator for PX4. Quick demo:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/613f4d78122cc8f638696795\" data-style=\"\" id=\"613f4d78122cc8f638696795\" width=\"\"><\/div>\n<p>This post is based on our PX4 Developer Summit 2021 <a href=\"https:\/\/sched.co\/m8Ug\" rel=\"noopener noreferrer nofollow\">lighting talk<\/a>. <\/p>\n<p>We believe a unified UAVCAN bus for drone onboard electronics will become a mainstream approach shortly. Our simulator is already based on UAVCAN (in opposition to UART-MAVLINK) and emulates exactly the same messages as real UAVCAN-sensors.<\/p>\n<p>The project is part of our team&#8217;s efforts to create reliable control systems and applications in the field of aerial robotics.\u00a0<\/p>\n<figure class=\"full-width\"><figcaption>RaccoonLab<\/figcaption><\/figure>\n<p>Our team is called RaccoonLab, it&#8217;s an acronym for robotics and control and also because coons are funny.<\/p>\n<h2>Motivation<\/h2>\n<figure class=\"full-width\"><figcaption>Motivation<\/figcaption><\/figure>\n<p>The project itself is focused on a proof-of-concept of a new approach for HITL simulation. But it has a wider scope and its motivation is connected with the new UAVCAN-bus-oriented architecture of onboard electronics. We believe a unified digital bus for onboard drone electronics will be the dominant approach shortly. After all, cars already have an onboard CAN bus. Why do drones have to be behind?<\/p>\n<figure class=\"full-width\"><figcaption>Motivation<\/figcaption><\/figure>\n<p>Let&#8217;s imagine, we want to develop a highly reliable onboard control system for an air taxi or last-mile drone delivery based on the PX4 ecosystem.<\/p>\n<p>I&#8217;m sure, in such a case, we&#8217;ll need distributed architectures to provide fault tolerance and reliability. Also, we need tools to test our control system in the configuration as close as possible to the final flight configuration.\u00a0<\/p>\n<h2>Problem<\/h2>\n<figure class=\"full-width\"><figcaption>Problem<\/figcaption><\/figure>\n<p>We address the problem, that the current MAVLINK-HITL approach has a list of drawbacks:<\/p>\n<ul>\n<li>\n<p>autopilot software configuration differs considerably from flight configuration, and it does matter;<\/p>\n<\/li>\n<li>\n<p>digital onboard bus and emulation at the device at a protocol level are not supported;<\/p>\n<\/li>\n<li>\n<p>also, we found, UAV dynamics itself needs more attention for more physically accurate simulation.<\/p>\n<\/li>\n<\/ul>\n<h2>Solution<\/h2>\n<figure class=\"full-width\"><figcaption>Solution<\/figcaption><\/figure>\n<p><a href=\"https:\/\/github.com\/InnopolisAero\/innopolis_vtol_dynamics\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/InnopolisAero\/innopolis_vtol_dynamics<\/a><\/p>\n<p>Here is our solution.\u00a0We created a communication package to simulate UAVCAN sensors at the protocol level. We simulated accurate UAV dynamics of the VTOL plane and quadcopter. Autopilot couldn&#8217;t even differ HITL simulation and real flight mode. We also integrated with Innopolis 3d simulator for high-level perception system simulation and visualization.<\/p>\n<h2>Dynamics<\/h2>\n<figure class=\"full-width\"><figcaption>Dynamics<\/figcaption><\/figure>\n<p>VTOL plane simulation is based on full rigid body dynamics. Aerodynamics simulation is based on CFD study. And actuators models are obtained on a special test bench.<\/p>\n<h2>Profit<\/h2>\n<p>This simulator already works as a proof-of-concept and is freely available on Github. <\/p>\n<p>We are proud, that our simulator already was used to find the <a href=\"https:\/\/github.com\/PX4\/PX4-Autopilot\/issues\/18151\" rel=\"noopener noreferrer nofollow\">bug<\/a> of airspeed sensor filtration code and test <a href=\"https:\/\/github.com\/PX4\/PX4-Autopilot\/pull\/18145#issuecomment-906518924\" rel=\"noopener noreferrer nofollow\">fixes<\/a>. It&#8217;s proof of the value it could give to developers.<\/p>\n<figure class=\"full-width\"><figcaption>Profit<\/figcaption><\/figure>\n<h2>Welcome<\/h2>\n<p>We hope, we&#8217;ll find adopters and contributors among PX4 developers, testers, and researchers.<\/p>\n<p>Let&#8217;s make UAVCAN HITL a new standard for PX4!<\/p>\n<p>Thank you for your attention and welcome to our <a href=\"https:\/\/github.com\/InnopolisAero\/innopolis_vtol_dynamics\" rel=\"noopener noreferrer nofollow\">Github repo<\/a> and RaccoonLab&#8217;s <a href=\"https:\/\/www.instagram.com\/raccoon.lab\/\" rel=\"noopener noreferrer nofollow\">social networks<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/577666\/\"> https:\/\/habr.com\/ru\/articles\/577666\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-412490","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=412490"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412490\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}