Showing posts with label motion. Show all posts
Showing posts with label motion. Show all posts

2013-08-09

ODE instead of IKFast

After working with IKFast for a while, I realized that the OpenRAVE + IKFast combo is overkill for my purpose, and It might not do what I need/want. I wrote my robot definition in XML based on one of the examples, loaded it in OpenRAVE and all was dany, except that it was really hard to work with. I have instead shifted my effort to creating a custom software in C++ / OpenGL / Qt5 / ODE.

Open Dynamics Engine joint types


The idea is to construct a model of the robot using ODE bodies connected with hinges, and then fit the model with linear motors in place of the linear actuators. The model will be constructed with realistic masses, sizes and motor speeds and torques in an environment with realistic ground friction and gravity. So this model will in many ways simulate a real hardware robot, with quirks and numerical errors in place.

Then the next step is to write a layered stack of controller logic that only receive as input the physical properties of the robot such as the limb sizes, masses and so on plus the robot state in the form of linear actuator position readings and the actual position of the limbs in the simulation.

By carefully crafting the logic in each layer of the stack, I can create a feedback loop that continuously "improves" the simulated state of the robot so that it resembles the desired configuration as much as possible.

Each layer will have its separate well defined set of responsibilities and well defined interfaces to the neighboring layers, allowing for experimentation within each confined layer bu exchanging modules.

This model will most likely make the work of finding good parameters for the robot much easier. Trusting the results will be easier.

2013-08-01

3D rig

I have used  Light Wave since version 5.0, and it is a great 3D modeling and animation program with really long traditions. It has support for inverse kinematics, so it is perfect for experimenting with different models of the robot.  I have made a 3D model and animated it.

The purpose is to find optimum leg configurations, sizes and placements. I can also use the model to predict what kind of forces and precision I will need in my actuators. This was the greatest take-away from my first limb prototype, the fact that I need to have actuators with more torque and a design with much more sturdy joints. This is my first result. Its a single walk cylcle:



2013-07-24

IKFast

Right now I am working on the software part of the robot. The area I have worked most on is related to vision, audio and other rather complex areas. I have hit a wall because the single most important algorithm for the vision subsytem, namely the SURF has an implementation in OpenCL that refuses to run on my nVidia hardware. Apparently nVidia has inferior OpenCL support to the likes of AMD. I have struggled with a hodgepodge of drivers, libraries and versions before essentially giving up til I get my hands on some better hardware.

In the meantime I have shifted focus to another important part of the software, namely motion. How will the position of the legs be calculated? I have worked with 3D graphics for a while earlier in my carrier, and I instantly googled "IK" for "Inverse Kinematics", which is the art and science of calculating where a bunch of stuff under constraints will move when receiving input.

It turns out that to make IK work I will have to create an accurate 3D model of the robot body first. How else would the IK solver know what and how to operate?




After looking around for a bit for C++ libraries for solving IK problems, I came across IKFast which is a plugin to the extensive OpenRAVE project that takes the whole making a model and simulating it very seriously. Actually IKFast is a compiler that will generate C++ code that can be incorporated into my project directly. It needs a robot description as input, and it will output code that is fast, accurate and robust and that fits my robot perfectly.

This is exactly the kind of tool I love. Performance in the front seat. The downside (or upside if you will) is that I need to know exaclty how my robot should look like, and although I have all these dreams resembling scenes from the sci-fi movies, I havent put much effort into finding a resonable working design.

I guess it is time that I start designing the body of my robot. Maybe I can use the robot model to simulate my way to a better design?