Back to Robot Coding part 3: testing the EBB

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 function 

# Get data from the robot and store it in data structure specdef getRobotData(spec):
Having reached this point I needed a robot - and a means 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. 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.


 •  0 comments  •  flag
Share on Twitter
Published on March 19, 2021 05:11
No comments have been added yet.


Alan Winfield's Blog

Alan Winfield
Alan Winfield isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Alan Winfield's blog with rss.