You'd need to update the following
1. The model VirtualHexapod to have an attribute that stores this point
You can compute this point as outlined by the algorithm here, you should inject the point calculation to a different function and update the attribute of the VirtualHexapod when this is called in the two compute_orientation_properties of the hexapod.ground_contact_solver module.
|
def is_stable(p1, p2, p3, tol=0.001): |
2. In figure template, you should append a new point trace at the end of the data list
The trace has the following format
{
"marker": {"color": INSERT_COLOR_HERE, "opacity": 1.0, "size": INSERT_SIZE_HERE},
"mode": "markers",
"name": "cog-projection",
"type": "scatter3d",
"x": [INSERT_COG_X_HERE],
"y": [INSERT_COG_Y_HERE,
"z": [0],
}
3. HexapodPlotter could draw this point in the figure template
|
def _draw_hexapod(fig, hexapod): |
You'd need to update the following
1. The model
VirtualHexapodto have an attribute that stores this pointhexapod-robot-simulator/hexapod/models.py
Line 95 in 531fbb3
You can compute this point as outlined by the algorithm here, you should inject the point calculation to a different function and update the attribute of the
VirtualHexapodwhen this is called in the twocompute_orientation_propertiesof thehexapod.ground_contact_solvermodule.hexapod-robot-simulator/hexapod/ground_contact_solver/helpers.py
Line 14 in 531fbb3
2. In figure template, you should append a new point trace at the end of the
datalisthexapod-robot-simulator/hexapod/templates/figure_template.py
Line 226 in 531fbb3
The trace has the following format
3.
HexapodPlottercould draw this point in the figure templatehexapod-robot-simulator/hexapod/plotter.py
Line 14 in 531fbb3