Franky 1.1.0
A High-Level Motion API for Franka
Loading...
Searching...
No Matches
joint_state.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
7
8namespace franky {
9
17 public:
18 // Suppress implicit conversion warning
19#pragma clang diagnostic push
20#pragma clang diagnostic ignored "-Wimplicit-conversion"
27 JointState(Vector7d position) : position_(std::move(position)), velocity_(Vector7d::Zero()) {}
28#pragma clang diagnostic pop
29
34 JointState(Vector7d position, Vector7d velocity) : position_(std::move(position)), velocity_(std::move(velocity)) {}
35
36 JointState(const JointState &) = default;
37
38 JointState() = default;
39
43 [[nodiscard]] inline Vector7d position() const { return position_; }
44
48 [[nodiscard]] inline Vector7d velocity() const { return velocity_; }
49
50 friend std::ostream &operator<<(std::ostream &os, const JointState &joint_state);
51
52 private:
53 Vector7d position_;
54 Vector7d velocity_;
55};
56
57inline std::ostream &operator<<(std::ostream &os, const JointState &joint_state) {
58 os << "JointState(position=" << joint_state.position_ << ", velocity=" << joint_state.velocity_ << ")";
59 return os;
60}
61
62} // namespace franky
Joint state of a robot.
Definition joint_state.hpp:16
friend std::ostream & operator<<(std::ostream &os, const JointState &joint_state)
Definition joint_state.hpp:57
JointState()=default
Vector7d velocity() const
The velocity component of the state.
Definition joint_state.hpp:48
JointState(const JointState &)=default
JointState(Vector7d position)
Construct a joint state with the given joint positions and zero velocities.
Definition joint_state.hpp:27
JointState(Vector7d position, Vector7d velocity)
Definition joint_state.hpp:34
Vector7d position() const
The position component of the state.
Definition joint_state.hpp:43
Definition dynamics_limit.cpp:8
std::ostream & operator<<(std::ostream &os, const DynamicsLimit< Vector7d > &limit)
Definition dynamics_limit.cpp:47
Eigen::Vector< double, 7 > Vector7d
Definition types.hpp:11