bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
planar_arm.h
Go to the documentation of this file.
1#ifndef BITSIM_KINEMATICS_PLANAR_ARM_H
2#define BITSIM_KINEMATICS_PLANAR_ARM_H
3
4#include "bitsim/bitsim_config.h"
5
6#ifdef BITSIM_CHRONO
7
9
10#include <Eigen/Core>
11#include <chrono/core/ChFrame.h>
12#include <chrono/core/ChVector3.h>
13
14#include <array>
15#include <vector>
16
17namespace bitsim
18{
19namespace kinematics
20{
21
28{
29 real_t l1{0.4};
30 real_t l2{0.3};
31};
32
37using PlanarJoints = std::array<real_t, 2>;
38
44chrono::ChVector3d planar_fk(const PlanarArm &arm, const PlanarJoints &q);
45
51chrono::ChFrame<> planar_fk_frames(const PlanarArm &arm, const PlanarJoints &q);
52
61std::vector<PlanarJoints> planar_ik(const PlanarArm &arm, real_t x, real_t y);
62
69
70} // namespace kinematics
71} // namespace bitsim
72
73#endif // BITSIM_CHRONO
74#endif // BITSIM_KINEMATICS_PLANAR_ARM_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
RealMat2d planar_jacobian(const PlanarArm &arm, const PlanarJoints &q)
The Jacobian . It is singular when : the arm fully stretched or folded.
Definition kinematics.cpp:83
std::vector< PlanarJoints > 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.
Definition kinematics.cpp:56
std::array< real_t, 2 > PlanarJoints
The angles of the two joints of a PlanarArm [rad].
Definition planar_arm.h:37
ChFrame planar_fk_frames(const PlanarArm &arm, const PlanarJoints &q)
The pose of the tip as a chain of frames, : each joint adds a rotation about z, each link an offset a...
Definition kinematics.cpp:48
ChVector3d planar_fk(const PlanarArm &arm, const PlanarJoints &q)
Where the tip is, written out with trigonometry: , .
Definition kinematics.cpp:42
Definition denavit_hartenberg.h:18
Definition dc_motor_backend_base.h:9
Eigen::Matrix2< real_t > RealMat2d
2×2 matrix of type double.
Definition bitsim_types.h:81
double real_t
real_t
Definition bitsim_types.h:20
A planar arm with two links that moves in the xy plane, like a SCARA arm seen from above....
Definition planar_arm.h:28
real_t l1
the first link [m]
Definition planar_arm.h:29
real_t l2
the second link [m]
Definition planar_arm.h:30