Skip to content

Commit 44d2d4c

Browse files
Merge pull request #74 from robotology/devel
Merge devel into master
2 parents 1f969c5 + 6ac0073 commit 44d2d4c

File tree

48 files changed

+1978
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1978
-408
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ All notable changes to this project are documented in this file.
66

77
### Changed
88

9+
## [0.4.0] - 2020-12-01
10+
### Added
11+
- Adding the possibility to use Gazebo base data inside the walking controller
12+
- `TrajectoryGenerator` class of the `TrajectoryPlanner` library includes now
13+
the method `getWeightPercentage` to retrieve the amount of weight on each foot
14+
requested by the planner.
15+
16+
### Changed
17+
- Adding the `use_external_robot_base` parameter inside the `dcm_walking_with_joypad.ini`
18+
- Adding the Gazebo base data port inside the `robotControl.ini`
19+
- Tunning the `zmpControllerParams.ini` and `dcmReactiveControllerParams.ini`
20+
- Modifying the follwoing classes for geting and using Gazebo base data:
21+
- `/KinDynWrapper/Wrapper`
22+
- `RobotInterface/Helper`
23+
- `TrajectoryPlanner/TrajectoryGenerator`
24+
- `WalkingModule`
25+
- Tune gains for iCubGenova04
926

1027
## [0.3.3] - 2020-11-23
1128
### Added
@@ -27,6 +44,7 @@ All notable changes to this project are documented in this file.
2744
- The `CHANGELOG.md` file
2845
- Implement the `WalkingControllersFindDepencies.cmake`
2946
- Adding the possibility of selecting Stiff/Compliant mode in joint level.
47+
3048
### Changed
3149
- General refactoring of the library. The WalkingModule is now split in several library. Namelly:
3250
- `YarpUtilities`: utilities for using `YARP`
@@ -93,7 +111,8 @@ All notable changes to this project are documented in this file.
93111
- Implement the first version of the `WalkingLoggerModule`
94112
- Implement the first version of the `WalkingJoypadModule`
95113

96-
[Unreleased]: https://github.com/robotology/walking-controllers/compare/v0.3.3...devel
114+
[Unreleased]: https://github.com/robotology/walking-controllers/compare/v0.4.0...devel
115+
[0.4.0]: https://github.com/robotology/walking-controllers/compare/v0.3.3...v0.4.0
97116
[0.3.3]: https://github.com/robotology/walking-controllers/compare/v0.3.2...v0.3.3
98117
[0.3.2]: https://github.com/robotology/walking-controllers/compare/v0.3.1...v0.3.2
99118
[0.3.1]: https://github.com/robotology/walking-controllers/compare/v0.3.0...v0.3.1

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 14)
77

88
## MAIN project
99
project(WalkingControllers
10-
VERSION 0.3.3)
10+
VERSION 0.4.0)
1111

1212
# Defines the CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_BINDIR and many other useful macros.
1313
# See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

src/KinDynWrapper/include/WalkingControllers/KinDynWrapper/Wrapper.h

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,28 @@
1717

1818
//iDynTree
1919
#include <iDynTree/KinDynComputations.h>
20+
#include <iDynTree/Model/FreeFloatingState.h>
2021

2122
// iCub-ctrl
2223
#include <iCub/ctrl/filters.h>
2324

