Skip to content

Draw the projection of the center of gravity on the ground plane #80

Open
@mithi

Description

You'd need to update the following
1. The model VirtualHexapod to have an attribute that stores this point

class VirtualHexapod:

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):

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions