Class Orientation2DStamped
Defined in File orientation_2d_stamped.hpp
Inheritance Relationships
Base Types
public fuse_variables::FixedSizeVariable< 1 >
(Template Class FixedSizeVariable)public fuse_variables::Stamped
(Class Stamped)
Class Documentation
-
class Orientation2DStamped : public fuse_variables::FixedSizeVariable<1>, public fuse_variables::Stamped
Variable representing a 2D orientation (theta) at a specific time, with a specific piece of hardware.
This is commonly used to represent a robot’s orientation within a map. The UUID of this class is static after construction. As such, the timestamp and device id cannot be modified. The value of the orientation can be modified.
Public Types
Public Functions
-
Orientation2DStamped() = default
Default constructor.
-
explicit Orientation2DStamped(const rclcpp::Time &stamp, const fuse_core::UUID &device_id = fuse_core::uuid::NIL)
Construct a 2D orientation at a specific point in time.
- Parameters:
stamp – [in] The timestamp attached to this orientation.
device_id – [in] An optional device id, for use when variables originate from multiple robots or devices
-
inline double &yaw()
Read-write access to the heading angle.
-
inline const double &yaw() const
Read-only access to the heading angle.
-
void print(std::ostream &stream = std::cout) const override
Print a human-readable description of the variable to the provided stream.
- Parameters:
stream – [out] The stream to write to. Defaults to stdout.
-
inline size_t localSize() const override
Returns the number of elements of the local parameterization space.
Since we are overriding the
localParameterization()
method, it is good practice to override thelocalSize()
method as well.
-
fuse_core::LocalParameterization *localParameterization() const override
Create a new Ceres local parameterization object to apply to updates of this variable.
A 2D rotation has a nonlinearity when the angle wraps around from -PI to PI. This is handled by a custom local parameterization to ensure smooth derivatives.
- Returns:
A base pointer to an instance of a derived LocalParameterization
Friends
- friend class boost::serialization::access
-
Orientation2DStamped() = default