C++ΒΆ
GeometryΒΆ
-
using Config = std::vector<double>
Type alias for
std::vector<double>
as a joint configuration of a robot.
-
struct Frame : public Eigen::Isometry3d
Represents a transformation or pose in 3D Cartesian space.
Encapsulates translation and rotation in a unified manner for 3D poses.
Public Types
-
using Translation = Eigen::Translation3d
Translation component.
-
using EulerAngles = Eigen::EulerAngles<double, Eigen::EulerSystemXYZ>
Euler angles representation.
-
using EulerParameter = std::array<double, 6>
Euler angles and translation.
-
using QuaternionParameter = std::array<double, 7>
Quaternion and translation.
Public Functions
-
Frame() = default
Default constructor.
-
Frame(const Eigen::Isometry3d &frame)
Construct a Frame from an Eigen Isometry3d object.
- Parameters:
frame β An Eigen Isometry3d object representing the transformation.
-
double translational_distance(const Frame &other) const
Calculate the Euclidean distance between two Framesβ positions.
- Parameters:
other β The other Frame to compare against.
- Returns:
double The Euclidean distance.
-
double angular_distance(const Frame &other) const
Calculate the angular distance between two Framesβ orientations.
- Parameters:
other β The other Frame to compare against.
- Returns:
double The angular distance.
-
Frame interpolate(double t, const Frame &other) const
Interpolate between this Frame and another Frame.
- Parameters:
t β The interpolation parameter (0.0 to 1.0).
other β The other Frame to interpolate towards.
- Returns:
Frame The interpolated Frame.
-
std::array<double, 16> to_matrix() const
Convert the Frame to a 4x4 matrix.
- Returns:
std::array<double, 16> The Frame as a 4x4 matrix.
-
std::array<double, 6> to_euler() const
Convert the Frame to Euler angles and translation.
- Returns:
std::array<double, 6> The Frame as Euler angles and translation.
-
bool operator==(const Frame &other) const
Check if two Frames are equal.
- Parameters:
other β The other Frame to compare against.
- Returns:
bool True if the Frames are equal, false otherwise.
Public Static Functions
-
static Frame Identity()
Get the identity transformation.
- Returns:
Frame The identity Frame.
-
static Frame from_matrix(const std::array<double, 16> &data)
Create a Frame from a matrix.
- Parameters:
data β A 16-element array representing a 4x4 matrix.
- Returns:
Frame The Frame constructed from the matrix.
-
static Frame from_translation(double x, double y, double z)
Create a Frame from translation values.
- Parameters:
x β The x translation.
y β The y translation.
z β The z translation.
- Returns:
Frame The Frame with the specified translation.
-
static Frame from_quaternion(double x, double y, double z, double qw, double qx, double qy, double qz)
Create a Frame from quaternion values.
- Parameters:
x β The x component of the quaternion.
y β The y component of the quaternion.
z β The z component of the quaternion.
qw β The scalar component of the quaternion.
qx β The x component of the quaternion.
qy β The y component of the quaternion.
qz β The z component of the quaternion.
- Returns:
Frame The Frame with the specified quaternion.
-
static Frame from_euler(double x, double y, double z, double a, double b, double c)
Create a Frame from Euler angles.
- Parameters:
x β The x translation.
y β The y translation.
z β The z translation.
a β The rotation angle around the x-axis.
b β The rotation angle around the y-axis.
c β The rotation angle around the z-axis.
- Returns:
Frame The Frame with the specified translation and Euler angles.
-
static Frame x(double x)
Create a Frame representing a translation along the x-axis.
- Parameters:
x β The translation value along the x-axis.
- Returns:
Frame The Frame with the x-axis translation.
-
static Frame y(double y)
Create a Frame representing a translation along the y-axis.
- Parameters:
y β The translation value along the y-axis.
- Returns:
Frame The Frame with the y-axis translation.
-
static Frame z(double z)
Create a Frame representing a translation along the z-axis.
- Parameters:
z β The translation value along the z-axis.
- Returns:
Frame The Frame with the z-axis translation.
-
static Frame Rx(double c, double s)
Create a Frame representing a rotation around the x-axis.
- Parameters:
c β The cosine of the rotation angle.
s β The sine of the rotation angle.
- Returns:
Frame The Frame with the rotation around the x-axis.
-
static Frame Ry(double c, double s)
Create a Frame representing a rotation around the y-axis.
- Parameters:
c β The cosine of the rotation angle.
s β The sine of the rotation angle.
- Returns:
Frame The Frame with the rotation around the y-axis.
-
static Frame Rz(double c, double s)
Create a Frame representing a rotation around the z-axis.
- Parameters:
c β The cosine of the rotation angle.
s β The sine of the rotation angle.
- Returns:
Frame The Frame with the rotation around the z-axis.
-
static Frame Rx(double a)
Create a Frame representing a rotation around the x-axis.
- Parameters:
a β The rotation angle around the x-axis.
- Returns:
Frame The Frame with the rotation around the x-axis.
-
static Frame Ry(double a)
Create a Frame representing a rotation around the y-axis.
- Parameters:
a β The rotation angle around the y-axis.
- Returns:
Frame The Frame with the rotation around the y-axis.
-
static Frame Rz(double a)
Create a Frame representing a rotation around the z-axis.
- Parameters:
a β The rotation angle around the z-axis.
- Returns:
Frame The Frame with the rotation around the z-axis.
-
using Translation = Eigen::Translation3d
-
struct Twist : public Eigen::Vector<double, 6>
Represents a velocity in 3D Cartesian space.
The Twist struct represents a 6-dimensional vector used to describe velocity in 3D Cartesian space. It consists of linear velocities in the x, y, and z directions, and angular velocities around these axes.
Public Functions
-
Twist()
Default constructor.
-
Twist(double x, double y, double z, double rx, double ry, double rz)
Construct a Twist with specified linear and angular velocities.
- Parameters:
x β The linear velocity along the x-axis.
y β The linear velocity along the y-axis.
z β The linear velocity along the z-axis.
rx β The angular velocity around the x-axis.
ry β The angular velocity around the y-axis.
rz β The angular velocity around the z-axis.
-
Twist(const std::array<double, 6> &twist)
Construct a Twist from an array.
- Parameters:
twist β An array containing the 6-dimensional twist values.
-
Twist(const Eigen::Vector<double, 6> &twist)
Construct a Twist from an Eigen vector.
- Parameters:
twist β An Eigen vector containing the 6-dimensional twist values.
-
Twist operator+(const Twist &other)
Add two Twist objects.
- Parameters:
other β The Twist object to add.
- Returns:
Twist The result of the addition.
-
Twist transform(const Eigen::Matrix3d &rotation, const Eigen::Vector3d &translation) const
Transform the Twist by a rotation and translation.
- Parameters:
rotation β A 3x3 rotation matrix.
translation β A 3D translation vector.
- Returns:
Twist The transformed Twist.
-
Twist cross(const Twist &other) const
Compute the cross product of two Twists.
- Parameters:
other β The Twist object to cross with this one.
- Returns:
Twist The result of the cross product.
-
std::array<double, 6> to_array() const
Convert the Twist to an array.
Converts the Twist object into a 6-element array, with the components arranged as [x, y, z, rx, ry, rz].
- Returns:
std::array<double, 6> The Twist represented as an array.
-
Twist()
ElementΒΆ
-
struct Element
The base element of a scene.
The Element struct represents the base element of a scene, such as a robot, camera, or obstacle. It contains a name, pose, and tags that can be used to identify and categorize the element.
Subclassed by jacobi::Camera, jacobi::CartesianRegion, jacobi::CartesianWaypoint, jacobi::Obstacle, jacobi::Region, jacobi::Robot, jacobi::Waypoint
Public Functions
-
bool has_tag(const std::string &tag) const
Checks whether a tag is present on the element. Tags are case-insensitive.
- Parameters:
tag β The tag to check for.
- Returns:
bool True if the tag is present, false otherwise.
-
std::optional<std::string> get_parameter(const std::string &tag) const
Reads the value of a tag parameter
param=value
. Tags are case-insensitive.- Parameters:
tag β The tag to read the parameter from.
- Returns:
std::optional<std::string> The value of the parameter if it exists, std::nullopt otherwise.
Public Members
-
std::string name
The unique name of the element, for display and identification.
-
Frame origin = {Frame::Identity()}
Pose of the element, relative to the parent. Is called βbaseβ for robots in Studio.
-
std::vector<std::string> tags
Given tags of the element, might be with a parameter
param=value
.
-
bool has_tag(const std::string &tag) const
WaypointsΒΆ
-
class Waypoint : public jacobi::Element
A joint-space waypoint with possible position, velocity, and/or acceleration values.
The Waypoint class represents a point in the joint space of a robot with associated position, velocity, and acceleration values.
Public Functions
-
Waypoint(std::initializer_list<double> data)
Construct a waypoint by position data.
- Parameters:
data β A list of position values to initialize the waypoint.
-
Waypoint(const Config &position)
Construct a waypoint with given position and zero velocity and acceleration.
- Parameters:
position β The joint position to initialize the waypoint.
-
explicit Waypoint(const Config &position, const Config &velocity)
Construct a waypoint with given position and velocity and zero acceleration.
- Parameters:
position β The joint position to initialize the waypoint.
velocity β The joint velocity to initialize the waypoint.
-
inline explicit Waypoint(const Config &position, const Config &velocity, const Config &acceleration)
Construct a waypoint with given position, velocity, and acceleration.
- Parameters:
position β The joint position to initialize the waypoint.
velocity β The joint velocity to initialize the waypoint.
acceleration β The joint acceleration to initialize the waypoint.
-
inline explicit Waypoint(size_t size)
Construct a zero-initialized waypoint with the given size.
- Parameters:
size β The degrees of freedom for the waypoint.
-
inline explicit Waypoint()
Construct an empty waypoint.
-
inline void append(const Waypoint &other)
Append another waypoint to this one.
This method concatenates the position, velocity, and acceleration data from another waypoint to this one.
- Parameters:
other β The waypoint to append to this one.
-
inline size_t size() const
Get the size (or degrees of freedom) of the waypoint.
- Returns:
size_t The degrees of freedom represented by the waypoint.
-
bool is_within(const Waypoint &other) const
Check if this waypoint is within another waypoint.
This method checks if the current waypointβs position, velocity, and acceleration are within the respective boundaries of another waypoint.
- Parameters:
other β The waypoint to compare against.
- Returns:
true If this waypoint is within the boundaries of the other.
- Returns:
false If this waypoint is not within the boundaries of the other.
-
Waypoint(std::initializer_list<double> data)
-
class CartesianWaypoint : public jacobi::Element
A Cartesian-space waypoint with possible position, velocity, and/or acceleration values.
The CartesianWaypoint class represents a point in Cartesian space with associated position, velocity, and acceleration frames. It is used to define the robot state in Cartesian space at a specific instance, with optional reference joint positions for inverse kinematics.
Public Functions
-
CartesianWaypoint(const Frame &position, const std::optional<Config> &reference_config = std::nullopt)
Construct a Cartesian waypoint with given position and zero velocity and acceleration.
- Parameters:
position β The position frame to initialize the waypoint.
reference_config β An optional joint configuration for inverse kinematics.
-
explicit CartesianWaypoint(const Frame &position, const Frame &velocity, const std::optional<Config> &reference_config = std::nullopt)
Construct a Cartesian waypoint with given position and velocity and zero acceleration.
- Parameters:
position β The position frame to initialize the waypoint.
velocity β The velocity frame to initialize the waypoint.
reference_config β An optional joint configuration for inverse kinematics.
-
explicit CartesianWaypoint(const Frame &position, const Frame &velocity, const Frame &acceleration, const std::optional<Config> &reference_config = std::nullopt)
Construct a Cartesian waypoint with given position, velocity, and acceleration.
- Parameters:
position β The position frame to initialize the waypoint.
velocity β The velocity frame to initialize the waypoint.
acceleration β The acceleration frame to initialize the waypoint.
reference_config β An optional joint configuration for inverse kinematics.
-
explicit CartesianWaypoint() = default
Default constructor.
-
bool is_within(const CartesianWaypoint &other) const
Check if this Cartesian waypoint is within another Cartesian waypoint.
This method checks if the current waypointβs position, velocity, and acceleration frames are within the respective boundaries of another CartesianWaypoint.
- Parameters:
other β The CartesianWaypoint to compare against.
- Returns:
true If this waypoint is within the boundaries of the other.
- Returns:
false If this waypoint is not within the boundaries of the other.
Check if this Cartesian waypoint is within a joint-space waypoint, given a specific robot arm.
This method checks if the current CartesianWaypointβs position, velocity, and acceleration frames are within the boundaries of a joint space waypoint, considering the robot armβs kinematics.
- Parameters:
other β The joint-space Waypoint to compare against.
robot β The robot arm associated with the joint-space waypoint.
- Returns:
true If this CartesianWaypoint is within the boundaries of the other joint-space waypoint.
- Returns:
false If this CartesianWaypoint is not within the boundaries of the other joint-space waypoint.
Public Members
-
std::optional<Config> reference_config
An optional joint position that is used as a reference for inverse kinematics.
-
CartesianWaypoint(const Frame &position, const std::optional<Config> &reference_config = std::nullopt)
-
class Region : public jacobi::Element
A joint-space region with possible position, velocity, and/or acceleration values.
The Region class defines a region in joint space with boundaries on position, velocity, and acceleration. It is used to specify an area within which a the robot end-effector operates. The class provides methods to construct the region with varying levels of detail and to check if a given waypoint falls within the regionβs boundaries.
Public Functions
-
explicit Region()
Default constructor.
-
explicit Region(const Config &min_position, const Config &max_position)
Construct a Region with position boundaries.
- Parameters:
min_position β The minimum position boundary.
max_position β The maximum position boundary.
-
explicit Region(const Config &min_position, const Config &max_position, const Config &min_velocity, const Config &max_velocity)
Construct a Region with position and velocity boundaries.
- Parameters:
min_position β The minimum position boundary.
max_position β The maximum position boundary.
min_velocity β The minimum velocity boundary.
max_velocity β The maximum velocity boundary.
-
explicit Region(const Config &min_position, const Config &max_position, const Config &min_velocity, const Config &max_velocity, const Config &min_acceleration, const Config &max_acceleration)
Construct a Region with position, velocity, and acceleration boundaries.
- Parameters:
min_position β The minimum position boundary.
max_position β The maximum position boundary.
min_velocity β The minimum velocity boundary.
max_velocity β The maximum velocity boundary.
min_acceleration β The minimum acceleration boundary.
max_acceleration β The maximum acceleration boundary.
-
inline size_t size() const
Get the size (or degrees of freedom) of the region.
- Returns:
size_t The degrees of freedom represented by the region.
-
bool is_within(const Waypoint &other) const
Check if a given waypoint is within the region.
This method checks if the given waypointβs position, velocity, and acceleration fall within the respective boundaries defined by the region.
- Parameters:
other β The waypoint to check.
- Returns:
true If the waypoint is within the regionβs boundaries.
- Returns:
false If the waypoint is not within the regionβs boundaries.
Public Members
-
Config min_position
Minimum position boundary of the region.
-
Config max_position
Maximum position boundary of the region.
-
Config min_velocity
Minimum velocity boundary of the region.
-
Config max_velocity
Maximum velocity boundary of the region.
-
Config min_acceleration
Minimum acceleration boundary of the region.
-
Config max_acceleration
Maximum acceleration boundary of the region.
-
explicit Region()
-
struct CartesianRegionBound
The min or max boundary of a Cartesian region.
The CartesianRegionBound struct represents the boundaries of a region in Cartesian space. It defines both positional (x, y, z) and orientational (gamma, alpha) limits. These boundaries are used to constrain the movement or state of an object within a specified region.
Public Functions
-
CartesianRegionBound() = default
Default constructor.
-
inline explicit CartesianRegionBound(double x, double y, double z, double gamma = 0.0, double alpha = 0.0)
Construct a CartesianRegionBound with specified values.
- Parameters:
x β The x-coordinate of the boundary.
y β The y-coordinate of the boundary.
z β The z-coordinate of the boundary.
gamma β The rotational component around the z-axis (yaw).
alpha β The rotational component around the x-axis (roll).
Public Members
-
double x = {0.0}
The x-coordinate of the boundary.
-
double y = {0.0}
The y-coordinate of the boundary.
-
double z = {0.0}
The z-coordinate of the boundary.
-
double gamma = {0.0}
The rotational component around the z-axis (yaw).
-
double alpha = {0.0}
The rotational component around the x-axis (roll).
-
CartesianRegionBound() = default
-
class CartesianRegion : public jacobi::Element
A Cartesian-space region with possible minimum and maximum position, velocity, and/or acceleration values.
The CartesianRegion class defines a region in Cartesian space with optional boundaries for position, velocity, and acceleration. It is used to describe constraints on a Cartesian region within which the robot end-effector operates. The region can also have an associated reference configuration.
Public Functions
-
CartesianRegion() = default
Default constructor.
-
explicit CartesianRegion(const Frame &origin)
Construct a CartesianRegion with a specified origin.
- Parameters:
origin β The frame of reference for the region.
-
explicit CartesianRegion(const CartesianRegionBound &min_position, const CartesianRegionBound &max_position, const std::optional<Config> &reference_config = std::nullopt)
Construct a CartesianRegion with position boundaries and an optional reference configuration.
- Parameters:
min_position β The minimum position boundary.
max_position β The maximum position boundary.
reference_config β An optional reference configuration.
-
explicit CartesianRegion(const CartesianRegionBound &min_position, const CartesianRegionBound &max_position, const CartesianRegionBound &min_velocity, const CartesianRegionBound &max_velocity, const std::optional<Config> &reference_config = std::nullopt)
Construct a CartesianRegion with position and velocity boundaries, and an optional reference configuration.
- Parameters:
min_position β The minimum position boundary.
max_position β The maximum position boundary.
min_velocity β The minimum velocity boundary.
max_velocity β The maximum velocity boundary.
reference_config β An optional reference configuration.
-
explicit CartesianRegion(const CartesianRegionBound &min_position, const CartesianRegionBound &max_position, const CartesianRegionBound &min_velocity, const CartesianRegionBound &max_velocity, const CartesianRegionBound &min_acceleration, const CartesianRegionBound &max_acceleration, const std::optional<Config> &reference_config = std::nullopt)
Construct a CartesianRegion with position, velocity, and acceleration boundaries, and an optional reference configuration.
- Parameters:
min_position β The minimum position boundary.
max_position β The maximum position boundary.
min_velocity β The minimum velocity boundary.
max_velocity β The maximum velocity boundary.
min_acceleration β The minimum acceleration boundary.
max_acceleration β The maximum acceleration boundary.
reference_config β An optional reference configuration.
-
bool is_within(const CartesianWaypoint &other) const
Check if a CartesianWaypoint is within the region.
- Parameters:
other β The CartesianWaypoint to check.
- Returns:
true If the waypoint is within the region.
- Returns:
false If the waypoint is not within the region.
Check if a Waypoint is within the region, given a specific robot arm.
- Parameters:
other β The Waypoint to check.
robot β The robot arm associated with the waypoint.
- Returns:
true If the waypoint is within the region.
- Returns:
false If the waypoint is not within the region.
Public Members
-
CartesianRegionBound min_position
Minimum position boundary of the region.
-
CartesianRegionBound max_position
Maximum position boundary of the region.
-
CartesianRegionBound min_velocity
Minimum velocity boundary of the region.
-
CartesianRegionBound max_velocity
Maximum velocity boundary of the region.
-
CartesianRegionBound min_acceleration
Minimum acceleration boundary of the region.
-
CartesianRegionBound max_acceleration
Maximum acceleration boundary of the region.
-
std::optional<Config> reference_config
Reference configuration for the region, if any.
-
CartesianRegion() = default
-
using MultiRobotPoint = std::map<std::shared_ptr<Robot>, std::variant<Config, Waypoint, CartesianWaypoint>>
A type for specifying an exact start or goal point per robot.
-
using Point = std::variant<Config, Waypoint, CartesianWaypoint, MultiRobotPoint, Region, CartesianRegion>
All types for specifying motion start or goals, either exact or by region.
-
using ExactPoint = std::variant<Config, Waypoint, CartesianWaypoint, MultiRobotPoint>
All types for specifying exact start or goal points.
ObstaclesΒΆ
-
struct Box
A box collision object.
The Box struct represents a simple 3D rectangular collision object. It is defined by its dimensions along the x, y, and z axes, which correspond to the width, depth, and height of the box, respectively.
Public Functions
-
inline explicit Box(float x, float y, float z)
Construct a box of size x, y, z along the respective axes.
- Parameters:
x β The width of the box along the x-axis.
y β The depth of the box along the y-axis.
z β The height of the box along the z-axis.
-
explicit Box() = default
Default constructor.
Public Members
-
float x
Dimensions of the box [m].
-
inline explicit Box(float x, float y, float z)
-
struct Capsule
A capsule collision object.
The Capsule struct represents a simple 3D collision object shaped like a capsule (a cylinder with hemispherical ends). It is defined by its radius and length along the z-axis. Capsules are commonly used in collision detection due to their computational efficiency.
Public Functions
-
inline explicit Capsule(float radius, float length)
Construct a capsule with the given radius and length.
- Parameters:
radius β The radius of the capsule.
length β The length of the capsule along the z-axis.
-
explicit Capsule() = default
Default constructor.
Public Members
-
float radius
Radius of the capsule [m].
-
float length
Length of the capsule along the z-axis [m].
-
inline explicit Capsule(float radius, float length)
-
struct Convex
A convex mesh collision object.
The Convex struct represents a 3D convex mesh, often used for collision detection. It supports loading from files, direct vertex and triangle specification, and provides utility functions like bounding box computation.
Public Functions
-
explicit Convex() = default
Default constructor.
-
explicit Convex(const std::filesystem::path &path, std::optional<float> scale)
Construct a convex object by loading from a file.
- Parameters:
path β The path to the file (*.obj).
scale β Optional scale to apply when loading the object.
-
explicit Convex(const std::vector<std::array<float, 3>> &verts, const std::vector<std::array<size_t, 3>> &triangs)
Construct a convex object from given vertices and triangles.
- Parameters:
verts β List of vertex positions.
triangs β List of triangles, each defined by three vertex indices.
-
std::array<double, 3> get_bounding_box_minimum() const
Get the minimum bounding box corner.
- Returns:
A 3D vector representing the minimum corner of the bounding box.
-
std::array<double, 3> get_bounding_box_maximum() const
Get the maximum bounding box corner.
- Returns:
A 3D vector representing the maximum corner of the bounding box.
Public Members
-
std::optional<FileReference> file_reference
Optional file reference from which the convex object was loaded.
-
std::vector<Vector> vertices
List of vertices that define the convex mesh.
-
std::vector<Triangle> triangles
List of triangles that define the convex mesh surface.
Public Static Functions
-
static std::vector<Convex> load_from_file(const std::filesystem::path &path, std::optional<float> scale = std::nullopt)
Load convex objects from a file.
- Parameters:
path β The path to the file (*.obj).
scale β Optional scale to apply when loading the object.
- Returns:
A vector of Convex objects loaded from the file.
-
static Convex reference_studio_file(const std::filesystem::path &path, std::optional<float> scale = std::nullopt)
Create a reference to a Studio file.
- Parameters:
path β The path to the Studio file.
scale β Optional scale to apply when referencing the file.
- Returns:
A Convex object that references the specified Studio file.
Public Static Attributes
-
static std::filesystem::path base_path
Base path for file operations.
-
class Triangle
-
explicit Convex() = default
-
struct Cylinder
A cylinder collision object.
The Cylinder struct represents a 3D cylindrical collision object. It is defined by its radius and length along the z-axis.
Public Functions
-
inline explicit Cylinder(float radius, float length)
Construct a cylinder with the given radius and length.
- Parameters:
radius β The radius of the cylinder.
length β The length of the cylinder along the z-axis.
-
explicit Cylinder() = default
Default constructor.
Public Members
-
float radius
Radius of the cylinder [m].
-
float length
Length of the cylinder along the z-axis [m].
-
inline explicit Cylinder(float radius, float length)
-
struct DepthMap
A depth map collision object.
The DepthMap struct represents a 3D collision object based on a depth map, which is essentially a grid of depth values.
Public Functions
-
inline explicit DepthMap(const Matrix &depths, float x, float y)
Construct a depth map with the given data.
- Parameters:
depths β The matrix of depth values.
x β The size of the depth map along the x-axis.
y β The size of the depth map along the y-axis.
-
explicit DepthMap() = default
Default constructor.
Public Members
-
Matrix depths
Matrix containing the depth values at evenly spaced grid points.
-
float x
Size along the x-axis [m].
-
float y
Size along the y-axis [m].
-
float max_depth = {1e2}
Maximum depth to check for collisions [m].
This value sets the maximum depth that will be considered during collision checking. Any depth greater than this value will be ignored. The default value is 100 meters.
-
inline explicit DepthMap(const Matrix &depths, float x, float y)
-
struct Sphere
A sphere collision object.
The Sphere struct represents a 3D spherical collision object, defined by its radius, which determines its size in all directions.
Public Functions
-
inline explicit Sphere(float radius)
Construct a sphere with the given radius.
Initializes the sphere with the specified radius.
- Parameters:
radius β The radius of the sphere.
-
explicit Sphere() = default
Default constructor.
Public Members
-
float radius
Radius of the sphere [m].
-
inline explicit Sphere(float radius)
-
class Obstacle : public jacobi::Element
An environment obstacle.
The Obstacle class represents an object in an environment that can be used for both visualization and collision detection. Obstacles can have various geometric shapes and properties, and can be associated with a robot or be independent within the environment.
Public Functions
-
explicit Obstacle() = default
Default constructor.
-
Obstacle with_origin(const Frame &origin) const
Clone the current obstacle and set the new origin.
Creates a copy of the current obstacle and updates its origin to the provided frame. This function is useful for creating modified versions of an obstacle without altering the original object.
- Parameters:
origin β The new pose (origin) for the cloned obstacle.
- Returns:
Obstacle A new Obstacle instance with the updated origin.
-
Obstacle with_name(const std::string &name) const
Clone the current obstacle and update some parameters.
Creates a copy of the current obstacle and updates its name. This function is useful for creating modified versions of an obstacle without altering the original object.
- Parameters:
name β The new name for the cloned obstacle.
- Returns:
Obstacle A new Obstacle instance with the updated origin.
Public Members
-
Color color
The hex-string representation of the obstacleβs color, without the leading #.
This string defines the color of the obstacle for visualization purposes, formatted as a hex code (e.g., βFF5733β for orange).
-
std::optional<FileReference> visual
Optional reference to the visual file.
This optional reference points to an external visual file that represents the obstacle. If provided, this file will be used for rendering the obstacleβs appearance.
-
Geometry collision
The object for collision checking (and/or visualization).
This variant holds the geometric representation of the obstacle. It can be any of the supported shapes, including Box, Capsule, Convex, ConvexVector, Cylinder, DepthMap, or Sphere.
-
bool for_visual = {true}
Whether this obstacle is used for visualization.
If true, the obstacle will be rendered in the environmentβs visualization in Studio. By default, this is set to true.
-
bool for_collision = {true}
Whether this obstacle is used for collision checking.
If true, the obstacle will be considered in collision detection calculations. By default, this is set to true.
-
float safety_margin = {0.0}
An additional obstacle-specific safety margin for collision checking (on top of the environmentβs global safety margin).
This margin adds an extra buffer around the obstacle during collision detection. It is specific to this obstacle and is added on top of any global safety margins.
-
Robot *robot = {nullptr}
Pointer to the associated robot, if any.
-
explicit Obstacle() = default
EnvironmentΒΆ
-
class Environment
The environment a robot (or multiple robots) lives in.
The Environment class manages static obstacles, collision checking, waypoints, cameras, and robots within a defined environment. The class provides methods to add, remove, and manage obstacles and waypoints, as well as to retrieve information about these elements. It also includes functionality for collision checking and updating the state of obstacles and robots.
Public Functions
Create an environment with a controllable robot.
- Parameters:
robot β The robot to add to the environment.
safety_margin β The global safety margin for collision checking [m].
Create an environment with multiple robots.
- Parameters:
robots β The robots to add to the environment.
safety_margin β The global safety margin for collision checking [m].
-
void set_safety_margin(float safety_margin)
Environmentβs global safety margin for collision checking [m].
- Parameters:
global_safety_margin β The global safety margin for collision checking [m].
-
float safety_margin() const
Environmentβs global safety margin for collision checking [m].
- Returns:
The global safety margin for collision checking [m].
-
std::shared_ptr<Robot> get_robot(const std::string &name = "") const
Get the robot with the given name from the environment.
In case there is only a single robot in the environment, the default empty name argument will return this robot. Otherwise throws an error if no robot with the name exists.
- Parameters:
name β The name of the robot to retrieve.
- Returns:
The shared pointer to a robot object associated with the given name.
-
std::vector<std::shared_ptr<Robot>> get_robots() const
Get all robots within the environment.
- Returns:
A vector of shared pointers to the robots within the environment.
-
Point get_waypoint(const std::string &name) const
Get the waypoint with the given name from the environment. Throws an error if no waypoint with the name exists.
- Parameters:
name β The name of the waypoint to retrieve.
- Returns:
The waypoint associated with the given name.
-
std::optional<Point> get_waypoint_by_tag(const std::string &tag) const
Get a waypoint within the environment given a tag. If multiple waypoints have the same tag, the first one to be found is returned.
- Parameters:
tag β The tag associated with the waypoint to retrieve.
- Returns:
An optional containing the waypoint associated with the given tag, or std::nullopt if no waypoint with the tag is found.
-
std::vector<Point> get_waypoints_by_tag(const std::string &tag) const
Get all waypoints within the environment given a tag.
- Parameters:
tag β The tag associated with the waypoints to retrieve.
- Returns:
A vector of waypoints that have the specified tag.
-
std::vector<Point> get_waypoints() const
Get all waypoints within the environment.
This function retrieves a list of all waypoints present in the environment.
- Returns:
A vector of waypoints within the environment.
-
std::shared_ptr<Obstacle> get_obstacle(const std::string &name) const
Get the obstacle with the given name from the environment. Throws an error if no obstacle with the name exists.
- Parameters:
name β The name of the obstacle to retrieve.
- Returns:
A shared pointer to the obstacle associated with the given name.
-
std::vector<std::shared_ptr<Obstacle>> get_obstacles_by_tag(const std::string &tag) const
Get all obstacles within the environment that carry the given tag.
- Parameters:
tag β The tag associated with the obstacles to retrieve.
- Returns:
A vector of shared pointers to the obstacles that have the specified tag.
-
std::vector<std::shared_ptr<Obstacle>> get_obstacles() const
Get all obstacles within the environment.
This function retrieves a list of all obstacles present in the environment.
- Returns:
A vector of shared pointers to the obstacles within the environment.
-
std::shared_ptr<Camera> get_camera(const std::string &name = "") const
Get a camera from the environment.
- Parameters:
name β Optional parameter to specify the name of the camera. If not provided, an empty string defaults to retrieving a camera without a specific name.
- Returns:
A shared pointer to the camera associated with the given name, or a default camera if the name is empty.
Add an obstacle to the environment (and returns the pointer to it)
- Parameters:
obstacle β The obstacle to add to the environment.
- Returns:
The original shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const Obstacle &obstacle)
Add an obstacle to the environment (and returns the pointer to it)
- Parameters:
obstacle β The obstacle to add to the environment.
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const Box &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a box-shaped obstacle to the environment.
- Parameters:
object β The box-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const Capsule &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a capsule-shaped obstacle to the environment.
- Parameters:
object β The capsule-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const Convex &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a convex-shaped obstacle to the environment.
- Parameters:
object β The convex-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const ConvexVector &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a vector of convex-shaped obstacles to the environment.
- Parameters:
object β The vector of convex-shaped obstacles to add.
origin β The initial pose of the obstacles in the environment (default is Frame::Identity()).
color β The color of the obstacles in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacles (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const Cylinder &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a cylinder-shaped obstacle to the environment.
- Parameters:
object β The cylinder-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const DepthMap &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a depth map-shaped obstacle to the environment.
- Parameters:
object β The depth map-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const Sphere &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a sphere-shaped obstacle to the environment.
- Parameters:
object β The sphere-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const Box &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add an obstacle with a name to the environment.
- Parameters:
name β The name to assign to the obstacle.
object β The obstacle to add (of a specific type, e.g., Box, Capsule, etc.).
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const Capsule &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Overload for adding an obstacle with a name and various shapes.
- Parameters:
name β The name to assign to the obstacle.
object β The obstacle to add (of a specific type, e.g., Capsule, Convex, etc.).
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const Convex &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a convex-shaped obstacle with a name to the environment.
- Parameters:
name β The name to assign to the obstacle.
object β The convex-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const ConvexVector &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a vector of convex-shaped obstacles with a name to the environment.
- Parameters:
name β The name to assign to the obstacle.
object β The vector of convex-shaped obstacles to add.
origin β The initial pose of the obstacles in the environment (default is Frame::Identity()).
color β The color of the obstacles in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacles (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const Cylinder &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a cylinder-shaped obstacle with a name to the environment.
- Parameters:
name β The name to assign to the obstacle.
object β The cylinder-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const DepthMap &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a depth map-shaped obstacle with a name to the environment.
- Parameters:
name β The name to assign to the obstacle.
object β The depth map-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
-
std::shared_ptr<Obstacle> add_obstacle(const std::string &name, const Sphere &object, const Frame &origin = Frame::Identity(), const Obstacle::Color &color = "000000", float safety_margin = 0.0)
Add a sphere-shaped obstacle with a name to the environment.
- Parameters:
name β The name to assign to the obstacle.
object β The sphere-shaped obstacle to add.
origin β The initial pose of the obstacle in the environment (default is Frame::Identity()).
color β The color of the obstacle in hexadecimal format (default is β000000β).
safety_margin β The safety margin around the obstacle (default is 0.0).
- Returns:
A shared pointer to the added obstacle.
Removes the given obstacles from the environment and from all collision checking.
- Parameters:
obstacle β The obstacle to remove from the environment.
-
void remove_obstacle(const std::string &name)
Removes all obstacles with the given name from the environment and from all collision checking.
- Parameters:
name β The name of the obstacle to remove from the environment.
Updates the given robot (or the default one if none was given) for the internal collision checking.
- Parameters:
robot β The robot to update the collision model for.
-
void update_fixed_obstacles()
Updates all fixed obstacles for the internal collision checking. This should be called after changing e.g. the position or size of an obstacle.
Updates the depths matrix of a given depth map obstacle for the internal collision checking.
- Parameters:
obstacle β The obstacle to update the depths map for.
Updates the joint position of the given robot for the internal collision checking.
- Parameters:
robot β The robot to update the joint position for.
joint_position β The new joint position to set for the robot.
Check if a joint position is in collision.
- Parameters:
robot β The robot to check the joint position for.
joint_position β The joint position to check for collision.
detail β [out] The collision detail to fill in case of a collision.
- Returns:
True if the joint position is in collision, false otherwise.
Check if a joint position is in collision.
- Parameters:
robot β The robot to check the joint position for.
joint_position β The joint position to check for collision.
- Returns:
True if the joint position is in collision, false otherwise.
-
bool check_collision(const Config &joint_position)
Check if a joint position is in collision.
- Parameters:
joint_position β The joint position to check for collision.
- Returns:
True if the joint position is in collision, false otherwise.
Check if there exists a collision-free inverse kinematics for the Cartesian position.
- Parameters:
robot β The robot to check the Cartesian position for.
waypoint β The Cartesian position to check for collision.
- Returns:
True if there exists a collision-free inverse kinematics for the Cartesian position, false otherwise.
Check if there exists a collision-free inverse kinematics for the given robot and end-effector pose.
- Parameters:
robot β The robot to check for collision-free inverse kinematics.
tcp β The end-effector pose (transformation) to check for collision.
reference_config β Optional reference configuration for inverse kinematics of the end-effector pose.
- Returns:
True if there exists a collision-free inverse kinematics for the given end-effector pose, false otherwise.
-
bool check_collision(const CartesianWaypoint &waypoint)
Check if there exists a collision-free inverse kinematics for the Cartesian position.
- Parameters:
waypoint β The Cartesian position to check for collision.
- Returns:
True if there exists a collision-free inverse kinematics for the Cartesian position, false otherwise.
-
bool check_collision(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Check if there exists a collision-free inverse kinematics for the given end-effector pose.
- Parameters:
tcp β The end-effector pose to check for collision.
reference_config β Optional reference configuration for inverse kinematics of the end-effector pose.
- Returns:
True if there exists a collision-free inverse kinematics for the given end-effector pose, false otherwise.
Calculate a collision free joint position close to the reference position.
- Parameters:
joint_position β The reference joint position to find a collision free joint position close to.
robot β The robot to find a collision free joint position for.
- Returns:
An optional containing the collision free joint position close to the reference position, or std::nullopt if no such joint position exists.
Public Members
-
std::map<std::string, std::shared_ptr<Robot>> robots
All robots used for collision checking with default parameters.
-
std::map<std::string, Point> waypoints
All robots used for collision checking with default parameters.
-
std::vector<std::shared_ptr<Obstacle>> obstacles
All static obstacles in the environment, owning the data.
-
std::map<std::string, std::shared_ptr<Camera>> cameras
All cameras in the environment.
RobotsΒΆ
-
class Robot : public jacobi::Element
The
Robot
class represents a robot arm or a collection of robot arms.The
Robot
class is an abstract class that represents a robot arm or a collection of robot arms. It provides a minimal interface for planning, including methods for forward kinematics and serialization.Subclassed by jacobi::RobotArm, jacobi::robots::DualArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const = 0
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual std::optional<double> get_control_rate() const = 0
Retrieves the control rate of the robot.
- Returns:
An optional double representing the control rate (in Hz) of the robot. If not available, the method will return std::nullopt.
-
virtual size_t get_degrees_of_freedom() const = 0
Retrieves the degrees of freedom of the robot.
- Returns:
The degrees of freedom (DOFs) or number of axes of the robot.
-
virtual Config get_position() const = 0
Retrieves the current position of the robot.
- Returns:
A
Config
object representing the current joint positions of the robot.
-
virtual Config get_min_position() const = 0
Retrieves the minimum position limits of the robot.
- Returns:
A
Config
object representing the minimum joint position limits of the robot.
-
virtual Config get_max_position() const = 0
Retrieves the maximum position limits of the robot.
- Returns:
A
Config
object representing the maximum joint position limits of the robot.
-
virtual Config get_max_velocity() const = 0
Retrieves the maximum velocity limits of the robot.
- Returns:
A
Config
object representing the maximum joint velocity limits of the robot.
-
virtual Config get_max_acceleration() const = 0
Retrieves the maximum acceleration limits of the robot.
- Returns:
A
Config
object representing the maximum joint acceleration limits of the robot.
-
virtual Config get_max_jerk() const = 0
Retrieves the maximum jerk limits of the robot.
- Returns:
A
Config
object representing the maximum joint jerk limits of the robot.
-
virtual void set_base(const Frame &base, const Frame &parent = Frame::Identity())
Sets the origin (base frame) of the robot.
- Parameters:
base β The
Frame
representing the new base or origin of the robot.parent β An optional
Frame
representing the parent frame. Defaults to the identity frame.
-
Frame base() const
The origin of the robotβs base.
- Returns:
A
Frame
representing the current origin of the robot base.
-
virtual void set_speed(double speed) = 0
Sets the velocity, acceleration, and jerk limits to a factor [0, 1] of their respective default (maximum) values.
- Parameters:
speed β A double representing the speed to be set for the robot.
Public Members
-
size_t id = {1024}
ID of the robot obstacles.
-
std::string model
The model name of the robot.
Public Static Functions
-
static std::shared_ptr<Robot> from_model(const std::string &model)
Returns the pre-defined robot with the given model name.
- Parameters:
model β A
std::string
representing the model specification.- Returns:
A
std::shared_ptr<Robot>
pointing to the createdRobot
.
-
virtual std::shared_ptr<Robot> clone() const = 0
-
class RobotArm : public jacobi::Robot, public std::enable_shared_from_this<RobotArm>
Subclassed by jacobi::robots::ABBGoFaCRB1500010, jacobi::robots::ABBIRB1200590, jacobi::robots::ABBIRB1200770, jacobi::robots::ABBIRB130010115, jacobi::robots::ABBIRB1300714, jacobi::robots::ABBIRB1600612, jacobi::robots::ABBIRB260012185, jacobi::robots::ABBIRB460060205, jacobi::robots::ABBIRB6700150320, jacobi::robots::ABBYuMiIRB14000::Arm, jacobi::robots::CustomRobot, jacobi::robots::FanucCRX30iA, jacobi::robots::FanucLR10iA10, jacobi::robots::FanucLRMate200iD7L, jacobi::robots::FanucM20iB25, jacobi::robots::FanucM710iC45M, jacobi::robots::FrankaPanda, jacobi::robots::KinovaGen37DoF, jacobi::robots::KukaIiwa7, jacobi::robots::KukaKR6R700sixx, jacobi::robots::KukaKR70R2100, jacobi::robots::MecademicMeca500, jacobi::robots::UfactoryXArm7, jacobi::robots::UniversalUR10, jacobi::robots::UniversalUR10e, jacobi::robots::UniversalUR20, jacobi::robots::UniversalUR5e, jacobi::robots::YaskawaGP12, jacobi::robots::YaskawaGP180, jacobi::robots::YaskawaGP180120, jacobi::robots::YaskawaGP50, jacobi::robots::YaskawaHC10, jacobi::robots::YaskawaHC20
Public Types
-
enum class InverseKinematicsMethod
The inverse kinematics method to use.
Values:
-
enumerator Analytic
Analytic inverse kinematics.
-
enumerator Numeric
Numeric inverse kinematics.
-
enumerator URAnalytic
Universal Robots Analytic inverse kinematics.
-
enumerator Analytic
-
using Jacobian = Eigen::Matrix<double, 6, Eigen::Dynamic>
The Jacobian matrix type for the robot arm.
Public Functions
-
inline virtual std::optional<double> get_control_rate() const override
Retrieves the control rate of the robot.
- Returns:
An optional double representing the control rate (in Hz) of the robot. If not available, the method will return std::nullopt.
-
inline virtual size_t get_degrees_of_freedom() const override
Retrieves the degrees of freedom of the robot.
- Returns:
The degrees of freedom (DOFs) or number of axes of the robot.
-
inline virtual Config get_position() const override
Retrieves the current position of the robot.
- Returns:
A
Config
object representing the current joint positions of the robot.
-
inline virtual Config get_min_position() const override
Retrieves the minimum position limits of the robot.
- Returns:
A
Config
object representing the minimum joint position limits of the robot.
-
inline virtual Config get_max_position() const override
Retrieves the maximum position limits of the robot.
- Returns:
A
Config
object representing the maximum joint position limits of the robot.
-
inline virtual Config get_max_velocity() const override
Retrieves the maximum velocity limits of the robot.
- Returns:
A
Config
object representing the maximum joint velocity limits of the robot.
-
inline virtual Config get_max_acceleration() const override
Retrieves the maximum acceleration limits of the robot.
- Returns:
A
Config
object representing the maximum joint acceleration limits of the robot.
-
inline virtual Config get_max_jerk() const override
Retrieves the maximum jerk limits of the robot.
- Returns:
A
Config
object representing the maximum joint jerk limits of the robot.
-
inline std::optional<Obstacle> end_effector() const
Get the (optional) end effector attached to the robotβs flange.
- Returns:
An (optional) end effector attached to the robotβs flange.
-
void set_end_effector(const std::optional<Obstacle> &end_effector)
Set the (optional) end effector attached to the robotβs flange.
- Parameters:
item β An (optional) end effector attached to the robotβs flange.
-
inline std::optional<Obstacle> end_effector_obstacle() const
- Deprecated:
Alias for end_effector
-
inline void set_end_effector_obstacle(const std::optional<Obstacle> &end_effector)
- Deprecated:
Alias for set_end_effector
-
inline std::optional<Obstacle> item() const
Get the (optional) obstacle attached to the robotβs TCP.
- Returns:
An (optional) obstacle attached to the robotβs TCP.
-
void set_item(const std::optional<Obstacle> &item)
Set the (optional) obstacle attached to the robotβs TCP.
- Parameters:
item β An (optional) obstacle attached to the robotβs TCP.
-
inline std::optional<Obstacle> item_obstacle() const
- Deprecated:
Alias for item
-
inline void set_item_obstacle(const std::optional<Obstacle> &item)
- Deprecated:
Alias for set_item
-
virtual void set_speed(double speed) override
Sets the velocity, acceleration, and jerk limits to a factor [0, 1] of their respective default (maximum) values.
- Parameters:
speed β A double representing the speed to be set for the robot.
-
virtual void set_base(const Frame &base, const Frame &parent = Frame::Identity()) override
Sets the origin (base frame) of the robot.
- Parameters:
base β The
Frame
representing the new base or origin of the robot.parent β An optional
Frame
representing the parent frame. Defaults to the identity frame.
-
inline Frame flange_to_tcp() const
The transformation from the robotβs flange to the robotβs TCP.
- Returns:
A
Frame
representing the transformation from the robotβs flange to the robotβs TCP.
-
void set_flange_to_tcp(const Frame &flange_to_tcp)
Sets the transformation from the robotβs flange to the robotβs TCP.
- Parameters:
flange_to_tcp β A
Frame
representing the transformation from the robotβs flange to the robotβs TCP.
-
inline Frame world_base() const
Retrieves the frame of the robotβs base.
- Returns:
A
Frame
representing the frame of the robotβs base.
-
inline Frame flange() const
Retrieves the frame of the robotβs flange.
- Returns:
A
Frame
representing the frame of the robotβs flange.
-
inline Frame tcp() const
Retrieves the frame of the robotβs TCP.
- Returns:
A
Frame
representing the frame of the robotβs TCP.
-
inline virtual Frame tcp_position() const
Retrieves the frame of the robotβs TCP.
- Returns:
A
Frame
representing the frame of the robotβs TCP.
-
inline virtual Twist tcp_velocity() const
Retrieves the Cartesian velocity of the robotβs TCP.
- Returns:
A
Twist
representing the Cartesian velocity of the robotβs TCP.
-
inline virtual Twist tcp_acceleration() const
Retrieves the Cartesian acceleration of the robotβs TCP.
- Returns:
A
Twist
representing the Cartesian acceleration of the robotβs TCP.
-
Frame calculate_tcp(const Config &joint_position)
Calculates the forward_kinematics and returns the frame of the robotβs TCP.
- Parameters:
joint_position β The joint position of the robot.
- Returns:
The frame of the robotβs TCP.
-
double calculate_tcp_speed(const Config &joint_position, const Config &joint_velocity)
Calculates the forward_kinematics and returns the norm of the Cartesian velocity of the robotβs TCP.
- Parameters:
joint_position β The joint position of the robot.
joint_velocity β The joint velocity of the robot.
- Returns:
The Cartesian speed of the TCP.
-
virtual Jacobian calculate_jacobian() const = 0
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
Public Members
-
const size_t degrees_of_freedom
The degrees of freedom (or number of axis) of the robot.
-
const size_t number_joints
The number of joints with links in between.
-
const Config default_position
The default robot position - used for initializing the current robot position.
-
Config position
The current (or last) position of the robot used for planning. Mostly relevant for multi-robot planning.
-
std::optional<double> control_rate
The (optional) default control rate. [Hz].
-
std::vector<Obstacle> link_obstacles
The obstacles for each robot link.
-
Config min_position
Minimum position for each joint. [rad].
-
Config max_position
Maximum position for each joint. [rad].
-
Config max_velocity
Maximum absolute velocity for each joint. [rad/s].
-
Config max_acceleration
Maximum absolute acceleration for each joint. [rad/s^2].
-
Config max_jerk
Maximum absolute jerk for each joint. [rad/s^3].
-
enum class InverseKinematicsMethod
-
class DualArm : public jacobi::Robot
Subclassed by jacobi::robots::ABBYuMiIRB14000
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual std::optional<double> get_control_rate() const override
Retrieves the control rate of the robot.
- Returns:
An optional double representing the control rate (in Hz) of the robot. If not available, the method will return std::nullopt.
-
virtual size_t get_degrees_of_freedom() const override
Retrieves the degrees of freedom of the robot.
- Returns:
The degrees of freedom (DOFs) or number of axes of the robot.
-
virtual Config get_position() const override
Retrieves the current position of the robot.
- Returns:
A
Config
object representing the current joint positions of the robot.
-
virtual Config get_min_position() const override
Retrieves the minimum position limits of the robot.
- Returns:
A
Config
object representing the minimum joint position limits of the robot.
-
virtual Config get_max_position() const override
Retrieves the maximum position limits of the robot.
- Returns:
A
Config
object representing the maximum joint position limits of the robot.
-
virtual Config get_max_velocity() const override
Retrieves the maximum velocity limits of the robot.
- Returns:
A
Config
object representing the maximum joint velocity limits of the robot.
-
virtual Config get_max_acceleration() const override
Retrieves the maximum acceleration limits of the robot.
- Returns:
A
Config
object representing the maximum joint acceleration limits of the robot.
-
virtual Config get_max_jerk() const override
Retrieves the maximum jerk limits of the robot.
- Returns:
A
Config
object representing the maximum joint jerk limits of the robot.
-
virtual void set_base(const Frame &base, const Frame &parent = Frame::Identity()) override
Helper methods.
-
virtual void set_speed(double speed) override
Sets the velocity, acceleration, and jerk limits to a factor [0, 1] of their respective default (maximum) values.
- Parameters:
speed β A double representing the speed to be set for the robot.
-
virtual void to_json(nlohmann::json &j) const override
Serialization.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBIRB1200590 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBIRB1300714 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBIRB1600612 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBIRB260012185 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBIRB460060205 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBIRB6700150320 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class ABBYuMiIRB14000 : public jacobi::robots::DualArm
-
class Arm : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class Arm : public jacobi::RobotArm
-
class FanucCRX30iA : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class FanucLR10iA10 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class FanucLRMate200iD7L : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class FanucM20iB25 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class FanucM710iC45M : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class FrankaPanda : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class KinovaGen37DoF : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class KukaIiwa7 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class MecademicMeca500 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class UfactoryXArm7 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class UniversalUR5e : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class UniversalUR10 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class UniversalUR10e : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class UniversalUR20 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class YaskawaGP12 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class YaskawaGP180 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class YaskawaGP180120 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class YaskawaGP50 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class YaskawaHC10 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
-
class YaskawaHC20 : public jacobi::RobotArm
Public Functions
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
virtual std::shared_ptr<Robot> clone() const override
Warning
Custom robots are in a beta preview with rudimentary support right now. If possible, use robots from our supported robot library, as they will be significantly faster to compute and easier to use.
-
class CustomRobot : public jacobi::RobotArm
A custom robot arm that can be loaded from a URDF file.
The
CustomRobot
class extends theRobotArm
class and provides the functionality to load a robotβs configuration from a URDF (Unified Robot Description Format) file. It also includes methods for handling inverse kinematics and filtering relevant configurations.Public Types
-
enum class JointType
Types of joints that can be present in the robot.
Values:
-
enumerator Revolute
A revolute joint that allows rotation.
-
enumerator Continuous
A continuous joint that allows unlimited rotation.
-
enumerator Prismatic
A prismatic joint that allows linear motion.
-
enumerator Fixed
A fixed joint that does not allow any motion.
-
enumerator Revolute
Public Functions
-
explicit CustomRobot(size_t degrees_of_freedom)
Constructs a CustomRobot with a specified degrees of freedom.
- Parameters:
degrees_of_freedom β The degrees of freedom for the robot.
-
explicit CustomRobot(size_t degrees_of_freedom, size_t number_joints)
Constructs a CustomRobot with a specified degrees of freedom and joints.
- Parameters:
degrees_of_freedom β The degrees of freedom for the robot.
number_joints β The number of joints in the robot.
-
virtual std::shared_ptr<Robot> clone() const override
Clones the current robot.
- Returns:
A shared pointer to a new instance of the robot that is a copy of the current one.
-
virtual Jacobian calculate_jacobian() const override
Calculates the Jacobian of the current robotβs kinematics.
- Returns:
The Jacobi matrix representing the derivative of robotβs TCP over the joint space
-
inline virtual size_t get_degrees_of_freedom() const override
Retrieves the degrees of freedom of the robot.
- Returns:
The degrees of freedom (DOFs) or number of axes of the robot.
-
inline virtual Config get_position() const override
Retrieves the current position of the robot.
- Returns:
A
Config
object representing the current joint positions of the robot.
-
inline virtual Config get_min_position() const override
Retrieves the minimum position limits of the robot.
- Returns:
A
Config
object representing the minimum joint position limits of the robot.
-
inline virtual Config get_max_position() const override
Retrieves the maximum position limits of the robot.
- Returns:
A
Config
object representing the maximum joint position limits of the robot.
-
inline virtual Config get_max_velocity() const override
Retrieves the maximum velocity limits of the robot.
- Returns:
A
Config
object representing the maximum joint velocity limits of the robot.
-
inline virtual Config get_max_acceleration() const override
Retrieves the maximum acceleration limits of the robot.
- Returns:
A
Config
object representing the maximum joint acceleration limits of the robot.
-
inline virtual Config get_max_jerk() const override
Retrieves the maximum jerk limits of the robot.
- Returns:
A
Config
object representing the maximum joint jerk limits of the robot.
-
inline virtual Frame tcp_position() const override
Retrieves the frame of the robotβs TCP.
- Returns:
A
Frame
representing the frame of the robotβs TCP.
-
inline virtual Twist tcp_velocity() const override
Retrieves the Cartesian velocity of the robotβs TCP.
- Returns:
A
Twist
representing the Cartesian velocity of the robotβs TCP.
-
inline virtual Twist tcp_acceleration() const override
Retrieves the Cartesian acceleration of the robotβs TCP.
- Returns:
A
Twist
representing the Cartesian acceleration of the robotβs TCP.
-
std::optional<Config> inverse_kinematics(const CartesianWaypoint &waypoint)
Computes the inverse kinematics for a Cartesian waypoint.
- Parameters:
waypoint β The Cartesian waypoint to compute the inverse kinematics for.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const Config &reference_config)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
-
std::optional<Config> inverse_kinematics(const Frame &tcp, const std::optional<Config> &reference_config = std::nullopt)
Computes the inverse kinematics for a Cartesian position and a reference configuration.
Finds a joint position so that the robotβs TCP is at the given frame, which is defined in the world coordinate system. In general, the solution will try to stay close to the reference_config parameter. We use a numerical optimization for robots with more than 6 degrees of freedom. Then, the reference configuration is used as a starting point for the optimization. This method does not take the environmentβs collision model into account.
- Parameters:
tcp β The Cartesian position to compute the inverse kinematics for.
reference_config β The reference configuration to use for the inverse kinematics.
- Returns:
An optional
Config
object representing the joint positions of the robot.
Public Members
-
std::shared_ptr<RobotArm> child
Possible child robot.
-
std::vector<Frame> link_translations
The translations between the links.
-
std::vector<std::array<double, 3>> joint_axes
Axes of the joints in the robot.
-
std::vector<JointType> joint_types
The type of the joints: Currently revolute, continuous, prismatic, and fixed joints are supported.
-
std::vector<std::string> joint_names
Names of the joints in the robot.
-
std::vector<std::string> config_joint_names
Names of the joints corresponding to a specific joint configuration.
Public Static Functions
-
static std::shared_ptr<CustomRobot> load_from_urdf_file(const std::filesystem::path &file, const std::string &base_link = "base_link", const std::string &end_link = "flange")
Load the robot from a URDF file.
Loads a custom robot from a *.urdf file, and sets the robot arm to the kinematic chain between the given base_link and the end_link.
- Parameters:
file β The path to the URDF file.
base_link β The name of the base link in the URDF.
end_link β The name of the end link in the URDF.
- Returns:
A shared pointer to the loaded robot.
-
enum class JointType
MotionsΒΆ
-
struct LinearSection
Represents a linear Cartesian section for either the approach to the goal or the retraction from the start.
Public Types
-
enum class Approximation
Whether to approximate the Cartesian linear motion in joint space for singularity-free calculation.
Values:
-
enumerator Never
-
enumerator Always
-
enumerator Never
Public Members
-
Frame offset
Relative linear cartesian offset from the reference pose.
-
double speed = {1.0}
Speed of the sub-motion, relative to the overall motionβs speed.
-
bool smooth_transition = {true}
Whether to use a smooth transition between this and the next or previous section. If false, the robot will come to a complete stop at the transition point.
-
enum class Approximation
-
class Motion
Represents a request for a collision-free point-to-point motion.
The Motion class provides an interface for general point-to-point motion planning with arbitrary waypoints, linear approach and retraction, and task constraints. It includes parameters for the motion name, robot, start and goal points, and additional settings for motion planning, such as collision checking and soft failure handling.
Public Functions
-
inline explicit Motion(const Point &start, const Point &goal)
Construct a Motion with a given start and goal point.
- Parameters:
start β The start point of the motion.
goal β The goal point of the motion.
Construct a Motion with a name, start and goal point.
- Parameters:
name β The unique name of the motion.
start β The start point of the motion.
goal β The goal point of the motion.
-
inline explicit Motion(const std::string &name, const Point &start, const Point &goal)
Construct a Motion with a name, start and goal point.
- Parameters:
name β The unique name of the motion.
start β The start point of the motion.
goal β The goal point of the motion.
Construct a Motion with a name, robot, start and goal point.
- Parameters:
name β The unique name of the motion.
robot β The robot for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
-
inline explicit Motion()
Default constructor.
-
inline std::shared_ptr<RobotArm> robot_arm() const
The robot arm associated with the motion.
Check if the motion start and goal points are within the provided start and goal points.
- Parameters:
start_test β The start point to compare against.
goal_test β The goal point to compare against.
- Returns:
true If the motion start and goal points are within the provided start and goal points.
- Returns:
false If the motion start and goal points are not within the provided start and goal points.
Public Members
-
std::string name
The unique name of the motion.
-
Point start
Start point of the motion.
-
Point goal
Goal point of the motion.
-
std::shared_ptr<Robot> robot
The robot for the motion (e.g. defines the kinematics and the joint limits).
-
bool ignore_collisions = {false}
Whether to ignore collisions.
-
std::vector<ExactPoint> waypoints
Intermediate waypoints that the motion passes through exactly. The list of waypoints is limited to less than four, otherwise please take a look at LowLevelMotion.
-
std::optional<LinearSection> linear_retraction
Optional relative linear cartesian motion for retracting from the start pose.
-
std::optional<LinearSection> linear_approach
Optional relative linear cartesian motion for approaching the goal pose.
-
double path_length_loss_weight = {0.1}
Weight of the loss minimizing the path length of the trajectory.
-
double orientation_loss_weight = {0.0}
Weight of the loss minimizing the maximizing deviation of the end-effector orientation to the target value.
-
std::array<double, 3> orientation_target = {{0.0, 0.0, 1.0}}
Target vector pointing in the direction of the end-effector (TCP) orientation in the global coordinate system.
-
std::optional<double> cartesian_tcp_speed_cutoff
Optional Cartesian TCP speed (translation-only) cutoff. This is a post-processing step.
-
std::optional<std::vector<ExactPoint>> initial_waypoints
Optional initial waypoints to start the optimization with (donβt use with intermediate waypoints).
-
inline explicit Motion(const Point &start, const Point &goal)
-
class LinearMotion
Represents a request for a linear Cartesian-space motion.
The LinearMotion struct represents a request for a linear motion in Cartesian space. It consists of a start and goal point, as well as a robot to perform the motion. It provides an interface for planning singularity-free linear motion in Cartesian space between any two waypoints.
Public Functions
-
inline explicit LinearMotion(const ExactPoint &start, const ExactPoint &goal)
Construct a linear motion with a given start, and goal.
- Parameters:
start β The start point of the motion.
goal β The goal point of the motion.
Construct a linear motion with a given robot, start, and goal.
- Parameters:
robot β The robot for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
-
inline explicit LinearMotion(const std::string &name, const ExactPoint &start, const ExactPoint &goal)
Construct a linear motion with a given name, start, and goal.
- Parameters:
name β The unique name of the motion.
start β The start point of the motion.
goal β The goal point of the motion.
Construct a linear motion with a given name, robot, start, and goal.
- Parameters:
name β The unique name of the motion.
robot β The robot for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
-
inline explicit LinearMotion()
Default constructor.
-
inline std::shared_ptr<RobotArm> robot_arm() const
The robot arm for the motion.
Public Members
-
std::string name
The unique name of the motion.
-
ExactPoint start
Start point of the motion.
-
ExactPoint goal
Goal point of the motion.
-
std::shared_ptr<Robot> robot
The robot for the motion (e.g. defines the kinematics and the joint limits).
-
bool ignore_collisions = {true}
Whether to ignore collisions.
-
inline explicit LinearMotion(const ExactPoint &start, const ExactPoint &goal)
-
class LowLevelMotion
Represents a request for a low-level motion.
The LinearMotion class provides an interface for very efficient planning of motion between joint-space waypoints. While low level motions are not checked for collisions, they are much faster to compute and allow for more flexible constraints such as a minimum duration parameter. This motion type is suitable for visual servoing task or other real-time control.
Public Types
-
enum ControlInterface
The control interface for the motion, specifying either position or velocity control.
Values:
-
enumerator Position
Position-control: Full control over the entire kinematic state (Default)
-
enumerator Velocity
Velocity-control: Ignores the current position, target position, and velocity limits.
-
enumerator Position
-
enum Synchronization
The synchronization strategy for the motion, specifying either phase, time, time if necessary, or no synchronization.
Values:
-
enumerator Phase
Phase synchronize the DoFs when possible, else fallback to βTimeβ strategy (Default)
-
enumerator Time
Always synchronize the DoFs to reach the target at the same time.
-
enumerator TimeIfNecessary
Synchronize only when necessary (e.g. for non-zero target velocity or acceleration)
-
enumerator None
Calculate every DoF independently.
-
enumerator Phase
-
enum DurationDiscretization
The duration discretization strategy for the motion, specifying either continuous or discrete durations.
Values:
-
enumerator Continuous
Every trajectory synchronization duration is allowed (Default)
-
enumerator Discrete
The trajectory synchronization duration must be a multiple of the control cycle.
-
enumerator Continuous
Public Functions
Construct a low-level motion with a given robot.
- Parameters:
robot β The robot for the motion.
-
inline explicit LowLevelMotion(const std::string &name)
Construct a low-level motion with a given name.
- Parameters:
name β The unique name of the motion.
Construct a low-level motion with a given name, robot, start, and goal.
- Parameters:
name β The unique name of the motion.
robot β The robot for the motion.
-
inline explicit LowLevelMotion()
Default constructor.
-
inline std::shared_ptr<RobotArm> robot_arm() const
The robot arm for the motion.
Public Members
-
std::string name
The unique name of the motion.
-
std::shared_ptr<Robot> robot
The robot for the motion (e.g. defines the kinematics and the joint limits).
-
Waypoint start
Start waypoint of the motion.
-
Waypoint goal
Goal waypoint of the motion.
-
std::vector<Config> intermediate_positions
List of intermediate positions.
For a small number of waypoints (less than 16), the trajectory goes exactly through the intermediate waypoints. For a larger number of waypoints, first a filtering algorithm is used to keep the resulting trajectory close to the original waypoints.
-
std::optional<double> minimum_duration
A minimum duration of the motion.
-
ControlInterface control_interface = {ControlInterface::Position}
The control interface for the motion.
-
Synchronization synchronization = {Synchronization::Phase}
The synchronization strategy for the motion.
-
DurationDiscretization duration_discretization = {DurationDiscretization::Continuous}
The duration discretization strategy for the motion.
-
enum ControlInterface
-
class LinearPath : public jacobi::PathSegment
Public Functions
-
LinearPath(const Frame &start, const Frame &goal)
Construct a LinearPath with a given start and goal pose.
- Parameters:
start β The starting pose of the linear path.
goal β The ending pose of the linear path.
-
LinearPath() = default
Default constructor.
-
virtual Frame position(double s) const override
Calculate the position at the path parameter s.
- Parameters:
s β The path parameter (0.0 to length).
-
LinearPath(const Frame &start, const Frame &goal)
-
class CircularPath : public jacobi::PathSegment
Public Functions
-
CircularPath(const Frame &start, const double theta, const std::array<double, 3> ¢er, const std::array<double, 3> &normal, bool keep_tool_to_surface_orientation = true)
Construct a CircularPath with a given start pose, rotation angle, circle center, and normal.
- Parameters:
start β The starting pose of the circular path.
theta β The rotation angle of the circular path in radians.
center β The center of the circle as an array of doubles.
normal β The normal vector of the plane containing the circle.
keep_tool_to_surface_orientation β Whether to maintain tool-to-surface orientation.
-
CircularPath(const Frame &start, const Frame &goal, const std::array<double, 3> ¢er, bool keep_tool_to_surface_orientation = true)
Construct a CircularPath with a given start pose, goal pose, and circle center. The rotation angle is inferred from the goal pose.
- Parameters:
start β The starting pose of the circular path.
goal β The goal pose of the circular path (used to infer theta).
center β The center of the circle as an array of doubles.
keep_tool_to_surface_orientation β Whether to maintain tool-to-surface orientation.
-
CircularPath() = default
Default constructor.
-
virtual Frame position(double s) const override
Calculate the position at the path parameter s.
- Parameters:
s β The path parameter (0.0 to length).
Public Members
-
Frame start
The start pose of the circular path.
-
double theta
The rotation angle of the circular path [rad].
-
std::array<double, 3> center
The center of the circle.
-
std::array<double, 3> normal
The normal of the plane in which to create a circular path.
-
bool keep_tool_to_surface_orientation
Whether to maintain the tool-to-surface orientation.
-
CircularPath(const Frame &start, const double theta, const std::array<double, 3> ¢er, const std::array<double, 3> &normal, bool keep_tool_to_surface_orientation = true)
Warning
doxygenclass: Cannot find class βjacobi::BlendedPathβ in doxygen xml output for project βjacobi_motion_libraryβ from directory: ../doxygen_xml/motion/latest
Warning
doxygenclass: Cannot find class βjacobi::ArbitraryPathβ in doxygen xml output for project βjacobi_motion_libraryβ from directory: ../doxygen_xml/motion/latest
-
class PathFollowingMotion
Represents a request for a Cartesian-space motion to be followed by the end-effector.
The PathFollowingMotion class provides an interface for Cartesian-space paths to be accurately followed by the robot end-effector with a constant velocity. There are currently three different path types that are supported: linear, circular and blended. The path-following motion is suitable for use cases such as welding, painting, dispensing and deburring, where constant end-effector velocity is required for successful task execution. It includes parameters for the motion name, robot, path type, velocity, and additional settings for motion planning, such as collision checking and soft failure handling.
Public Functions
-
inline explicit PathFollowingMotion(const Path &path, const double velocity = 50.0)
Construct a PathFollowingMotion with a given path type and optional velocity.
- Parameters:
path β The Cartesian path type to follow.
velocity β The desired velocity of the end-effector [m/s]. If not provided, the robot will move as fast as possible while respecting velocity limits.
-
inline explicit PathFollowingMotion(const std::string &name, const Path &path, const double velocity = 50.0)
Construct a PathFollowingMotion with a name, path type, and optional velocity.
- Parameters:
name β The unique name of the motion.
path β The Cartesian path type to follow.
velocity β The desired velocity of the end-effector [m/s]. If not provided, the robot will move as fast as possible while respecting velocity limits.
Construct a PathFollowingMotion with a robot, path type, and optional velocity.
- Parameters:
robot β The robot for the motion.
path β The Cartesian path type to follow.
velocity β The desired velocity of the end-effector [m/s]. If not provided, the robot will move as fast as possible while respecting velocity limits.
Construct a PathFollowingMotion with a name, robot, path type, and optional velocity.
- Parameters:
name β The unique name of the motion.
robot β The robot for the motion.
path_type β The Cartesian path type to follow.
velocity β The desired velocity of the end-effector [m/s]. If not provided, the robot will move as fast as possible while respecting velocity limits.
-
inline PathFollowingMotion()
Default constructor.
Public Members
-
std::string name
The unique name of the motion.
-
std::shared_ptr<Robot> robot
The robot for the motion (e.g. defines the kinematics and the joint limits).
-
Path path
The Cartesian path to follow.
-
double velocity = {50.0}
The desired velocity of the end-effector [m/s].
-
bool soft_failure = {true}
If true, the planner will adjust path velocity until a solution until velocity limits are satisfied.
-
bool check_collision = {true}
If true, the planner will check for collisions during the motion.
-
std::optional<Config> reference_config
Optional reference configuration for the start state of the motion.
-
double feasible_velocity = {50.0}
The feasible velocity of the end-effector achieved after planning [m/s] (only used if soft_failure is true).
-
inline explicit PathFollowingMotion(const Path &path, const double velocity = 50.0)
-
class BimanualMotion
Represents a request for a collision-free point-to-point bimanual motion for dual-arm robots.
The BimanualMotion class provides an interface for general point-to-point motion planning for dual-arm robots with arbitrary waypoints, linear approach and retraction, and task constraints. It includes parameters for the motion name, robot, start and goal points, and additional settings for motion planning, such as intermediate waypoints, setting if the bimanual motion should be coordinated, and soft failure handling.
Public Functions
Construct a BimanualMotion with left and right robot arms, start and goal point.
- Parameters:
arm_left β The left robot arm for the motion.
arm_right β The right robot arm for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
Construct a BimanualMotion with a name, left and right robot arms, start and goal point.
- Parameters:
name β The unique name of the motion.
arm_left β The left robot arm for the motion.
arm_right β The right robot arm for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
Construct a BimanualMotion with a robot, start and goal point.
- Parameters:
robot β The dual-arm robot for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
Construct a BimanualMotion with a name, robot, start and goal point.
- Parameters:
name β The unique name of the motion.
robot β The dual-arm robot for the motion.
start β The start point of the motion.
goal β The goal point of the motion.
-
inline explicit BimanualMotion()
Default constructor.
Public Members
-
std::string name
The unique name of the bimanual motion.
-
std::shared_ptr<DualArm> robot
The dual-arm robot for the bimanual motion (e.g. defines the kinematics and the joint limits).
-
MultiRobotPoint start
Start point of the motion for both arms.
-
MultiRobotPoint goal
Goal point of the motion for both arms.
-
bool is_coordinated = {false}
Flag to indicate if the motion is coordinated, in which case the follower arm moves with a constant offset to the leader arm.
-
std::shared_ptr<RobotArm> leader_arm
The leader arm for the coordinated motion. Left arm is used by default if this variable is not set.
-
std::vector<MultiRobotPoint> waypoints
Intermediate waypoints for both arms that the motion passes through exactly. The list of waypoints is limited to less than four.
-
std::optional<MultiRobotLinearSection> linear_retraction
Optional relative linear cartesian motion for retracting from the start pose, specified for one or both arms.
-
std::optional<MultiRobotLinearSection> linear_approach
Optional relative linear cartesian motion for approaching the goal pose, specified for one or both arms.
Motion PlanningΒΆ
-
class Trajectory
A robotβs trajectory as a list of positions, velocities and accelerations at specific times.
The Trajectory class represents a sequence of kinematic states of a robot over a specified duration. It maintains lists of positions, velocities, and accelerations at particular time stamps.
Public Functions
-
inline explicit Trajectory(size_t dofs)
Create an empty trajectory with the given degrees of freedom.
- Parameters:
dofs β The degrees of freedom of the joint space.
-
inline explicit Trajectory()
Default constructor.
-
inline size_t size() const
The number of time steps within the trajectory.
- Returns:
The number of time steps within the trajectory.
-
State front() const
Access the first state at t=0 of the trajectory.
- Returns:
The first state at t=0 of the trajectory.
-
State back() const
Access the last state at t=duration of the trajectory.
- Returns:
The last state at t=duration of the trajectory.
-
void at_time(double time, Config &new_position) const
Get the joint position at a given time. Make sure that the output arguments have enough memory.
- Parameters:
time β The time at which to get the kinematic state.
new_position β [out] The joint position at the given time.
-
void at_time(double time, Config &new_position, Config &new_velocity, Config &new_acceleration) const
Get the kinematic state at a given time. Make sure that the output arguments have enough memory.
- Parameters:
time β The time at which to get the kinematic state.
new_position β [out] The joint position at the given time.
new_velocity β [out] The joint velocity at the given time.
new_acceleration β [out] The joint acceleration at the given time.
-
Config get_min_position() const
Get the minimum position along the trajectory for each degree of freedom individually.
- Returns:
Config The minimum position value for each degree of freedom across the trajectory.
-
Config get_max_position() const
Get the maximum position along the trajectory for each degree of freedom individually.
- Returns:
Config The maximum position value for each degree of freedom across the trajectory.
-
Config get_min_velocity() const
Get the minimum velocity along the trajectory for each degree of freedom individually.
- Returns:
Config The minimum velocity value for each degree of freedom across the trajectory.
-
Config get_max_velocity() const
Get the maximum velocity along the trajectory for each degree of freedom individually.
- Returns:
Config The maximum velocity value for each degree of freedom across the trajectory.
-
Config get_min_acceleration() const
Get the minimum acceleration along the trajectory for each degree of freedom individually.
- Returns:
Config The minimum acceleration value for each degree of freedom across the trajectory.
-
Config get_max_acceleration() const
Get the maximum acceleration along the trajectory for each degree of freedom individually.
- Returns:
Config The maximum acceleration value for each degree of freedom across the trajectory.
-
size_t get_step_closest_to(const Config &position) const
Get step at which the trajectory is closest (in terms of the L2 norm in joint space) to the reference position.
- Returns:
size_t The step index of the closest position.
-
void update_first_position(const Config &joint_position)
Update the first position of the trajectory.
- Parameters:
joint_position β The new position to set at the start of the trajectory.
-
Trajectory reverse() const
Reverse the trajectoryβs start and goal.
- Returns:
Trajectory A new trajectory with the start and end points reversed.
-
void append(const Trajectory &other)
Append another trajectory to the current one.
- Parameters:
other β The trajectory to append.
-
Trajectory &operator+=(const Trajectory &other)
Append another trajectory to the current one using the += operator.
- Parameters:
other β The trajectory to append.
- Returns:
Trajectory& Reference to the updated trajectory.
-
Trajectory slice(size_t start, size_t steps) const
Slice a trajectory starting from step start for a length of steps.
- Parameters:
start β The starting index of the slice.
steps β The number of steps to include in the slice.
- Returns:
Trajectory A new trajectory containing the specified slice of the original.
-
Trajectory scale(const double speed, const bool keep_delta_time = true) const
Temporally scale the trajectory by a given speed factor.
- Parameters:
speed β Factor to scale the trajectory speed (greater than 1 speeds up, less than 1 slows down).
keep_delta_time β If true (default), maintains the original time intervals between trajectory points.
- Returns:
Trajectory A new scaled Trajectory object.
-
std::vector<Config> filter_path(const Config &max_distance) const
Filter a path of sparse waypoints from the trajectory.
The path has a maximum distance per degree of freedom between the linear interpolation of the sparse waypoints and the original trajectory.
- Parameters:
max_distance β The maximum allowable distance between joint positions.
- Returns:
std::vector<Config> A list of sparse waypoints filtered from the trajectory.
-
std::string to_json() const
Serializes a trajectory to a json string.
-
void to_json_file(const std::filesystem::path &file) const
Saves a trajectory to a *.json file.
- Parameters:
file β The path to the *.json file.
-
std::string as_table() const
To pretty print the trajectory as a table of positions.
Public Members
-
std::string id
Field for identifying trajectories (for the user)
-
std::string motion
Name of the motion this trajectory was planned for.
-
size_t degrees_of_freedom
The degrees of freedom (e.g. axis) of the trajectory.
-
double duration = {0.0}
The total duration in [s].
-
std::vector<double> times
The exact time stamps for the position, velocity, and acceleration values. The times will usually be sampled at the delta_time distance of the Planner class, but might deviate at the final step.
-
std::vector<Config> positions
The joint positions along the trajectory.
-
std::vector<Config> velocities
The joint velocities along the trajectory.
-
std::vector<Config> accelerations
The joint accelerations along the trajectory.
Public Static Functions
-
static Trajectory from_json(const std::string &json)
Loads a trajectory from a json string.
-
static Trajectory from_json_file(const std::filesystem::path &file)
Loads a trajectory from a *.json file.
- Parameters:
file β The path to the *.json file.
- Returns:
Trajectory The loaded trajectory.
-
inline explicit Trajectory(size_t dofs)
Warning
doxygenclass: Cannot find class βjacobi::DynamicRobotTrajectoryβ in doxygen xml output for project βjacobi_motion_libraryβ from directory: ../doxygen_xml/motion/latest
-
class Planner
Planning motions for robots.
The Planner class is is the core of the Jacobi Motion library. It is responsible for computing robot trajectories within a given environment. It provides various parameters for configuring the planning process, including resolution, optimization settings, and compute budgets. The class also supports loading and managing motion plans.
Public Functions
Create a planner with an environment and a specific delta time parameter.
- Parameters:
environment β The environment to plan the robot motions in.
delta_time β The time step for sampling the trajectories in [s].
Create a planner with the robot inside an empty environment and a specific delta time parameter.
- Parameters:
robot β The robot to plan the motions for.
delta_time β The time step for sampling the trajectories in [s].
Create a planner with an environment.
- Parameters:
environment β The environment to plan the robot motions in.
Create a planner with the robot inside an empty environment.
- Parameters:
robot β The robot to plan the motions for.
-
void set_seed(std::optional<unsigned int> seed)
Set the seed of the plannerβs random number generator.
- Parameters:
seed β The seed to set. If no seed is provided, the generator will be seeded with a random value.
-
void add_motion(const AnyMotion &motion)
Add (or update when name already exists) a motion to the planner.
- Parameters:
motion β The motion to add, can be of any type.
-
AnyMotion get_motion(const std::string &name) const
Get a motion by its name.
- Parameters:
name β The name of the motion to retrieve.
- Returns:
The AnyMotion object associated with the given name.
-
void load_motion_plan(const std::filesystem::path &file)
Load a *.jacobi-plan motion plan for accelerating the planning calculation.
- Parameters:
file β The path to the *.jacobi-plan file to load.
Transfers a trajectory from one robot to another.
Calculate a trajectory for another robot that follows the TCP of the original robot given the trajectory. This method does not check for constraints of the new robot.
- Parameters:
trajectory β The trajectory to follow.
robot_from β The original robot to transfer from.
robot_to β The new robot to transfer to.
offset β Optional offset between the from and to robotβs TCP.
- Returns:
The transferred trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const Config &start, const Config &goal)
Plans a time-optimized, collision-free, and jerk-limited motion from start configuration to goal configuration.
- Parameters:
start β The start configuration of the motion.
goal β The goal configuration of the motion.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const Point &start, const Point &goal)
Plans a time-optimized, collision-free, and jerk-limited motion from start to goal.
- Parameters:
start β The start point of the motion.
goal β The goal point of the motion.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const std::string &name, const std::optional<ExactPoint> &start = std::nullopt, const std::optional<ExactPoint> &goal = std::nullopt)
Plans a time-optimized, collision-free, and jerk-limited motion given the motion name. In case the motion was specified by a start or goal region, the respective exact start or goal positions needs to be passed.
- Parameters:
name β The name of the motion to plan.
start β The exact start position of the motion.
goal β The exact goal position of the motion.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const Motion &motion, const std::optional<ExactPoint> &start = std::nullopt, const std::optional<ExactPoint> &goal = std::nullopt)
Plans a collision-free point-to-point motion.
- Parameters:
motion β The motion to plan.
start β The exact start position of the motion.
goal β The exact goal position of the motion.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const LinearMotion &motion)
Plans a linear motion.
- Parameters:
motion β The linear motion to plan.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const LowLevelMotion &motion)
Plans a low-level motion.
- Parameters:
motion β The low-level motion to plan.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const PathFollowingMotion &motion)
Plans a path-following motion.
- Parameters:
motion β The path-following motion to plan.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<Trajectory, PlanningError> plan(const BimanualMotion &motion)
Plans a bimanual motion.
- Parameters:
motion β The bimanual motion to plan.
- Returns:
The computed trajectory or std::nullopt if the planning failed.
-
expected<std::vector<Trajectory>, PlanningError> plan(const std::vector<AnyMotion> &motions)
Plans a feasible sequence of motions.
- Parameters:
motions β The sequence of motions to plan.
- Returns:
The computed sequence of trajectories or std::nullopt if the planning failed.
Public Members
-
std::shared_ptr<Environment> environment
The current environment to plan robot motions in.
-
double delta_time
The time step for sampling the trajectories in [s]. Usually, this should correspond to the control rate of the robot.
-
double last_calculation_duration = {0.0}
The calculation duration of the last full trajectory computation.
-
double pre_eps_steering = {1000.0}
Steering epsilon in the pre-planning stage [rad].
-
double pre_eps_collision = {3.33}
Resolution of the collision checking in the pre-planning stage [rad].
-
double pre_max_steps = {16 * 1024}
Maximum number of steps in the pre-planning stage before a solution is not found.
-
size_t pre_optimization_steps = {512}
Number of samples for optimization after finding a solution in the pre-plannning stage.
-
double initial_perturbation_scale = {0.04}
Initial perturbation for the trajectory optimization.
-
size_t perturbation_change_steps = {256}
Steps without improvement after which the perturbation scale is adapted.
-
double perturbation_scale_change = {1e-2}
Change of the perturbation if no improvement could be found recently.
-
size_t max_optimization_steps = {5 * 1024}
Maximum number of optimization steps.
-
size_t max_break_steps = {1024}
Max number of steps without improvement before early stopping.
-
double meaningful_loss_improvement = {1e-2}
A meaningful relative improvement to avoid stopping.
-
std::optional<float> min_calculation_duration
The minimum compute budget (that the planner can use regardless)
-
std::optional<float> max_calculation_duration
The maximum compute budget (that wonβt be exceeded)
-
std::vector<DynamicRobotTrajectory> dynamic_robot_trajectories
Pairs of robot-trajectories that are used for dynamic collision checking (e.g. of moving robots)
Public Static Functions
-
static std::shared_ptr<Planner> load_from_project_file(const std::filesystem::path &file)
Loads a planner from a project file.
- Parameters:
file β The path to the project file.
- Returns:
A shared pointer to the loaded Planner object.
-
static std::shared_ptr<Planner> load_from_studio(const std::string &name)
Loads a planner from a Studio project. Make sure to have the access token set as an environment variable.
- Parameters:
name β The name of the Studio project.
- Returns:
A shared pointer to the loaded Planner object.
Studio LiveΒΆ
-
class Studio
Helper class to connect and visualize trajectories and events in Jacobi Studio.
The
Studio
class provides functionality to connect to Jacobi Studio via a WebSocket, and to visualize trajectories and events. It manages the connection, handles incoming and outgoing messages, and allows the user to create and execute actions within Jacobi Studio.Public Functions
-
explicit Studio(bool auto_sync = false, bool auto_connect = true, double timeout = 5.0)
Interface Jacobi Studio via code. Connects to Jacobi Studio automatically - please make sure to enable the Studio Live feature in the Jacobi Studio settings.
- Parameters:
auto_sync β Whether to sync changes of the environment to Studio Live automatically. Only a subset of commands are supported right now, including: Environment::add_obstacle, Environment::remove_obstacle, Environment::update_joint_position, RobotArm::set_end_effector, RobotArm::set_item
auto_connect β Whether to connect to Studio Live automatically.
timeout β The timeout for connecting to Studio Live.
-
inline void register_message_callback(const MessageCallback &callback)
Setup a callback for incoming message.
-
bool reconnect(double timeout = 5.0)
Reconnect to Studio Live.
- Parameters:
timeout β The timeout for reconnecting to Studio Live.
- Returns:
Whether the reconnection was successful.
-
bool is_connected() const
Whether the library is connected to Studio Live.
- Returns:
Whether the library is connected to Studio Live.
-
bool run_action(const Action &action) const
Run the given action in Jacobi Studio.
- Parameters:
action β The action to be run.
- Returns:
Was the action successfully sent to Studio?
-
nlohmann::json get_from_action(const Action &action, const std::string &response_key)
Get an answer from Jacobi Studio.
- Parameters:
action β The action to receive an answer for.
Runs a trajectory for the given robot (or the last active robot) in Jacobi Studio, alongside the events at the specified timings. Optionally, the visualization can be looped.
- Parameters:
trajectory β The trajectory to be run.
events β The events to be run at the specified timings.
loop_forever β Whether to loop the visualization forever.
robot β Optional robot to run the trajectory for.
Runs multiple trajectories for different robots in parallel, alongside the events at the specified timings. Optionally, the visualization can be looped.
- Parameters:
trajectories β Pairs of trajectories per robot to be run.
events β The events to be run at the specified timings.
loop_forever β Whether to loop the visualization forever.
-
bool run_events(const Events &events) const
Run the events at the specified timings in Jacobi Studio.
- Parameters:
events β The events to be run at the specified timings.
Sets the joint position of the given robot, or the last active robot instead.
- Parameters:
joint_position β The desired joint position.
robot β Optional robot to set the joint position for.
Sets the end-effector of the given robot, or the last active robot instead.
- Parameters:
obstacle β Optional obstacle to be set.
robot β Optional robot associated with the obstacle.
Sets the item obstacle of the given robot, or the last active robot instead.
- Parameters:
obstacle β Optional obstacle to be set.
robot β Optional robot associated with the obstacle.
Sets the material of the given robot, or the last active robot instead.
- Parameters:
material β The material to be set.
robot β Optional robot associated with the material.
Adds the given robot to the environment.
- Parameters:
robot β The robot to be added.
Adds a visualization of a path for the given robot.
- Parameters:
points β The points defining the path.
robot β Optional robot associated with the path.
name β Optional name for the path.
color β Optional color for the path visualization.
stroke β Optional stroke width for the path visualization.
arrow_size β Optional size of arrow for end of path
Removes a named visualization of a path for the given robot.
- Parameters:
robot β The robot associated with the path.
name β The name of the path to be removed.
-
inline bool add_obstacle(const Obstacle &obstacle) const
Adds the given obstacle to the environment.
- Parameters:
obstacle β The obstacle to be added.
-
inline bool add_waypoint(const Point &point) const
Adds the given Cartesian waypoint to the environment.
- Parameters:
point β The Cartesian waypoint to be added.
-
inline bool update_obstacle(const Obstacle &obstacle) const
Updates the obstacle with the same name.
- Parameters:
obstacle β The obstacle to be updated.
-
inline bool remove_obstacle(const Obstacle &obstacle) const
Removes the given obstacle (by name) from the environment.
- Parameters:
obstacle β The obstacle to be removed.
Sets an I/O signal of the given robot, or the last active robot instead.
- Parameters:
name β The name of the I/O signal.
value β The value to be set for the I/O signal.
robot β Optional robot associated with the I/O signal.
Sets an image for a camera encoded as a string.
- Parameters:
image β The encoded image to be set.
camera β Optional camera associated with the image.
Sets the depth map visualization of a camera.
- Parameters:
depths β The depth map data.
x β Size of the depth map along the x-axis.
y β Size of the depth map along the y-axis.
camera β Optional camera associated with the depth map.
Sets the point cloud visualization of a camera.
- Parameters:
points β The point cloud data.
camera β Optional camera associated with the point cloud.
Adds a camera in Jacobi Studio.
- Parameters:
camera β The camera to be added.
Updates the camera with the same name in Jacobi Studio.
- Parameters:
camera β The camera to be updated.
Removes a camera in Jacobi Studio.
- Parameters:
camera β The camera to be removed.
-
inline bool reset() const
Resets the environment to the state before a trajectory or events were run. In particular, it removes all obstacles there were added dynamically.
Get the joint position of a robot.
- Parameters:
robot β Optional robot to get the joint position for.
- Returns:
The joint position of the robot.
Get an image from a camera encoded as a string.
- Parameters:
stream β The type of camera stream to get.
camera β Optional camera to get the image from.
- Returns:
The encoded image from the camera.
Public Members
-
std::string host = {"localhost"}
Host of the websocket connection.
-
int port = {8768}
Port of the websocket connection.
-
double speedup = {1.0}
A factor to speed up or slow down running trajectories or events.
-
bool auto_sync
Whether to sync changes of the environment to Studio Live automatically.
Currently limited to setting end effector and item obstacles.
-
class Action
An action that can be performed in Jacobi Studio.
The
Action
class represents an action in Jacobi Studio, such as setting a robotβs joint position, adding an obstacle, or manipulating the environment. An action can contain multiple commands, allowing for complex interactions in Studio.
-
struct Events : public std::multimap<double, Action>
A container that maps a specific timing to one or multiple actions. The static methods of this class do not change the visualization in Jacobi Studio immediately, but only return an action that can be executed later (e.g. alongside a trajectory).
The
Events
struct allows for scheduling actions in Jacobi Studio at specific times. Static methods are provided to create various actions, which can be executed later.Public Static Functions
Returns an action that sets the joint position of the given robot, or the last active robot instead.
- Parameters:
joint_position β The desired joint position.
robot β Optional robot to set the joint position for.
- Returns:
The action to set the joint position.
Returns an action that sets the end-effector obstacle of the given robot, or the last active robot instead.
- Parameters:
obstacle β Optional obstacle to be set.
robot β Optional robot associated with the obstacle.
- Returns:
The action to set the item obstacle.
Returns an action that sets the item obstacle of the given robot, or the last active robot instead.
- Parameters:
obstacle β Optional obstacle to be set.
robot β Optional robot associated with the obstacle.
- Returns:
The action to set the item obstacle.
Returns an action that sets the material of the given robot, or the last active robot instead.
- Parameters:
material β The material to be set.
robot β Optional robot associated with the material.
- Returns:
The action to set the material.
Returns an action that adds the given robot to the environment.
- Parameters:
robot β The robot to be added.
- Returns:
The action to add the robot.
Returns an action that adds a visualization of a path for the given robot.
- Parameters:
points β The points defining the path.
robot β Optional robot associated with the path.
name β Optional name for the path.
color β Optional color for the path visualization.
stroke β Optional stroke width for the path visualization.
arrow_size β Optional size of arrow for end of path
- Returns:
The action to add the robot path visualization.
Returns an action that removes a visualization of a named path for the given robot.
- Parameters:
robot β The robot associated with the path.
name β The name of the path to be removed.
- Returns:
The action to remove the robot path visualization.
-
static inline Action add_obstacle(const Obstacle &obstacle)
Returns an action that adds the given obstacle to the environment.
- Parameters:
obstacle β The obstacle to be added.
- Returns:
The action to add the obstacle.
-
static inline Action add_waypoint(const Point &point)
Returns an action that adds the given Cartesian waypoint to the environment.
- Parameters:
point β The Cartesian waypoint to be added.
- Returns:
The action to add the Cartesian waypoint.
-
static inline Action update_obstacle(const Obstacle &obstacle)
Returns an action that updates the obstacle with the same name.
- Parameters:
obstacle β The obstacle to be updated.
- Returns:
The action to update the obstacle.
-
static inline Action remove_obstacle(const Obstacle &obstacle)
Returns an action that removes the given obstacle (by name) from the environment.
- Parameters:
obstacle β The obstacle to be removed.
- Returns:
The action to remove the obstacle.
Returns an action that sets an I/O signal of the given robot, or the last active robot instead.
- Parameters:
name β The name of the I/O signal.
value β The value to be set for the I/O signal.
robot β Optional robot associated with the I/O signal.
- Returns:
The action to set the I/O signal.
Returns an action that sets an image for a camera encoded as a string.
- Parameters:
image β The encoded image to be set.
camera β Optional camera associated with the image.
- Returns:
The action to set the camera image.
Returns an action that sets the depth map visualization of a camera.
- Parameters:
depths β The depth map data.
x β Size of the depth map along the x-axis.
y β Size of the depth map along the y-axis.
camera β Optional camera associated with the depth map.
- Returns:
The action to set the camera depth map.
Returns an action that sets the point cloud visualization of a camera.
- Parameters:
points β The point cloud data.
camera β Optional camera associated with the point cloud.
- Returns:
The action to set the camera point cloud.
Returns an action that adds a camera.
- Parameters:
camera β The camera to be added.
- Returns:
The action to add the camera.
Returns an action that updates a camera with the same name.
- Parameters:
camera β The camera to be updated.
- Returns:
The action to update the camera.
Returns an action that removes a camera.
- Parameters:
camera β The camera to be removed.
- Returns:
The action to remove the camera.
-
explicit Studio(bool auto_sync = false, bool auto_connect = true, double timeout = 5.0)
CameraΒΆ
-
struct Intrinsics
Intrinsics of a camera.
Represents the intrinsic parameters of a camera, which include the focal lengths, optical center coordinates, and image dimensions.
Public Functions
-
Eigen::Matrix3d as_matrix() const
Return the intrinsics as a 3x3 matrix.
The matrix is parameterized as: [f_x 0 c_x] [ 0 f_y c_y] [ 0 0 1 ]
- Returns:
Eigen::Matrix3d The intrinsics as a 3x3 matrix.
-
explicit Intrinsics() = default
Default constructor.
-
explicit Intrinsics(double focal_length_x, double focal_length_y, double optical_center_x, double optical_center_y, int width, int height)
Construct the intrinsics with the given parameters.
- Parameters:
focal_length_x β The focal length along the x-axis in pixels.
focal_length_y β The focal length along the y-axis in pixels.
optical_center_x β The x-coordinate of the optical center in pixels.
optical_center_y β The y-coordinate of the optical center in pixels.
width β The image width in pixels.
height β The image height in pixels.
Public Members
-
double focal_length_x
The focal length along the x-axis [px].
-
double focal_length_y
The focal length along the y-axis [px].
-
double optical_center_x
The x-coordinate of the optical center [px].
-
double optical_center_y
The y-coordinate of the optical center [px].
-
int width
The image width [px].
-
int height
The image height [px].
-
Eigen::Matrix3d as_matrix() const
-
class Camera : public jacobi::Element
Camera element.
The Camera class extends the Element class and includes parameters for the camera model and its intrinsic properties. The class allows for specifying the cameraβs model name, its intrinsics, and its position in 3D space.
Public Functions
-
explicit Camera() = default
Default constructor.
-
explicit Camera(const std::string &model, const std::string &name, const Frame &origin, const Intrinsics &intrinsics)
Construct a camera with the given model, name, origin, and intrinsics.
- Parameters:
model β The model name of the camera.
name β The unique name of the camera.
origin β The pose of the camera.
intrinsics β The intrinsic parameters of the camera.
Public Members
-
std::string model
The model name of the camera.
-
Intrinsics intrinsics
The camera intrinsics.
-
explicit Camera() = default