-
Notifications
You must be signed in to change notification settings - Fork 12
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
[fbeV1] simple floating base estimation algorithm #1
[fbeV1] simple floating base estimation algorithm #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
################################################################################ | ||
# # | ||
# Copyright (C) 2018 Fondazione Istituto Italiano di Tecnologia (IIT) # | ||
# All Rights Reserved. # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the usual license LGPL2+ , see https://github.com/robotology/blockfactory for an example of nice C++ license headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 714c6cc
#include <iDynTree/KinDynComputations.h> | ||
#include <iDynTree/ModelIO/ModelLoader.h> | ||
#include <iDynTree/yarp/YARPConversions.h> | ||
#include <iDynTree/Core//EigenHelpers.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <iDynTree/Core//EigenHelpers.h> | |
#include <iDynTree/Core/EigenHelpers.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 714c6cc
namespace dev { | ||
|
||
|
||
class icubFloatingBaseEstimatorV1 : public yarp::dev::DeviceDriver, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we could avoid explicit reference to iCub
in the device name, in the end even if there are a few icub-ism I think it is quite a general legged robot estimator, so a more general name could come handy for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 714c6cc
CMakeLists.txt
Outdated
target_link_libraries(icubFloatingBaseEstimatorV1 ${YARP_LIBRARIES} | ||
${iDynTree_LIBRARIES} | ||
floatingBaseEstimationRPC-service | ||
${codyco-modules_LIBRARIES}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which libraries are you using from codyco-modules? The idea was to move all the useful devices from codyco-modules here, so it would be great if we could avoid adding this dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 714c6cc
Note that to mark draft PR, instead of marking them as |
I am fine in copy&pasting the code from walking-controllers if it is to proceed forward fast, but it would be great if we have a strategy (i.e. moving this utilities somewhere else) to avoid this duplication. |
@prashanthr05 @traversaro |
With @traversaro, we agreed that this repository should be a common-place for any estimator software developments like base-estimator (v1, v2, etc), wholebodydynamics device...
I shall remodify the repository structure as desired.
|
cc @traversaro I think this PR is ready for review. |
@@ -0,0 +1,81 @@ | |||
<!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably you don't need this file because on the real platform wholebodydynamics
runs independently from the base estimation device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 82d978f
CMakeLists.txt
Outdated
find_package(YARP REQUIRED) | ||
if(${YARP_VERSION} VERSION_LESS ${YARP_REQUIRED_VERSION}) | ||
message(FATAL_ERROR "YARP version ${YARP_VERSION} not sufficient, at least version ${YARP_REQUIRED_VERSION} is required.") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to understand, why don't you simply write:
find_package(YARP 3.0.1 REQUIRED)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Mindless ctrl+c ctrl+v.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 82d978f
README.md
Outdated
Notice: `sudo` is not necessary if you specify the `CMAKE_INSTALL_PREFIX`. In this case it is necessary to add in the `.bashrc` or `.bash_profile` the following lines: | ||
``` sh | ||
export WBDEstimator_INSTALL_DIR=/path/where/you/installed | ||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WBDEstimator_INSTALL_DIR}/lib/yarp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future perhaps we can remove the need for this line by adding rpath handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think RPATH handling is already done in the CMakeLists. It's just that I didn't fully understand the implications of RPATH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to understand,
does adding
add_install_rpath_support(BIN_DIRS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
LIB_DIRS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}"
DEPENDS ENABLE_RPATH
USE_LINK_PATH)
in your CMakeLists.txt add the generated dynamic libraries to the LD_LIBRARY_PATH
automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright the documentation in add_install_rpath_support
details this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 82d978f
endif() | ||
add_custom_target(${_uninstall} COMMAND "${CMAKE_COMMAND}" -P "${_filename}") | ||
set_property(TARGET ${_uninstall} PROPERTY FOLDER "CMakePredefinedTargets") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For AddUninstallTarget
and AddInstallRPATHSupport
, can you get the latest versions from https://github.com/robotology/ycm/tree/master/modules ? A few problems have been fixed recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 82d978f
find_package(iDynTree REQUIRED) | ||
if(${iDynTree_VERSION} VERSION_LESS ${iDynTree_REQUIRED_VERSION}) | ||
message(FATAL_ERROR "iDyntree version ${iDynTree_VERSION} not sufficient, at least version ${iDynTree_REQUIRED_VERSION} is required.") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As before, why not simply find_package(iDynTree 0.11 REQUIRED)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 82d978f
|
||
set(iDynTree_REQUIRED_VERSION 0.11.0) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR TRUE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in 82d978f
Sorry for the delay! |
@traversaro Thanks Silvio! @GiulioRomualdi is currently testing this device with torque-walking, if he gives a thumbs up with the tests, then we can merge it to |
Tested in simulation, it works as expected. |
I don't know if it is a bug or something wanted but every time I run the code the device returns the following warnings
|
This bug is because the latest YARP requires the DTD version to be 3.0x. And also few of the soft requirements of the yarprobotinreface xml syntax are being violated. I will fix it in a commit and push, then we can merge. |
@traversaro you could merge it now, thanks! |
You are the mantainer, so feel free to merge it! |
@traversaro @GiulioRomualdi Merged, thank you guys! |
TODO: to organize the repository structure in a way that the implementation of this version of base estimator is separately accessible and coherent with the other whole-body-estimators to be implemented in the future.
Also need to take into account the current refactoring phase of the estimator-framework.