• Hexapod v0.11

    Vladimir04/01/2020 at 11:37 0 comments

    After creating the first version of a robot construction, inverse kinematic algorithms, basic software and testing workability, the aim is for the next version was to:

    1. Develop a forward kinematic algorithm
    2. Connect a remote controller
    3. Show the data on a computer screen as a plot in real time
    4. Modify the mechanical part according to previous mistakes

    So the work was done and now you can see the results on the video:

    All the source code in my GitHub page: https://github.com/yoggi56/hexapod

    Remote controller

    I decided to choose Sony Dualshock 4 as a remote controller just because I already have it. Connecting the gamepad to Ubuntu and using it in ROS is quite simple problem. Here and here you can see instructions how to do that. 

    After installing a driver for the controller it was necessary to write down a node in order to control robot acting. The node is called ps4_control and you can find it in my GitHub repository.

    Forward kinematic algorithm

    On the basis of the selected type of a robot construction with an insectomorphic type of actuators, a solution of the direct kinematics problem is obtained using two methods: algebraic and geometric approach.

    Algebraic approach comes down to a sequential multiplication of matrices describing coordinate systems:


    is radius-vector describing the position of the end of the robot foot relative to the geometric center of the robot

    is a matrix describing position of the foot attachment point relative to the geometric center of the robot's body

    is a matrix describing the position of the i-th joint relative to the point of attachment of the leg.

    Alternatively, there is a geometric method. It differs in that the spatial geometry of a limb is decomposed into several geometric problems on the plane. The figures show projections of the actuator on the YX and ZX planes, respectively.

    The only variables in this system of equations are the values of the angles of the servos, which allow to accurately determine the position of the pedipulator relative to the origin of the robot.

    Using the leg R2 (middle on the right side) as an example, I confirmed that both methods yield the same set of formulae for determining coordinates of the end of the leg:

    \color{White} \large \theta_{i}

    is an angle of i-th joint in the pedipulator;

    x, y, z are the coordinates of the robot foot relative to the geometric center of the robot’s body;

    \color{White} \large L_{i}is a length of i-th joint;;

    W is robot body width.

    To test the results of the approaches described above, a model was developed using the Matlab package. The obtained results were compared with the CAD model using the leg R2 as an example. The same angles were set in the joints of both the CAD model and the mathematical models, and then they were compared.

    The results of the check revealed minor deviations in the resulting coordinate values. These deviations are not systematic and may be related to differences in algorithms for calculating trigonometric functions, the number of π, and possible rounding of preliminary results in SolidWorks and Simulink software products. At the same time, comparing the geometric and algebraic approaches, it was found that the results of calculating the coordinates of the end of the foot are almost identical for both approaches. Also note that the algebraic approach requires 40 multiplications, 17 trigonometry calculations, and 22 additions, while the geometric approach requires only 8 multiplications, 8 trigonometric calculations, and 12 additions.

    Thus, it is concluded that the geometric method is more preferable for solving the problem of calculating kinematics for a walking device with an insectomorphic type of legs.

     Showing data on a screen

    To output data from ROS network in the form of a plot I used an open source software which is called PlotJuggler. More information about it is here and here. This programme has a special streaming mode which can subscribe to every topics in ROS network...

    Read more »

  • Experiment #1

    Vladimir11/20/2019 at 15:50 0 comments

    Here is the first experiment with a robot leg and solving inverse kinematic problem algorithm. Software was written in C++ running ROS Kinetic. A marker was attached to the end of the leg in order to check correctness of the algorithm. Also reference trajectory is a circle.

    This is a visualized scheme of software.

    Every node has a special function:

    • circle_traj_generator - forms a reference circle trajectory for the end of the leg
    • leg_inv_kinematic - solves inverse kinematic problem. Input: reference coordinates. Output: reference joint angles
    • dynamixel_control - connects to servos, set their params and transforms angle data from double to format understandable for a dynamixel driver
    • dynamixel_manager - dynamixel driver that gets data about angles and send it to a serial port

    See my github page for the full source code https://github.com/yoggi56/hexapod