Recently, some folks had been asking me about approaches that can be used for integrating a Bioloid Premium Humanoid A with RPi-4B. The video below provides Communications and Control Concepts that can be applied to this type of project.
Other relevant videos can also be viewed:
Use of Remocon Packet between CM-530 and RPi: Interfacing CM530 to RPi4B - YouTube
Use of OpenCV on RPi with CM-550 (Python): Using RPi-4B with CM-550 (& OpenCV 4) - Python Version - YouTube
Use of OpenCV on RPi with CM-550 (C++): Using RPi-4B with CM-550 (& OpenCV 4) - C++ Version - YouTube
Use of ZigBee SDK on RPi with CM-550 (C/C++): OpenCV + ZigBee SDK Project with CM-550 - YouTube
Use of PySerial on RPi with CM-550 (Python): OpenCV (Python) + PySerial Project with CM-550 - YouTube
Creating Independent DXL Networks for use with CM-550 and RPi: Creating Independent DXL networks for use with CM-550 and RPi4B - YouTube
Using U2D2 and Independent DXL Networks: Using U2D2 with XL330s and XL430s with BIOLOID hardware - YouTube
Sensing Sensor Data from CM Controller to PC (Python): Dual Robots Control with BT-210s and Python - YouTube
Integration Aspects between RPi and Humanoid MAX-E2: RPi4B + MAX E2 Integration: Computing Aspects - YouTube
Using RPi0-2W with OpenCM-904 (Part 1): Using RPi0-2W with OpenCM904 (Part 1) - YouTube
Using RPi0-2W with OpenCM-904 (Part 2): Using RPi0-2W with OpenCM904 (Part 2) - YouTube
Hopefully, these materials will be useful for your projects.