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

Variable feasible region task #922

Merged
merged 21 commits into from
Jan 23, 2025

Conversation

rob-mau
Copy link
Contributor

@rob-mau rob-mau commented Jan 16, 2025

Implemented and Tested the 'VariableFeasibleRegionTask'.

@rob-mau
Copy link
Contributor Author

rob-mau commented Jan 17, 2025

C.C. @CarlottaSartore

@rob-mau
Copy link
Contributor Author

rob-mau commented Jan 17, 2025

The CI are failing with the following error:

FAILED: src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o 
/usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-c++ -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DYarpUtilities_EXPORTS -D_USE_MATH_DEFINES -Dcasadi_VERSION=3.6.7 -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/YarpUtilities/include -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/GenericContainer/include -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/ParametersHandler/include -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/TextLogging/include -isystem /usr/share/miniconda3/envs/test/include/eigen3 -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda3/envs/test/include -O3 -DNDEBUG -std=c++17 -fPIC -MD -MT src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o -MF src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o.d -o src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o -c /home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/YarpUtilities/src/RosPublisher.cpp
/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/YarpUtilities/src/RosPublisher.cpp:18:10: fatal error: yarp/rosmsg/TickTime.h: No such file or directory
   18 | #include <yarp/rosmsg/TickTime.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I was able to replicate the error on my machine, It was due to the verion of yarp, when I downgraded from 3.10.1 to 3.9 I was able to compile.

@S-Dafarra
Copy link
Member

S-Dafarra commented Jan 17, 2025

The CI are failing with the following error:

FAILED: src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o 
/usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-c++ -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DYarpUtilities_EXPORTS -D_USE_MATH_DEFINES -Dcasadi_VERSION=3.6.7 -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/YarpUtilities/include -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/GenericContainer/include -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/ParametersHandler/include -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/TextLogging/include -isystem /usr/share/miniconda3/envs/test/include/eigen3 -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda3/envs/test/include -O3 -DNDEBUG -std=c++17 -fPIC -MD -MT src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o -MF src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o.d -o src/YarpUtilities/CMakeFiles/YarpUtilities.dir/src/RosPublisher.cpp.o -c /home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/YarpUtilities/src/RosPublisher.cpp
/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/src/YarpUtilities/src/RosPublisher.cpp:18:10: fatal error: yarp/rosmsg/TickTime.h: No such file or directory
   18 | #include <yarp/rosmsg/TickTime.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I was able to replicate the error on my machine, It was due to the verion of yarp, when I downgraded from 3.10.1 to 3.9 I was able to compile.

I fixed this in #910

@GiulioRomualdi
Copy link
Member

Hi @rob-mau since #910 got merged can you rebase the PR on master?

@rob-mau rob-mau force-pushed the variable_feasible_region_task branch from 6ff2c84 to 122092b Compare January 20, 2025 09:53
@rob-mau
Copy link
Contributor Author

rob-mau commented Jan 20, 2025

Hi @rob-mau since #910 got merged can you rebase the PR on master?

Done

bool m_isInitialized{false}; /**< True if the task has been initialized. */
bool m_isValid{false}; /**< True if the task is valid. */
std::size_t m_NumberOfVariables{0}; /**< Number of variables. */
std::size_t m_variableSize{0}; /**< Size of the variable considered in the task. */
Copy link
Member

Choose a reason for hiding this comment

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

Instead of having m_variableName and m_variableSize you can directly store the variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to be consistent with the tasks already implemented, e.g. VariableRegularizationTask

Comment on lines 82 to 86
// if the size of the m_controlledElements vector is zero, this means that the entire
// variable is regularized
// iDynTree::toEigen(this->subA(variable)).setIdentity(); // devo sostituirlo col comando
// sotto?
m_S = Eigen::MatrixXd::Identity(m_variableSize, m_variableSize);
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a mistake m_s is in general (m_variableSize x m_NumberOfVariables) matrix so only a subpart should contain the identity. The other should be zero. So perhaps

iDynTree::toEigen(this->subA(variable)).setIdentity()

is correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I interpreted the code correctly. Isn't the condition m_controlledElements.size() == 0 equivalent to m_variableSize == m_NumberOfVariables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with the commit b8820ac.

@GiulioRomualdi GiulioRomualdi enabled auto-merge (squash) January 23, 2025 20:02
@GiulioRomualdi GiulioRomualdi merged commit 2311f28 into ami-iit:master Jan 23, 2025
10 checks passed
@rob-mau rob-mau deleted the variable_feasible_region_task branch January 23, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants