Skip to content

Commit

Permalink
Implemented non-zero velocity joint waypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSchneider42 committed May 27, 2024
1 parent 6be576f commit faa1f8d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions include/franky/joint_state.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#pragma once

#include <optional>
#include <Eigen/Core>
#include <utility>

#include "franky/robot_pose.hpp"
#include "franky/robot_velocity.hpp"

namespace franky {

class JointState {
public:
// Suppress implicit conversion warning
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wimplicit-conversion"
JointState(Vector7d position) : position_(std::move(position)), velocity_(Vector7d::Zero()) {}
#pragma clang diagnostic pop

JointState(Vector7d pose, Vector7d velocity)
: position_(std::move(pose)), velocity_(std::move(velocity)) {}

JointState(const JointState &) = default;

JointState() = default;

[[nodiscard]] inline Vector7d position() const {
return position_;
}

[[nodiscard]] inline Vector7d velocity() const {
return velocity_;
}

private:
Vector7d position_;
Vector7d velocity_;
};

} // namespace franky

0 comments on commit faa1f8d

Please sign in to comment.