Skip to content

Calculating the Inverse Kinematics #2

@CaptainMack

Description

@CaptainMack

Hi!

I’m trying to implement your code with my own built bot, I’ve tested the bot and it works. However, some of your code gives me problems, especially when it calculates the inverse kinematics

When calculating b with following code

var b = Math.acos((square(LENGTH1)+square(hypotenuse)-square(LENGTH2))/(2_LENGTH1_hypotenuse));

it returns a number above 1, but below 2, which causes Math.acos to return NaN

Can you see what’s wrong? I'm using following variables:

LENGTH1: 80mm
LENGTH2: 80mm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions