chip updates: sit/stand again [updates]
Alright so now that we've fixed the mechanical issues, it's time to try making the robot stand completely on its own, and see if the trajectory helped. The idea behind the trajectory is to reduce the large corrections needed at the end for just sending the legs to the end-points. We're trying to have the robot get up a little smoother. Just one "swoop" and he's up. That's what we're determining right now. How to get that swoop.
test one: generating a straight linear trajectory that consists of placing the foot at only y-positions to see if that creates a smooth lift.
Let's try this code above! Generating a stand trajectory, and then we will generate a sit one when we press a button. But let's try the stand first. We're going to slow the speed to 0.25 for the standing.
Something funny happened at the end, I think that's because we used a button to generate the sit down trajectory and holding it for too long generates more than one. So we're just going to put these things in the initialize and the disable methods. Just like they would be on the real robot.
This should make the robot stand up, and then immediately sit back down. And that is true that does make it stand up and then sit back down but there are two issues here:
(1) This doesn't do what we want it to. We want the robot to stand up on enable, and then sit down on disable.
(2) We want the robot to have a smoother standing and sitting trajectory.
We'll smooth out the trajectory things later, but basically making the robot stand up on enable is easy, you hit enable and put the stand-up code in teleopInit.
Sitting on disable is the hard part...
task two: making the robot sit down on disable.
So we want to make the robot sit down on disable. We're going to start by trying the following:
Okay so this didn't do anything, but it really should? Let's see what's going on here. This function should be called once when the robot enters disabled mode. But the real problem here is that when we hit disable all actuation stops. So what we want to do is probably use a button to create a "sit down" task.
Yesssss real dumb solutions for the win until Ronak fixes it.
Don't judge, it's a quick fix that doesn't involve moving everything to commands and schedulers. So the robot stands on startup and sits with a push of a button.
Now from the floor...
We also noticed an optimal leg position to "get up" from the floor and it is this:
So the robot now stands with the A button and sits with the B button. It DOES NOT stand on-enable. The only thing it does on-enable is clear any trajectories that may exist.
take three: now we need to change branches and see if Ronak's code works.
Soooo, we switch to the other code branch and here we go. Trying to see what is wrong with the code and what error messages could pop up. I sent him the error, he already pushed the fix, here we go.
There's some small things we need to fix, working on it!