ROS 2 ON VXWORKS
CHALLENGES IN PORTING A MODERN SOFTWAREFRAMEWORK TO AN RTOS
ANDREI KHOLODNYI, PRINCIPAL TECHNOLOGIST,TECHNOLOGY OFFICE© 2019 WIND RIVER. ALL RIGHTS RESERVED.

TOPICS OF MY TALK TODAY What Is VxWorks?

 Technical Challenges

 Why Is ROS 2 on VxWorks?

 Non-technical Challenges

 ROS 2 at Wind River (Why We Are Doing It)

 Conclusions and Next Steps

Andrei Kholodnyi
Principal Technologist
CTO Office

FOCUS> ADAS/HAD, Connected Vehicle, IVI, OTA, Automotive
Security> ROS 2 Mobile Robotics> Products, Solutions; Partnerships & University Programs2© 2019 WIND RIVER. ALL RIGHTS RESERVED.

RELEVANT PROJECTS (selection)> First GENIVI Linux based IVI project development for BMW> AdvancedTCA (Networking) for Alcatel and Lucent> Leadership and delivery of IVI, telematics, and connectivity
projects> Thematic pathfinding for the new technologies (autonomousrobotics, dependability)> Continuous innovation> Improvement for existing and creation of new company
products> Participation in alliances (GENIVI, FASTR, AUTOSAR
Adaptive, PICMG)AUTOSAR

07-Nov-2018

AEROSPACE AND DEFENSE SECTORCRITICAL MANUFACTURING SECTORFINANCIAL SERVICES SECTORMEDICAL SECTOR3© 2019 WIND RIVER. ALL RIGHTS RESERVED.

CHEMICAL SECTORCOMMERCIAL BUILDING SECTORCOMMUNICATIONS SECTORDAMS SECTOR

EMERGENCY SERVICES SECTORENERGY SECTOR

FOOD AND AGRICULTURE SECTORGOVERNMENT BUILDING SECTORIT SECTOR

NUCLEAR SECTOR

TRANSPORTATION/AUTO SECTOR

WATER AND WASTEWATER SECTORINDUSTRIAL PROFILEROS2 APPSROS2 APPSROS2 FRAMEWORKROS2 FRAMEWORKLinuxLinuxTITANIUM (STARLING X)
ARM / INTELEDGE COMPUTETSN
ROS2 APPSROS2 FRAMEWORK
VxWorks / LinuxHypervisor
NXP LS1028 TSN SWITCHGATEWAY COMPUTETSNCOMPUTE

Hard RTsafety
TSN

ROS2 Apps
ROS2 Apps
ROS2 FRAMEWORKVxWorks
WRLinux
Hypervisor
ARM /Intel HW
MICRO ROS OR ROS2ZEPHYR
MCU HW

ROS2 Apps
ROS2 Apps
ROS2 FRAMEWORK
VxWorks
WRLinux
Hypervisor
ARM /Intel HW

MICRO ROS OR ROS2ZEPHYR
MCU HW

MICRO ROS OR ROS2ZEPHYR
MCU HWCOMPUTESoft RT
non-safety
TSN

ETHERNETSIMULATE

LG OR GAZEBO SIMULATIONSIMULATION ENGINEINTEL CPU / NVIDIA GPUMLML FRAMEWORKINTEL CPU / INTEL MLLEARNWHAT IS VXWORKS RTOS?
 32/64 bits on Arm/Intel/MIPS/PowerPC Proprietary real-time OS, POSIX PSE52
 Kernel/user space separation, user space optional
 C/C++11/14, possible to develop kernel C++ modules and user apps
 Safety certifiable: DO-178, ISO 26262, IEC 61508
 Toolchain LLVM 8, Dinkumware C/C++ libs

 Proprietary build system Kernel shell Eclipse-based IDE, Windows/Linux hosts
5© 2019 WIND RIVER. ALL RIGHTS RESERVED.

MITSUBISHI ELECTRICNASA6© 2019 WIND RIVER. ALL RIGHTS RESERVED.

WHY ROS 2 AT WIND RIVER Show VxWorks running robotics platform based on ROS 2
 Engage with R&D customers already interested in leveraging ROS 2

 Upstream ROS 2 changes back to the community Identify challenges in porting a modern software framework (with Python,Boost, cmake, etc.) to VxWorks and address those challenges
 Provide some hints (common problem-solving patterns) for how to buildLinux applications under VxWorks Identify gaps in a development workflow (VxWorks versus Linux) andaddress those gaps
7© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 IN KEYWORDS (2017)

VxWorks⋮⋮⋮ ROS 28© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 IN KEYWORDS (2017)

VxWorks⋮⋮⋮ ROS 2!!!Pain!!!
alone

9© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 IN KEYWORDS (2019)
DockerDDS

eProsima
Titanium

USB2Serial

ROS-Industrial

VxWorks

Dashing

ROS community
turtlebot3

microROS

ZephyrROS 2 Lab

Helix Virtualization PlatformTSN

CES2020⋮⋮⋮ ROS 2ROS2019

Developer Journey

LLVM
LG

IP Review

ARM
GPLSDKUMLWind River LinuxUP2AutowareIntel

RPI4Wind River Labs

meta-ros

MUSL
EWC2020
Simulation

10© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ApolloAUTOSAR Adaptive
Digital TwinWebinar