25+
#include <unordered_map>
26+
2427
namespace WalkingControllers
2528
{
2629

2730
class WalkingFK
2831
{
2932
iDynTree::KinDynComputations m_kinDyn; /**< KinDynComputations solver. */
3033

34+
bool m_useExternalRobotBase; /**< is external estimator for the base of robot used? */
35+
iDynTree::FreeFloatingGeneralizedTorques m_generalizedBiasForces;
36+
3137
bool m_prevContactLeft; /**< Boolean is the previous contact foot the left one? */
3238
bool m_dcmEvaluated; /**< is the DCM evaluated? */
3339
bool m_comEvaluated; /**< is the CoM evaluated? */
3440

41+
iDynTree::FrameIndex m_frameBaseIndex;
3542
iDynTree::FrameIndex m_frameLeftIndex; /**< Index of the frame attached to the left foot in which all the left foot transformations are expressed. */
3643
iDynTree::FrameIndex m_frameRightIndex; /**< Index of the frame attached to the right foot in which all the right foot transformations are expressed. */
3744
iDynTree::FrameIndex m_frameRootIndex; /**< Index of the frame attached to the root_link. */
@@ -46,6 +53,8 @@ namespace WalkingControllers
4653
iDynTree::Transform m_frameHlinkLeft; /**< Transformation between the l_sole and the l_foot frame (l_ankle_2?!). */
4754
iDynTree::Transform m_frameHlinkRight; /**< Transformation between the l_sole and the l_foot frame (l_ankle_2?!). */
4855
iDynTree::Transform m_worldToBaseTransform; /**< World to base transformation. */
56+
std::unordered_map<std::string, std::pair<const std::string, const iDynTree::Transform>> m_baseFrames;/**< Transform related to the base frame */
57+
iDynTree::Twist m_baseTwist;/**< twist related to base frame */
4958

5059
iDynTree::Position m_comPosition; /**< Position of the CoM. */
5160
iDynTree::Vector3 m_comVelocity; /**< Velocity of the CoM. */
@@ -60,6 +69,8 @@ namespace WalkingControllers
6069

6170
bool m_firstStep; /**< True only during the first step. */
6271

72+
iDynTree::VectorDynSize m_jointPositions; /**< joint positions in radians. */
73+
6374
/**
6475
* Set the model of the robot.
6576
* @param model iDynTree model.
@@ -77,6 +88,14 @@ namespace WalkingControllers
7788
*/
7889
bool setBaseFrames(const std::string& lFootFrame, const std::string& rFootFrame);
7990

91+
/**
92+
* Set The base frames for enabling using Gazebo as a base estimator.
93+
* @param baseFrame the frame name inside model;
94+
* @param name label for storing the frame information;
95+
* @return true/false in case of success/failure.
96+
*/
97+
bool setBaseFrame(const std::string& baseFrame, const std::string& name);
98+
8099
/**
81100
* Evaluate the Divergent component of motion.
82101
*/
@@ -98,24 +117,14 @@ namespace WalkingControllers
98117
bool initialize(const yarp::os::Searchable& config,
99118
const iDynTree::Model& model);
100119

101-
/**
102-
* Evaluate the first world to base transformation.
103-
* @note: The The first reference frame is always the left foot.
104-
* @note: please use this method only with evaluateWorldToBaseTransformation(const bool& isLeftFixedFrame);
105-
* @param leftFootTransform transformation from the world to the left foot frame (l_sole);
106-
* @return true/false in case of success/failure.
107-
*/
108-
bool evaluateFirstWorldToBaseTransformation(const iDynTree::Transform& leftFootTransform);
109-
110120
/**
111121
* Evaluate the world to base transformation
112-
* @note: During the walking task the frame shift from the left to the right foot.
113-
* the new base frame is attached where the foot is.
114-
* @note: please use this method only with evaluateFirstWorldToBaseTransformation();
115-
* @param isLeftFixedFrame true if the main frame of the left foot is fixed one.
122+
* @param rootTransform transformation from the world to the root frame.
123+
* @param rootTwist twist of the root frame.
116124
* @return true/false in case of success/failure.
117125
*/
118-
bool evaluateWorldToBaseTransformation(const bool& isLeftFixedFrame);
126+
void evaluateWorldToBaseTransformation(const iDynTree::Transform& rootTransform,
127+
const iDynTree::Twist& rootTwist);
119128

120129
/**
121130
* Evaluate the world to base transformation
@@ -251,6 +260,12 @@ namespace WalkingControllers
251260
* @return true/false in case of success/failure.
252261
*/
253262
bool getCoMJacobian(iDynTree::MatrixDynSize &jacobian);
263+
264+
/**
265+
* Get the joint position
266+
* @return the joint position expressed in radians
267+
*/
268+
const iDynTree::VectorDynSize& getJointPos();
254269
};
255270
};
256271
#endif

0 commit comments

Comments
 (0)