Skip to content

Commit

Permalink
Merge pull request #147 in SWDEV/libfranka from SRR-1304/release-0.9.…
Browse files Browse the repository at this point in the history
…0 to develop

* commit '79dbbfd882748a83809e489832bf207a45a3f7b5':
  FIX: improved changelog and comments
  FIX: gravity computation using the robot state
  FIX: version bumping
  • Loading branch information
falfab committed Mar 25, 2022
2 parents e612260 + 79dbbfd commit c452ba2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
14 changes: 6 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.4)
project(libfranka
VERSION 0.8.1
VERSION 0.9.0
LANGUAGES CXX
)

Expand Down
13 changes: 10 additions & 3 deletions include/franka/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<double, 7> gravity(const franka::RobotState& robot_state,
const std::array<double, 3>& gravity_earth = {
{0., 0., -9.81}}) const noexcept;
const std::array<double, 3>& 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<double, 7> gravity(const franka::RobotState& robot_state) const noexcept;

/// @cond DO_NOT_DOCUMENT
Model(const Model&) = delete;
Expand Down
1 change: 1 addition & 0 deletions include/franka/robot_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<double, 3> O_ddP_O{}; // NOLINT(readability-identifier-naming)

Expand Down
4 changes: 4 additions & 0 deletions src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ std::array<double, 7> 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<double, 7> franka::Model::gravity(const franka::RobotState& robot_state) const noexcept {
return gravity(robot_state, robot_state.O_ddP_O);
};

std::array<double, 7> franka::Model::gravity(
const std::array<double, 7>& q,
double m_total,
Expand Down

0 comments on commit c452ba2

Please sign in to comment.