In part 2 a few weeks ago I outlined a Python implementation of the ethical black box. I described the key data structure – a dictionary which serves as both specification for the type of robot, and the data structure used to deliver live data to the EBB. I also mentioned the other key robot specific code:
Having reached this point I needed a robot – and a way of communicating with it – so that I could both write getRobotData(spec) and test the EBB. But how to do this? I’m working from home during lockdown, and my e-puck robots are all in the lab. Then I remembered that the excellent robot simulator V-REP (now called CoppeliaSim) has a pretty good e-puck model and some nice demo scenes. V-REP also offers multiple ways of communicating between simulated robots and external programs (see here). One of them – TCP/IP sockets – appeals to me as I’ve written sockets code many times, for both real-world and research applications. Then a stroke of luck: I found that a team at Ensta-Bretagne had written a simple demo which does more or less what I need – just not for the e-puck. So, first I got that demo running and figured out how it works, then used the same approach for a simulated e-puck and the EBB. Here is a video capture of the working demo.
So, what’s going on in the demo? The visible simulation views in the V-REP window show an e-puck robot following a black line which is blocked by both a potted plant and an obstacle constructed from 3 cylinders. The robot has two behaviours: line following and wall following. The EBB requests data from the e-puck robot once per second, and you can see those data in the Python shell window. Reading from left to right you will see first the EBB date and time stamp, then robot time botT, then the 3 line following sensors lfSe, followed by the 8 infra red proximity sensors irSe. The final two fields show the joint (i.e. wheel angles) jntA, in degrees, then the motor commands jntD. By watching these values as the robot follows its line and negotiates the two obstacles you can see how the line and infra red sensor values change, resulting in updated motor commands.
Here is the code – which is custom written both for this robot and the means of communicating with it – for requesting data from the robot.
The structure of this function is very simple: first create a socket then open it, then make a dummy packet and send it to V-REP to request EBB data from the robot. Then, when a data packet arrives, unpack it into spec. The most complex part of the code is data wrangling.
Would a real EBB collect data in this way? Well if the EBB is embedded in the robot then probably not. Communication between the robot controller and the EBB might be via ROS messages, or even more directly, by – for instance – allowing the EBB code to access a shared memory space which contains the robot’s sensor inputs, command outputs and decisions. But an external EBB, either running on a local server or in the cloud, would most likely use TCP/IP to communicate with the robot, so getRobotData() would look very much like the example here.
Underwater swimming robot responds with feedback from soft ‘lateral line’
Motor Commutation: FOC vs. FEC
Motor Commutation: FOC vs. FEC
Researchers’ algorithm designs soft-bodied robots that sense their own positions in space
Human fondness, faith in machines grows during pandemic
Expressing some doubts: Comparative analysis of human and android faces could lead to improvements
Robot Race: The World´s Top 10 automated countries
The average robot density in the manufacturing industry hit a new global record of 113 units per 10,000 employees. By regions, Western Europe (225 units) and the Nordic European countries (204 units) have the most automated production, followed by North America (153 units) and South East Asia (119 units).
The world´s top 10 most automated countries are: Singapore (1), South Korea (2), Japan (3), Germany (4), Sweden (5), Denmark (6), Hong Kong (7), Chinese Taipei (8), USA (9) and Belgium and Luxemburg (10). This is according to the latest World Robotics statistics, issued by the International Federation of Robotics (IFR).
“Robot density is the number of operational industrial robots relative to the number of workers,” says Milton Guerry, President of the International Federation of Robotics. “This level measurement allows comparisons of countries with different economic sizes in the dynamic automation race over time.”
The country with the highest robot density by far remains Singapore with 918 units per 10,000 employees in 2019. The electronics industry, especially semiconductors and computer peripherals, is the primary customer of industrial robots in Singapore with shares of 75% of the total operational stock.
South Korea comes second with 868 units per 10,000 employees in 2019. Korea is a market leader in LCD and memory chip manufacturing with companies such as Samsung and LG on top and also a major production site for motor vehicles and the manufacturing of batteries for electric cars.
Japan (364 robots per 10,000 employees) and Germany (346 units), rank third and fourth respectively. Japan is the world´s predominant robot manufacturing country – where even robots assemble robots: 47% of the global robot production are made in Nippon. The electrical and electronics industry has a share of 34%, the automotive industry 32%, and the metal and machinery industry 13% of the operational stock. Germany is by far the largest robot market in Europe with 38% of Europe’s industrial robots operating in factories here. Robot density in the German automotive industry is among the highest in the world. Employment in this sector rose continuously from 720,000 people in 2010 to almost 850,000 people in 2019.
Sweden remains in 5th position with a robot density of 274 units operating with a share of 35% in the metal industry and another 35% in the automotive industry.
Robot density in the United States increased to 228 robots. In 2019, the US car market was again the second largest car market in the world, following China, with the second largest production volume of cars and light vehicles. Both USA and China are considered highly competitive markets for car manufacturers worldwide.
The development of robot density in China continues dynamically: Today, China’s robot density in the manufacturing industry ranks 15th worldwide. Next to car production, China is also a major producer of electronic devices, batteries, semiconductors, and microchips.
Please find graph and press releases in other languages for download in the original article.
Robot HMI for Projects Automation
First collaborative robot to work with vehicles in motion
System detects errors when medication is self-administered

