log 6/2 - some more problems with my code

A project log for Quadruped learning project

Quadruped robot learning.

tsmspacetsmspace 01/15/2017 at 07:570 Comments

So, some of these problems are not new,, but I did not yet record or fix them.

My z axis is inverted,,, not that the joystick is inverted (although it would seem as though that would be a fix),, the actual z coordinate is opposite from what it needs to be,, so in order to assign values without joysticks I will probably have to figure out what is going on., and fix it. The equation is programming the leg position, however when the z coordinate goes more positive, the leg travels more downward. perhaps using the negative sign at the right place in the equation will fix it.

actually I'm pretty sure that my Y axis is also backward.

I don't understand exactly what is happening that is causing the leg to suddenly curl up when it nears the boundaries. Is that just what servos do? I don't think so,, , for some reason it is assigning a servo angle that can't be reached, but I don't understand how, because the xyz coordinates on my serial monitor don't take extreme leaps,, they can seem a little jumpy, but at other times it is clearly just the servo reaching for a different location than the coordinates on the screen. I will play with a serial monitor for angles as well,, but I don't know if that's my answer either. On the one had I want to have stable boundaries, but on the other hand I don't want to sacrifice mobility for tight little xyz windows. thinking aloud, perhaps there is a circle equation that can define my xyz boundaries, as a square is actually not logical for an arm that swings on a central axis. (this would also be an equation where in truth there are offsets to be considered, however these offsets will probably be problematic for me).

other note: really, I don't want my joystick to be right on top of the leg,, I want it to reach a ways. I will of course not want to make very long wires for each joystick axis + power and ground,, and then later if I want buttons, etc.,, but I haven't succeeded in making a working transmit of decodable data using my new transmit/receiver pairs. (those super cheap ones, mine are MX_RM_5V, 5 pairs for 9 bucks on amazon). ,, so perhaps I will use my cannibalized usb wire to give me a few feet of reach to another UNO, which will communicate via serial to the robot controller,, by sending joystick data. I also don't want to use XBEE.,, actually I DO need to study that (I can't afford it now),, because I also want to stream sensor data from my robot to a raspberry pi,, or possibly my desktop,, where I will try to learn sensor mapping and data collection. There are a lot of examples of people using "processing" to make sensor displays, although from my standpoint this is a lofty goal.

perhaps I can tune those transmitters to another frequency in the programming, which would allow my controller to be transmitting to the robot, and the robot to be transmitting to the pi, and using the same cheap transmitter without interfering.