LouKordos / walking_controller

The main walking controller code for the Bipedal Robot.
13 stars 2 forks source link

Implement Web UI connection for real-time robot control (#33) #88

Closed LouKordos closed 3 years ago

LouKordos commented 3 years ago

This PR implements parts of the functionality described in #33 . A web server runs a Node.js application, which serves the slider HTML and handles the WebRTC screen sharing. Disturbances are sent to the simulation plugin via a TCP socket, while the desired states are sent to the controller in JSON format, also via TCP.

To do that, some parameters are now not const anymore and were made globally available via threadsafe functions, such as the step height in world frame. Slight formatting changes were made as well.

To reset the robot, the controller and sim have to be started using the start_sim.py script, because this script will also receive the reset request via TCP and restart both controller and simulation (other approaches were not successful, most likely due to some internal values in both controller and sim which are not properly reset, and there was no time left to fix that).

The Web UI is still very much a prototype and not very good looking.