FancySafeBot 0.0.1
A safe robotics library
Loading...
Searching...
No Matches
fsb_joint.h
1
2#ifndef FSB_JOINT_H
3#define FSB_JOINT_H
4
5#include <array>
6#include <cstddef>
7#include <cstdint>
8#include "fsb_configuration.h"
9#include "fsb_types.h"
10#include "fsb_motion.h"
11
12namespace fsb
13{
14
27enum class JointType : uint8_t
28{
30 FIXED = 0,
32 REVOLUTE_X = 1,
34 REVOLUTE_Y = 2,
36 REVOLUTE_Z = 3,
38 PRISMATIC_X = 4,
40 PRISMATIC_Y = 5,
42 PRISMATIC_Z = 6,
44 SPHERICAL = 7,
46 CARTESIAN = 8,
48 PLANAR = 9
49};
50
55{
59 std::array<real_t, MaxSize::coordinates> q;
60};
61
66{
70 std::array<real_t, MaxSize::dofs> qv;
71};
72
91
128
137
145MotionVector joint_parent_child_velocity(const Joint& joint, const JointSpace& velocity);
146
154MotionVector joint_parent_child_acceleration(const Joint& joint, const JointPva& joint_pva);
155
165CartesianPva joint_parent_child_pva(const Joint& joint, const JointPva& joint_pva);
166
171} // namespace fsb
172
173#endif // FSB_JOINT_H
Transform joint_parent_child_transform(const Joint &joint, const JointSpacePosition &position)
Get transform of child body with respect to parent body.
Definition fsb_joint.cpp:9
CartesianPva joint_parent_child_pva(const Joint &joint, const JointPva &joint_pva)
Get the Cartesian space pose, velocity and acceleration of the child body with respect to the parent ...
Definition fsb_joint.cpp:208
MotionVector joint_parent_child_acceleration(const Joint &joint, const JointPva &joint_pva)
Get the Cartesian space acceleration of the child body with respect to the parent body.
Definition fsb_joint.cpp:145
MotionVector joint_parent_child_velocity(const Joint &joint, const JointSpace &velocity)
Get the Cartesian space velocity of the child body with respect to the parent body.
Definition fsb_joint.cpp:83
JointType
Joint type.
Definition fsb_joint.h:28
@ PLANAR
Planar joint in XY plane.
@ REVOLUTE_Y
Revolute joint about the y-axis.
@ SPHERICAL
Spherical joint.
@ PRISMATIC_Y
Prismatic joint along y-axis.
@ REVOLUTE_X
Revolute joint about the x-axis.
@ CARTESIAN
6 DoF Cartesian joint
@ PRISMATIC_Z
Prismatic joint along z-axis.
@ FIXED
Fixed joint.
@ PRISMATIC_X
Prismatic joint along x-axis.
@ REVOLUTE_Z
Revolute joint about the z-axis.
Cartesian pose, velocity and acceleration.
Definition fsb_motion.h:53
Definition fsb_joint.h:77
JointSpace acceleration
Joint acceleration.
Definition fsb_joint.h:89
JointSpacePosition position
Joint position.
Definition fsb_joint.h:81
JointSpace velocity
Joint velocity.
Definition fsb_joint.h:85
Joint space position in generalized coordinates.
Definition fsb_joint.h:55
std::array< real_t, MaxSize::coordinates > q
Joint space position data array.
Definition fsb_joint.h:59
Joint space differential of generalized coordinates.
Definition fsb_joint.h:66
std::array< real_t, MaxSize::dofs > qv
Joint space differential data array.
Definition fsb_joint.h:70
Joint definition structure.
Definition fsb_joint.h:96
size_t child_body_index
Index of model child body to which the joint is connected.
Definition fsb_joint.h:116
Transform nominal_parent_joint_transform
Joint pose with respect to the parent body without offset.
Definition fsb_joint.h:108
size_t coord_index
Index of the joint's first generalized coordinate in the model joint space position vector JointSpace...
Definition fsb_joint.h:121
size_t parent_body_index
Index of model parent body to which the joint is attached.
Definition fsb_joint.h:112
Transform parent_joint_transform
Joint pose with respect to the parent body with offset from parent body.
Definition fsb_joint.h:104
JointType type
Joint type.
Definition fsb_joint.h:100
size_t dof_index
Index of the joint's first differential generalized coordinate in the model joint space vector JointS...
Definition fsb_joint.h:126
Motion vector.
Definition fsb_motion.h:37
Coordinate transform.
Definition fsb_motion.h:22