Boost System Verification and Validation through ROS and CarMaker on the Cloud

Ibrahim Essam
YonoHub
Published in
3 min readJun 5, 2020

In the previous article, we’ve seen how to encapsulate CarMaker inside a YonoArc’s block and publish some of the user-accessible quantities on the dashboard. This would be very useful in test data collection, where we can run many parallel test runs, save the big data generated on YonoDrive and share it across our team.

But we can do even more with CarMaker inside YonoArc’s Pipelines. We can close the loop and add some input ports to the block. This would open up a whole new world where we can integrate CarMaker easily with our arsenal of blocks. YonoArc blocks can be based on different technologies ROS, ROS2, Python, Matlab, Octave, Autosar SWCs, or Adaptive Applications. So it’s the time to integrate all of your existing ROS nodes as ROS nodes work natively on Yonohub without any modification.

CarMaker can easily generate different test scenarios, perform realistic manoeuvres with different driver behaviours for system validation and testing. Combined with YonoArc we can easily replay all the collected data from real vehicles and create datasets for further investigation and testing.

Emergency Braking System

The emergency braking system is one of the most important ADAS systems out there. up to 72% of all avoidable rear-end crashes with casualties above speeds of 30 km/h could be prevented by the automatic emergency braking[1]. Here is a video for a VOLVO truck saving a kid life by applying EB.

I’ve created this simple pipeline to demonstrate YonoArc & CarMaker communication. It contains a CarMaker Block, YOLO object detection block based on Darknet C implementation, EB system block written as a ROS node, EB Report a Flask web app to generate HTML reports, and two other blocks for visualization.

The CarMaker block is simply using YonoArc’s Python 3 API and when any new message is received on one of the block inputs ports. the API calls on_new_message function with messages dictionary. That where all the magic happens. First, we check which port has the new message as in my case I'm having two ports. One for the Brake signal and the other for the Steering angle(not connected here). Then we send this message data to CarMaker using DVA_write(Quantity, value) from pycarmaker. The Brake signal is a ROS message of type std_msgs/Bool this enables us of easy integration of ROS nodes with any YonoArc Blocks.

I have defined the brake and steering quantity like this, and also added a collision quantity to check if a collision has happened.

self.brake_quant = Quantity("DM.Brake", Quantity.FLOAT)
self.steer_quant = Quantity("DM.Steer.Ang", Quantity.FLOAT)
self.collision_quant = Quantity("Sensor.Collision.Vhcl.Fr1.Count", Quantity.FLOAT)

Now we are ready to control the Car’s brake in any of CarMaker’s test runs and test our system.

The EB System block is a very simple algorithm that decides based on the leading car’s bounding box if it’s too close or braking should be applied. But how can we get the bounding boxes?. Luckily we have the state of the art object detection algorithm YOLO available as a YonoArc block and we can just drag, drop, and connect it to the other blocks. Then we do some filtering based on box size and location to filter out other cars bounding boxes. These parameters can be tuned online by defining them as block’s properties.

these parameters can be accessed in our code as ROS parameters. on new messages, we filter the bounding boxes and publish the braking signal if one of them is meeting our criteria.

The EB Report Block is out of our scope in this article. Now we have everything ready and we can test our algorithm easily. Start the pipeline, open the dashboard, and Voila! we have our system up and running.

--

--