From swallowing pills to injecting insulin, patients frequently administer their own medication. But they don’t always get it right. Improper adherence to doctors’ orders is commonplace, accounting for thousands of deaths and billions of dollars in medical costs annually. MIT researchers have developed a system to reduce those numbers for some types of medications.
The new technology pairs wireless sensing with artificial intelligence to determine when a patient is using an insulin pen or inhaler, and flags potential errors in the patient’s administration method. “Some past work reports that up to 70% of patients do not take their insulin as prescribed, and many patients do not use inhalers properly,” says Dina Katabi, the Andrew and Erna Viteri Professor at MIT, whose research group has developed the new solution. The researchers say the system, which can be installed in a home, could alert patients and caregivers to medication errors and potentially reduce unnecessary hospital visits.
The research appears today in the journal Nature Medicine. The study’s lead authors are Mingmin Zhao, a PhD student in MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL), and Kreshnik Hoti, a former visiting scientist at MIT and current faculty member at the University of Prishtina in Kosovo. Other co-authors include Hao Wang, a former CSAIL postdoc and current faculty member at Rutgers University, and Aniruddh Raghu, a CSAIL PhD student.
Some common drugs entail intricate delivery mechanisms. “For example, insulin pens require priming to make sure there are no air bubbles inside. And after injection, you have to hold for 10 seconds,” says Zhao. “All those little steps are necessary to properly deliver the drug to its active site.” Each step also presents opportunity for errors, especially when there’s no pharmacist present to offer corrective tips. Patients might not even realize when they make a mistake — so Zhao’s team designed an automated system that can.
Their system can be broken down into three broad steps. First, a sensor tracks a patient’s movements within a 10-meter radius, using radio waves that reflect off their body. Next, artificial intelligence scours the reflected signals for signs of a patient self-administering an inhaler or insulin pen. Finally, the system alerts the patient or their health care provider when it detects an error in the patient’s self-administration.

The researchers adapted their sensing method from a wireless technology they’d previously used to monitor people’s sleeping positions. It starts with a wall-mounted device that emits very low-power radio waves. When someone moves, they modulate the signal and reflect it back to the device’s sensor. Each unique movement yields a corresponding pattern of modulated radio waves that the device can decode. “One nice thing about this system is that it doesn’t require the patient to wear any sensors,” says Zhao. “It can even work through occlusions, similar to how you can access your Wi-Fi when you’re in a different room from your router.”
The new sensor sits in the background at home, like a Wi-Fi router, and uses artificial intelligence to interpret the modulated radio waves. The team developed a neural network to key in on patterns indicating the use of an inhaler or insulin pen. They trained the network to learn those patterns by performing example movements, some relevant (e.g. using an inhaler) and some not (e.g. eating). Through repetition and reinforcement, the network successfully detected 96 percent of insulin pen administrations and 99 percent of inhaler uses.
Once it mastered the art of detection, the network also proved useful for correction. Every proper medicine administration follows a similar sequence — picking up the insulin pen, priming it, injecting, etc. So, the system can flag anomalies in any particular step. For example, the network can recognize if a patient holds down their insulin pen for five seconds instead of the prescribed 10 seconds. The system can then relay that information to the patient or directly to their doctor, so they can fix their technique.
“By breaking it down into these steps, we can not only see how frequently the patient is using their device, but also assess their administration technique to see how well they’re doing,” says Zhao.
The researchers say a key feature of their radio wave-based system is its noninvasiveness. “An alternative way to solve this problem is by installing cameras,” says Zhao. “But using a wireless signal is much less intrusive. It doesn’t show peoples’ appearance.”
He adds that their framework could be adapted to medications beyond inhalers and insulin pens — all it would take is retraining the neural network to recognize the appropriate sequence of movements. Zhao says that “with this type of sensing technology at home, we could detect issues early on, so the person can see a doctor before the problem is exacerbated.”