Open nikita1323 opened 5 months ago
Hi @nikita1323,
Really cool! Would you mind sharing a video? If you can share the video, I can update the README with a section to showcase your video...
Anyway, to answer your question
if you check out the pages
./src/components/pages/InverseKinematicsPage.js
./src/components/pages/WalkingGaitsPage.js
You will see something like
const ikParams = {
tx: 0,
ty: 0,
tz: 0,
rx: 0,
ry: 0,
rz: 0,
hipStance: 0,
legStance: 0,
}
solveInverseKinematics(dimensions, ikParams)
and
const gaitParams = {
tx: 0,
tz: 0,
rx: 0,
ry: 0,
legStance: 0,
hipStance: 20,
hipSwing: 25,
liftSwing: 40,
stepCount: 5,
}
getWalkSequence(dimensions, gaitParams, gaitType, walkMode)
You need to override the following values:
// for ik
ikParams.rx
ikParams.ry
ikParams.rz
// for gaits
gaitParams.rx
gaitParams.ry
You can derive these values given your normal vector provided by your virtual joystick (google search to find the formula)
Hope that helps!
Oh, thank you so much for your help! Sure, I will share a video with you, I just need a few days to finish this project.
Hello. I'm new to javascript, but i liked this project so much, that desided to build my own hexapod from scratch following your tutorial. Now I'm able to control hexy via pc remotely. But I have a question, is it possible to alter some code in a way, that can allow me to control robot by virtual joystick and make it go any direction i want. I mean, right now it's direction vector points from center of gravity ro the HEAD point, while i want to set this vector via joystick.
I really apreciate any help you can provide.