diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f6d8240..91516c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,18 @@ # CHANGELOG -## 0.9.0 - UNRELEASED +## 0.9.0 - 2022-03-25 Requires Panda system version >= 4.2.1 - * **BREAKING** Add `O_ddP_O` base acceleration to robot state - * **BREAKING** New `base_acceleration_initialization_timeout` & `base_acceleration_invalid_reading` reflexes - -## 0.8.1 - UNRELEASED - -Requires Panda system version >= 4.0.0 - + * **BREAKING** Add `O_ddP_O` base acceleration to robot state, harcoded to `{0, 0, -9.81}`. + * **BREAKING** New `base_acceleration_initialization_timeout`, `base_acceleration_invalid_reading` + `cartesian_spline_motion_generator_violation` and + `joint_via_motion_generator_planning_joint_limit_violation` reflexes. * Adjust network error messages. Distinguish between problems resulting from: - a wrong network configuration. A message is shown after a timeout of 60 seconds. - a missing FCI feature or a blocked port due to Single Point of Control. An immediate error response is shown. + * Changed signature of `franka::Model::gravity` to use `O_ddP_O` in the robot state. ## 0.8.0 - 2020-04-29 diff --git a/CMakeLists.txt b/CMakeLists.txt index bccb29a9..f0d3da7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.4) project(libfranka - VERSION 0.8.1 + VERSION 0.9.0 LANGUAGES CXX ) diff --git a/include/franka/model.h b/include/franka/model.h index 54532093..99218b1d 100644 --- a/include/franka/model.h +++ b/include/franka/model.h @@ -263,13 +263,20 @@ class Model { * * @param[in] robot_state State from which the gravity vector should be calculated. * @param[in] gravity_earth Earth's gravity vector. Unit: \f$\frac{m}{s^2}\f$. - * Default to {0.0, 0.0, -9.81}. * * @return Gravity vector. */ std::array gravity(const franka::RobotState& robot_state, - const std::array& gravity_earth = { - {0., 0., -9.81}}) const noexcept; + const std::array& gravity_earth) const noexcept; + + /** + * Calculates the gravity vector using the robot state. Unit: \f$[Nm]\f$. + * + * @param[in] robot_state State from which the gravity vector should be calculated. + * + * @return Gravity vector. + */ + std::array gravity(const franka::RobotState& robot_state) const noexcept; /// @cond DO_NOT_DOCUMENT Model(const Model&) = delete; diff --git a/include/franka/robot_state.h b/include/franka/robot_state.h index 452bb569..9f92773c 100644 --- a/include/franka/robot_state.h +++ b/include/franka/robot_state.h @@ -331,6 +331,7 @@ struct RobotState { * Linear component of the acceleration of the robot's base, expressed in frame parallel to the * @ref o-frame "base frame", i.e. the base's translational acceleration. If the base is resting * this shows the direction of the gravity vector. + * It is harcoded for now to `{0, 0, -9.81}`. */ std::array O_ddP_O{}; // NOLINT(readability-identifier-naming) diff --git a/src/model.cpp b/src/model.cpp index bd019115..a53f1bac 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -228,6 +228,10 @@ std::array franka::Model::gravity(const franka::RobotState& robot_sta return gravity(robot_state.q, robot_state.m_total, robot_state.F_x_Ctotal, gravity_earth); }; +std::array franka::Model::gravity(const franka::RobotState& robot_state) const noexcept { + return gravity(robot_state, robot_state.O_ddP_O); +}; + std::array franka::Model::gravity( const std::array& q, double m_total,