bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
planar_arm.h File Reference
#include "bitsim/bitsim_config.h"
#include "bitsim/bitsim_types.h"
#include <Eigen/Core>
#include <chrono/core/ChFrame.h>
#include <chrono/core/ChVector3.h>
#include <array>
#include <vector>
Include dependency graph for planar_arm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bitsim::kinematics::PlanarArm
 A planar arm with two links that moves in the xy plane, like a SCARA arm seen from above. Joint 1 is at the origin of the world, and both joints turn about z. More...

Namespaces

namespace  bitsim
namespace  bitsim::kinematics

Typedefs

using bitsim::kinematics::PlanarJoints = std::array<real_t, 2>
 The angles of the two joints of a PlanarArm [rad].

Functions

ChVector3d bitsim::kinematics::planar_fk (const PlanarArm &arm, const PlanarJoints &q)
 Where the tip is, written out with trigonometry: \(x = l_1 \cos q_1 + l_2 \cos(q_1 + q_2)\), \(y = l_1 \sin q_1 + l_2 \sin(q_1 + q_2)\).
ChFrame bitsim::kinematics::planar_fk_frames (const PlanarArm &arm, const PlanarJoints &q)
 The pose of the tip as a chain of frames, \(X_{WE} = X_{W1} X_{12} X_{2E}\): each joint adds a rotation about z, each link an offset along x.
std::vector< PlanarJoints > bitsim::kinematics::planar_ik (const PlanarArm &arm, real_t x, real_t y)
 The joint angles that put the tip at (x, y), from the law of cosines.
RealMat2d bitsim::kinematics::planar_jacobian (const PlanarArm &arm, const PlanarJoints &q)
 The Jacobian \(\partial(x, y) / \partial(q_1, q_2)\). It is singular when \(\sin q_2 = 0\): the arm fully stretched or folded.