Student Lounge

Sharing technical and real-life examples of how students can use MATLAB and Simulink in their everyday projects #studentsuccess

What’s New in MATLAB R2019b for Robotics?

In MATLAB R2019b, there are major product updates and new toolboxes. You can look at the release notes for a complete list, but this blog has the capabilities I find most exciting and relevant to robotics and autonomous systems.

Robot Simulation

Robotics System Toolbox retains a collection of specialized modeling and simulation tools for different types of robots. It specifically focuses on providing low-fidelity robot models, where the low-level controls are representative of a realistic system, so you can quickly test higher-level algorithms for motion planning, task planning, and behavior. In addition, there are more detailed analysis tools that provide support for low-level control design workflows.

Manipulators

There is now a library of commercial robot models, low-fidelity joint-space and task-space motion models that capture the behavior of common closed-loop control strategies, and collision detection between simple shapes or meshes. All of these integrate with the tools for kinematics and dynamics analysis and trajectory planning that already existed in previous releases of Robotics System Toolbox.

Make sure to check out the new robot manipulator examples that range from basic trajectory planning to complete pick-and-place task planning.

Ground Vehicles/Mobile Robots

For mobile robots, there are new low-fidelity kinematic motion models for different types of mobile platforms – most commonly differential drive and car-like vehicles. These models can connect with the sensor models and path planners included in Navigation Toolbox (see the next section for more detail) to prototype autonomous navigation algorithms. They can also be used to design model-based path planners and followers such as Model Predictive Control.

Make sure to check out the new warehouse robot examples that range from basic path planning for a single robot to task planning and coordination for a swarm of robots.

Gazebo Cosimulation

There is now a direct interface between Simulink and the Gazebo simulator.

We have been able to connect to Gazebo through ROS in the past, but with a direct interface a Simulink model can now drive execution of the Gazebo world so the dynamics in both tools are always in sync. This will enable you to use Simulink for designing control algorithms while getting synthetic sensor data (such as images and lidar) from Gazebo.

My personal favorite application of this technology is towards the training of reinforcement learning (RL) agents, which typically require the action at one time step to lead to an observation at the next time step. Below is my attempt at training a simulated Kinova Gen3 robot arm to place its gripper near an object using the Deep Deterministic Policy Gradient (DDPG) algorithm. With Gazebo as my environment, the observation input includes images from the arm-mounted camera so I can train agents based on convolutional neural networks (CNNs).

Learn more about Robotics System Toolbox below.

 

Navigation and Motion Planning

The need for autonomous navigation technology exists across various types of platforms, whether they be mobile robots, manipulators, humanoids, self-driving cars, or any other autonomous vehicles (air, space, land, water, or otherwise).

Navigation Toolbox contains a stack of algorithms that span the navigation workflow for any generic system. This workflow can roughly be broken down into localization and mapping (and the combined SLAM), path planning, and path following (which includes obstacle avoidance). The most significant updates for this release are in mapping and path planning, but I would encourage you to look through the Navigation Toolbox documentation page so you can see all that is available.

The major new mapping feature is egocentric occupancy maps, also known as local maps. Egocentric maps are typically smaller regions (compared to the full global map) based around the robot coordinate frame. These maps are designed to efficiently move with the immediate surroundings of the robot. Whereas global maps are used for start-to-goal path planning, local maps are usually present in path following tasks such as path correction or obstacle avoidance.

[Left] A simulated robot following a path planned using a global occupancy map. [Right] Egocentric occupancy map created from the simulated lidar scans of the robot.

There is also a new example on 3D SLAM using lidar point clouds which shows how you can combine the 3D occupancy map and pose graph backends with the point cloud processing capabilities in MATLAB.

Navigation Toolbox contains sampling-based path planners such as Hybrid A* and Rapidly-Exploring Random Tree (RRT). Unlike the Probabilistic Roadmap (PRM) planner that already existed in previous releases, these new planners are able to handle nonholonomic constraints – in simpler words, they can sample motions that are consistent with the constraints of real systems, such as minimum turning radius for a car-like robot, or collision-free configurations for a multi-link robot.

[Left] Path planning with RRT* for a car-like vehicle with limited turning radius. [Right] Hybrid A* planning for a car-like vehicle for an autonomous parking maneuver

An exciting thing (to me) about Navigation Toolbox is that its infrastructure for path planning has been designed with both beginners and developers in mind. While there will be some built-in utilities for common problems (like path planning for a 2D car-like vehicle), the entire set of state spaces, state validators, and planners is customizable. There are some examples included that demonstrate this, such as a variation of the famous “Piano Mover’s Problem” and collision-aware manipulator motion planning with RRT.

Learn more about Navigation Toolbox below.

ROS Connectivity

Everything to do with ROS connectivity and node deployment is now packaged into the new ROS Toolbox.

The major update is that ROS Toolbox supports both ROS and ROS 2! Since ROS 2 was designed to be supported on most popular operating systems, including Windows 10, OS X El Capitan, and Ubuntu 16.04 and 18.04, ROS Toolbox directly uses the native ROS 2 libraries in all these operating systems.

You will see a few application examples included in ROS Toolbox, including the sign following robot and automated parking valet. Both examples have variations that demonstrate MATLAB and Simulink workflows with ROS and ROS 2.

In the future, the plan is to keep up with the long-term support releases of ROS and ROS 2, as well as flesh out the available functionality in both MATLAB and Simulink centered development. This includes working with ROS bag logfiles, prototyping through desktop simulation, and finally generating distributed networks of standalone executable nodes, as is the common design paradigm of deployed ROS enabled systems.

Learn more about ROS Toolbox below.

How to Learn More

Now that we gave a brief introduction of some of the new capabilities, we hope you will see the full list of features in these new and updated toolboxes and try any relevant examples. To try out Gazebo cosimulation and ROS 2 connectivity, you can download our new virtual machine image which has all these tools installed and configured.

We would also be interested to hear from you.

  • What robotics projects are you working on?
  • Which new feature(s) are you most interested to try?
  • Is anything still missing that could help you with your work?

If you have any questions, you can always leave a comment or reach us at roboticsarena@mathworks.com or on Facebook.

|
  • print

コメント

コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。