Autonomous Systems

Design, develop, and test autonomous systems with MATLAB

Accelerating the path to production for your autonomous system with RTI Connext and the ROS Toolbox

Our guest blogger is Akkshaj Singh, an Application Engineer at RTI with a focus on Commercial Markets and Security. He has a background in robotics and embedded systems and is excited to work at the forefront of enabling autonomy. He holds a BS in Electrical Engineering from the University of Washington, Seattle.

ROS 2 is now ubiquitous for developers of robotics applications across industries. As robotic and autonomous systems move from prototyping towards production and real-world integration, there are more stringent requirements and more complex coding. Often, this includes the need to interface with non-ROS 2 systems.

MathWorks’ ROS Toolbox can complement your ROS 2 system with using the tools from MATLAB and Simulink, throughout all stages of the robotic and autonomous development lifecycle. From simulation to code generation to deploying real hardware, the ROS Toolbox can accelerate the development of a production-grade ROS 2 system.

As you move towards commercial readiness, you can also leverage ROS 2’s underlying Data Distribution ServiceTM (DDSTM) middleware to communicate with native DDS applications. Using a native DDS implementation such as RTI Connext® provides better performance, allows you to make granular adjustments to Quality of Service (QoS) settings, and enables easy interoperability with non-ROS components. Connext also offers integrations with either Unity or Unreal Engine.

RTI has teamed with MathWorks to simplify ROS 2 and DDS interoperability. Developers can use the ROS 2 Middleware (RMW) for RTI Connext within the MathWorks ROS Toolbox, which runs Connext directly as the middleware for your robotic and autonomous system, enabling easy communication with native Connext or other native DDS applications. The MathWorks help page referenced below shows you how.

For realistic simulations, it is desirable to use Connext alongside the ROS Toolbox to communicate with simulation engines like Unreal Engine.  To do this, you can use the Unreal Engine Plugin for RTI Connext with ROS2 data types, which is described in detail here. The plugin will publish data from Unreal Engine using Connext, allowing ROS Toolbox to subscribe to it.

Once complete, the RTI Admin Console can be used to verify that the plugin is publishing correctly:

Then, the ROS Toolbox can subscribe to the data. Enter ros2 topic list, and you should see the /topic_Point appear, indicating that the ROS Toolbox detects the data published by Unreal Engine.

To set up a node and a subscriber:

>>unreal = ros2node (“/unreal2matlab”)

>>pointSub = ros2subscriber(unreal, “/topic_Point”)


Now, we can receive data:

>>[scanData,status,statustext] = receive(pointSub,10);

Combining DDS with the MathWorks ROS Toolbox will facilitate interoperability for your robotic and autonomous system. Modern complex autonomous systems have a strong need to interact with non-ROS components, whether it is simulation engines like Unreal Engine, running across different architectures or working with different communication protocols. Combining DDS with ROS Toolbox enables a more rapid prototype-to-production environment for your autonomous system by saving time and effort when working with different technologies. To learn more about RTI Connext and DDS solutions for complex robotic systems, please visit RTI  here.



  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.