chip updates: combining and fixing the software for chip [updates]
So one real annoying thing about the current control scheme, is that if we want to just lift the knee joint, move the shoulder forward, and place the knee, we cannot. So that's the first thing that needs to change. We need to merge IK and balance into MASTER because otherwise we can't do the level of control that we want to do. So we don't completely blow the code, we're going to do this in a NEW workspace.
So now we've created a new catkin workspace, we've created a new package, and we've built the same file structure src/scripts and a launch directory in the package. We're going to start copying over the files that will be explicitly copied (no changes required).
That's the RIO_DATA_READ node, RIO_DATA_WRITE node. So let's start with those. Then we copy over DEFAULTS.py, LEG_MODEL.py, CONTROL_MODES.py, FK, and we're re-writing MASTER so we don't really need to copy that one over yet. Finally, let's copy over that launch file.
REMEMBER TO CHMOD EVERYTHING!!!
Okay I think everything is copied over, now what I'm going to do is run the nodes and figure out what topics master now needs to subscribe to and what it needs to publish to.
So the system needs to TAKE IN /POS, /XYZ_CURRENT, /joy, /imu/data, and then OUTPUT /CMDS. We're going to name the new master, CHIP.py because it's doing everything you know. In fact, we don't even need the FK node but we can get rid of that later. For now, we've created the master and pasted the IK methods into the master.
We're going to now write a new method, called SEND_COMMAND which basically is a copy and paster of the callback function in the IK node but it will allow us to integrate the code more seamlessly.
So now the workflow is as follow. We do the SAME things we were doing before except now we simply run SET_TO_PUB = doIK(XYZ) and then publish. But it allows us now to do the same things we've been doing.
What we're going to do next is delete all the defaults we found including STAND_SIT since that needs to be cleaned up as well. And we're going to start, very basically, with STAND_SIT. And we're going to do it OUTSIDE where' there's GRIP so we get this right based on where the feet need to be. We'll need to keep the feet a certain distance apart on standup. We're going to need to go set defaults/etc again. We don't know what sit/stand should be outside because very simply, we tuned them for the indoors which was a mistake. Then we can work on a much better walking trajectory which allows us to pick up the knee and simply move it forward instead of moving the leg back first. We're going to have the WHOLE PROGRAM speak in CMDS now not XYZ because even though it's simpler for us to understand, CMDS will give us better dynamic performance of the robot.
We're also going to re-find a good standing position/home position where the legs are balanced equal weight on the front and the rear.
So yea, we have a lot of work to do :( but at least this way we'll get a much more dynamic response.
So yes, we need to fix zeroing, but for now it's actually not the biggest issue you know. I think the biggest issue was the previous set of code was very un-ideal for dynamics and the platform itself. We also need to re-write defaults/reorganize defaults so we can actually read the code usefully.
We're not going to try touching the IMU just yet because we don't know how to integrate that with trajectory. We'll work through the statics and then deal with the trajectory stuff.