diff --git a/CHANGELOG.md b/CHANGELOG.md index 0610819a8..8d9df035c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,16 @@ Release Versions: - Add CI workflow for Python bindings (#159) - Add emtpy constructors for Circular and Ring DS (#154) - Update ROS1 example because simulation is more developed (#160) +- Define `inverse` and `*` operators for Cartesian types explicitly (#158) + +## Important TODOs + +- Revise `*=` and `*` operators in Cartesian types before the next release with + breaking changes (some are marked *deprecated*, and some are left as is, but + they should be deleted). See issue #156 +- Add the wrench computation in the `*` operator and `inverse` function (#134) +- Refactor and improve unittests for state_representation (especially JointState + and CartesianState) ## 3.0.0 diff --git a/source/state_representation/src/space/cartesian/CartesianTwist.cpp b/source/state_representation/src/space/cartesian/CartesianTwist.cpp index 9e522ab50..a9544b1ab 100644 --- a/source/state_representation/src/space/cartesian/CartesianTwist.cpp +++ b/source/state_representation/src/space/cartesian/CartesianTwist.cpp @@ -164,8 +164,7 @@ Eigen::VectorXd CartesianTwist::data() const { } CartesianTwist CartesianTwist::inverse() const { - CartesianTwist result = this->CartesianState::inverse(); - return result; + return this->CartesianState::inverse(); } std::ostream& operator<<(std::ostream& os, const CartesianTwist& twist) { @@ -184,7 +183,7 @@ std::ostream& operator<<(std::ostream& os, const CartesianTwist& twist) { } CartesianTwist operator*(const CartesianState& state, const CartesianTwist& twist) { - return CartesianTwist(state.operator*(twist)); + return state.operator*(twist); } CartesianTwist operator*(double lambda, const CartesianTwist& twist) { diff --git a/source/state_representation/src/space/cartesian/CartesianWrench.cpp b/source/state_representation/src/space/cartesian/CartesianWrench.cpp index acc9945a3..930f25873 100644 --- a/source/state_representation/src/space/cartesian/CartesianWrench.cpp +++ b/source/state_representation/src/space/cartesian/CartesianWrench.cpp @@ -141,7 +141,7 @@ std::ostream& operator<<(std::ostream& os, const CartesianWrench& wrench) { } CartesianWrench operator*(const CartesianState& state, const CartesianWrench& wrench) { - return CartesianWrench(state.operator*(wrench)); + return state.operator*(wrench); } CartesianWrench operator*(double lambda, const CartesianWrench& wrench) {