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::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¶