Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the telemetry logger in the WalkingModule #97

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmake/WalkingControllersFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ checkandset_dependency(qpOASES)
find_package(Catch2 QUIET)
checkandset_dependency(Catch2)

find_package(BipedalLocomotionFramework 0.6.0 COMPONENTS VectorsCollection REQUIRED)

walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_tests "Compile tests?" ON WALKING_CONTROLLERS_HAS_Catch2 OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_YarpUtilities "Compile YarpHelper library?" ON WALKING_CONTROLLERS_HAS_YARP OFF)
walking_controllers_dependent_option(WALKING_CONTROLLERS_COMPILE_iDynTreeUtilities "Compile iDynTreeHelper library?" ON "WALKING_CONTROLLERS_HAS_iDynTree;WALKING_CONTROLLERS_HAS_YARP;WALKING_CONTROLLERS_HAS_Eigen3" OFF)
Expand Down
1 change: 1 addition & 0 deletions src/WalkingModule/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ if(WALKING_CONTROLLERS_COMPILE_WalkingModule)
WalkingControllers::WholeBodyControllers
WalkingControllers::RetargetingHelper
WalkingControllers::LoggerClient
BipedalLocomotion::VectorsCollection
ctrlLib
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dataLoggerOutputPort_name /logger/data:o
dataLoggerRpcOutputPort_name /logger/rpc:o

dataLoggerInputPort_name /logger/data:i
dataLoggerInputPort_name /yarp-robot-logger/exogenous_signals/walking:i
dataLoggerRpcInputPort_name /logger/rpc:i
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use_QP-IK 1
use_osqp 1

# remove this line if you don't want to save data of the experiment
#dump_data 1
dump_data 1

# Limit on the maximum initial velocity. This avoids the robot to jump at startup
max_initial_com_vel 0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ unicycleGain 10.0
referencePosition (0.1 0.0)
timeWeight 2.5
positionWeight 1.0
slowWhenTurningGain 5.0
slowWhenTurningGain 2.5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter should be increased again as the robot falls down when turning due to the high speed. We could try with 4 if we want to take a higher velocity with respect to the previous value. But the new value should be tested before merging the PR.

cc @S-Dafarra

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't be able to test the new gain for a while. Should we revert to 5.0 and merge the PR, leaving for later the tuning of this gain?

slowWhenBackwardFactor 0.5

##Bounds
Expand All @@ -20,7 +20,7 @@ minWidth 0.16
maxAngleVariation 15.0
minAngleVariation 8.0
#Timings
maxStepDuration 0.8
maxStepDuration 1.0
minStepDuration 0.6

##Nominal Values
Expand All @@ -32,7 +32,7 @@ stepLandingVelocity 0.0
footApexTime 0.5
comHeightDelta 0.01
#Timings
nominalDuration 0.7
nominalDuration 0.8
lastStepSwitchTime 0.8
switchOverSwingRatio 0.7

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dataLoggerOutputPort_name /logger/data:o
dataLoggerRpcOutputPort_name /logger/rpc:o

dataLoggerInputPort_name /logger/data:i
dataLoggerInputPort_name /yarp-robot-logger/exogenous_signals/walking:i
dataLoggerRpcInputPort_name /logger/rpc:i
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use_QP-IK 1
use_osqp 1

# remove this line if you don't want to save data of the experiment
dump_data 0
dump_data 1

# Limit on the maximum initial velocity. This avoids the robot to jump at startup
max_initial_com_vel 0.15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <yarp/os/RpcClient.h>


#include <BipedalLocomotion/YarpUtilities/VectorsCollection.h>

// iDynTree
#include <iDynTree/Core/VectorFixSize.h>
#include <iDynTree/ModelIO/ModelLoader.h>
Expand Down Expand Up @@ -147,6 +149,8 @@ namespace WalkingControllers
// debug
std::unique_ptr<iCub::ctrl::Integrator> m_velocityIntegral{nullptr};

yarp::os::BufferedPort<BipedalLocomotion::YarpUtilities::VectorsCollection> m_loggerPort; /**< Logger port. */

/**
* Get the robot model from the resource finder and set it.
* @param rf is the reference to a resource finder object.
Expand Down
182 changes: 108 additions & 74 deletions src/WalkingModule/src/Module.cpp

Large diffs are not rendered by default.