Using PC as Supervisor Controller of 2 RPi+CM550 based robots

In this project, the PC is used to “supervise” two RPi-based CM-550 robots, meaning that the PC can override the “autonomous” tasks that the robots were performing (which was a visual search and ranging task using a Pi Camera).

The communication schemes between PC and RPis, and also between RPi and CM-550 are described in the video below. REMOCON packets were used to contain the information circulating within this computing network. The solutions implemented were in Python via MS Visual Studio Code on the PC as well as on the RPis. The CM-550s were running on TASK codes. You can watch the details at this web link:

As it turned out, the communications scheme worked out well enough, but the RPis run-time performances were poor due to the high computing loads required by OpenCV and BT communications. The Python Interpreter on the RPis was just not “fast” enough!

3 Likes

Thank you @roboteer for sharing this great information. However, I was not able to play the video.

Hello @Newbie,

If you click on the link “Watch this video on YouTube” in the picture that came up when you clicked on the so-called “video”, it should bring you to the actual YouTube web site and watch the video there.

If this does not work, please let me know.
Best

1 Like

Update 3-28-2021
Using the Boost libraries and CodeBlocks on an RPI4B with 64 bit Debian and 8 GB RAM, I managed to obtain a compiled C++ solution to this project, but I found that the BT service still took too much resources from the OpenCV process, so the overall runtime was still not adequate to do the job!!!

1 Like

Update 4-11-2021
Figured out my “time-out” error! Got Python working OK now! :relieved:
Still working on Boost’s solution.
Update 4-12-2021
Figured out a 'work-around" solution to compensate for the “blocking” nature of BOOST Serial Ports using “probe” packets. On RPi side, can use either Python or C++ codes. On PC side, has to use Python codes. So it is possible to do Supervisory Control from PC to RPis (then to CM-550s)!

1 Like

Update 8/9/2021
In this version 2.0, the Standard Quadruped is enhanced to become an Articulated 4-Wheel Platform (Hybrid version) with “walking” front legs and “fixed” rear legs + 4 wheel servos at the legs’ endpoint. The RPi4B controls all 12 servos of the A4WP-H robot via DXL-SDK and communicates to the PC and CM-550 via Remocon packets. The CM-550 has only control of the DMS-80 sensors and the buzzer.
The second robot, E-PTC has “split” DXL control: the Pan-Tilt platform is controlled directly by the RPi4B using DXL-SDK, while its wheels and DMS-80 sensors remain under the control of the CM-550.
For 3.5 minutes the whole system seemed to be working as it should, then the RPi4Bs started to lock up! (for reasons not yet investigated). But the PC and CM-550s remained working OK.

The YouTube link is here:

1 Like

I have some interest in this split control.

My application is this.

I was given the chance to play with a softbank NAO for a bit and it has a nice option of having background movement that makes the robot seem much more human like. Human never stand exactly still but rather have some swaying back and forth of limbs.

During my face tracking I wanted to control the pan/tilt of the head of the robot fro face tracking but at the same time I wanted to play motion of the other servos that cause the robot to sway a little to give the robot a more human feeling. I did try setting up a custom project in r-motion that only has the servos that r used for swaying then making a repeat loop of swaying then tried to play this motion in my python script then move other servos that wasn’t in the motion group it didn’t work.

@Out_of_the_BOTS
If I am correct in understanding your post, let’s say your pan-tilt servos are 20 & 21, and you did not include them in the MTN3 file which only has the other servos. For servos 20 & 21, you used the Goal Position commands directly? While the other servos are under the control of motion.play()?
I had tried a similar scheme before with the older TASK 3.1.5 + MAX-E2 and it did not work for me. The current one V. 3.1.6 is supposed to fix this issue, but I have not gotten the chance to check that out yet as of now. In short, your approach should have worked with V. 3.1.6, but I won’t be able to double check this issue on my end until later in the week.

Your understanding is correct.

@roboteer
I only had 1 little try at trying ti get it to work and when it didn’t then I didn’t persist because I wanted to work on other parts of my programming.

At some point I will get back to this idea of having motion.play() creating back ground swaying while using Goal Position to control servos that are not in the MTN3 file and provide feed back to the developers.