Hardware In The Loop

The Problem

Simulation is great at helping build behaviours. You can use simulation to help train robots for scenarios that are not easily to reach using physical equipment.  However no matter how good your simulation models are, you still, sooner or later, need to bring the physical robots into the development loop .

Understanding how you can combine a Software-First_approach to robotics development with Hardware-In-The_Loop (HITL) testing is important. Using the appropriate tools and an iterative development process ensures an effective way to build and test robot behaviours.

The Project

This project was to use the Asimovo platform to simulate a complex, hazardous environment with multiple obstacles with purpose of using it to train a robot to avoid these virtual obstacles.

This project is about controlling a real-life robot based on a simulated world. As the robot runs ROS1 Noetic, first, a roscore process is started on it. Then, a ros2/ros1 bridge is launched on the container. Afterwards, Gazebo is started with the simulated world, the robot model is spawned and a position update script is launched. Finally the ROSbot’s drivers and the navigation components are started.

Sensor data was collected from the simulation, and this was used to influence a four-wheeled rover robot in real life. The robot acted as if the objects see in the simulation world were actually in front of it.

The Solution

In addition to illustrating this performance. A more detailed developer tutorial was written. This not only covers the HITL functionality, but also information on how to interface ROS1 robots with ROS2 systems.

The Outcome

Asimovo enables a software-first-approach to robotics development. However HITL is still an extremely important part of the iterative development process. In addition to sensor data being used to influence the behaviour of robot hardware, the ability to do the opposite is also possible. When a robot captures data from sensors in the field it can also be uploaded into the simulation and help mature the accuracy of the simulation environment.

Key tools used

Husarion ROSbot 2
ROS2 Foxy
Gazebo Fortress

Simulation environment & Scenarios


Get started

Get started

Everything you need to get going from sign up to tutorials and development guides

Read More