TrainingBlog

THE ‘RIPPLE’ EFFECT OF ROS 2ROS 211© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 DASHING RELEASE VXWORKS PORTROS 2 apps

•Complete ROS 2 Dashing release has been ported toVxWorks•Build using colcon, the same look and feel as a native ROS
2 build (command line)•OpenCV integration•Python (ported, not tested)•Only graphical packages (like RViz) are not ported and stayon Ubuntu

ROS 2 VxWorks SDK

based on the ROS 2 dashing releaseapprox. 200 ROS 2 packages

ROS 2 dependencies: ASIO, tinyxml2, OpenCV
POSIXPython 3.8
Cmake / autotools build primitives
LLVM C++11/C++14
VxWorks SR620
Intel 64-bit / Arm / QEMU
https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos
12© 2019 WIND RIVER. ALL RIGHTS RESERVED.

OSS_BUILD layer
UNIX_EXTRA layer

https://labs.windriver.com(ROS 2 ON VXWORKS, WIND RIVER LINUX)

13© 2019 WIND RIVER. ALL RIGHTS RESERVED.

VXWORKS7-ROS2-BUILD (A HELPER REPO) https://github.com/Wind-River/vxworks7-ros2-build

 Makefile build: BUILD_TYPE=Debug BOARD=up2 make
 Set of scripts to build:– bootloader, kernel, userspace, ROS2, and the rootfs (boot from the USB stick) Board support:– UP, UP2, RPI3/RPI4, VxWorks Simulator, QEMU, and others Docker build:– VxWorks product install14© 2019 WIND RIVER. ALL RIGHTS RESERVED.

VXWORKS7-LAYER-FOR-ROS2
 https://github.com/Wind-River/vxworks7-layer-for-ros2
 VxWorks layers (build infrastructure):– OSS_BUILD, UNIX_EXTRA

 VxWorks layers (ROS 2 dependencies):– ASIO, tinyxml2

 ROS 2 patches:– fastcdr, fastrtps, rcl, rclutils, etc.

15

© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 BUILD UNDER VXWORKS From the command line (ROS 2 native build)– colcon build --symlink-install --cmake-force-configure --cmake-args -DBUILD_TESTING=OFF The same look and feel as a ROS 2 native build– ./wrenv.linux –p vxworks-7 && ./vxworks_env.sh– colcon build --symlink-install --cmake-force-configure --cmake-args DCMAKE_TOOLCHAIN_FILE=$VSB_DIR/buildspecs/cmake/rtp.cmake DCMAKE_PREFIX_PATH=$PRJ_WS/install;$VSB_DIR/usr/root -DBUILD_TESTING=OFF16© 2019 WIND RIVER. ALL RIGHTS RESERVED.

DUMMY ROBOT

17© 2019 WIND RIVER. ALL RIGHTS RESERVED.

CHALLENGES IN PORTING A MODERNSOFTWARE FRAMEWORK (BASED ON THE
LATEST VXWORKS RELEASE)
 IP compliance !!!
 Missing libraries (ROS 2 dependencies need to be ported) Missing UNIX functions (e.g., fnmatch, memccpy, some others) cmake support in VxWorks is good, but not good enough Missing autotools support under Windows Dinkum C++ library is not equal to stdlibc++
 Python support is missing in VxWorks
18© 2019 WIND RIVER. ALL RIGHTS RESERVED.

IP COMPLIANCE ROS 2 license is fine (BSD 3-Clause), but …
 There are many dependencies that have different licenses– ASIO (Boost Software License)– EIGEN (Mozilla Public License 2.0, GPL and other licenses )– PCL (BSD license)– POCO (Boost Software License)– TINYXML (zlib License)– TINYXML2 (zlib License) This is a real problem for customers who want to run their software on top of it Would be good to review a complete licenses list19

© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 DEPENDENCIES Some of them are not really necessary (e.g., difficult to certify, notneeded for non-Windows systems)– POCO– ASIO (from FastRTPS)– tinyxml vs tinyxml2

 ROS 2 dependencies need to be ported– Not a straight (colcon) way to port them in compare to ROS 2 packages

 Missing UNIX/Linux functions– fnmatch, memccpy, some others

 Probably we need a version without some dependencies– POCO is a good example (used to run ROS 2 under Windows)
20© 2019 WIND RIVER. ALL RIGHTS RESERVED.

ROS 2 EMBEDDED VS. ROS 2 FULL
Embedded– No HMI (meant graphics)– No visualization tools (Qt, Rviz…)– No simulation tools (Gazebo)– No Python– Remove some dependencies
To make it possible building a ROS2 embedded version

21© 2019 WIND RIVER. ALL RIGHTS RESERVED.

CONCLUSIONS AND NEXT STEPS ROS 2 runs on VxWorks (great experience) Current results are published on https://labs.windriver.com

 Docker-based host environment that can be used for reproducible cross-platformbuilds
 Make VxWorks officially supported by ROS 2 Dashing Provide non-commercial VxWorks SDK for RPI4

 Real-time performance tests: VxWorks, real-time ROS2 working group
 Python: VxWorks integration and test Windows development host support: test VxWorks build22© 2019 WIND RIVER. ALL RIGHTS RESERVED.

23© 2019 WIND RIVER. ALL RIGHTS RESERVED.