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

Update iCub3 with feet covers #210

Merged
merged 2 commits into from
Sep 24, 2021
Merged

Update iCub3 with feet covers #210

merged 2 commits into from
Sep 24, 2021

Conversation

mfussi66
Copy link
Member

The purpose of this PR is to update the simulation model of iCub 3 with the new feet covers. The model is shown in the picture below. The checkout used to generate the model is cad-mechanics-public master , commit: icub-tech-iit/cad-mechanics-public@a83def6

image

cc @S-Dafarra @GiulioRomualdi

Nicogene
Nicogene previously approved these changes Sep 22, 2021
Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

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

If these changes have been tested on gazebo, green light from my side 👍🏻

@Nicogene
Copy link
Member

But check it out that it is failing to generate the models :https://github.com/robotology/icub-models-generator/pull/210/checks?check_run_id=3676209300

@Nicogene Nicogene requested a review from traversaro September 22, 2021 14:46
@mfussi66
Copy link
Member Author

@Nicogene They were not tested in Gazebo, but I can of course do it as needed.

@pattacini
Copy link
Member

Here's one error:

2021-09-22T14:21:58.9629855Z   File "/usr/local/lib/python3.8/dist-packages/simmechanics_to_urdf-0.2-py3.8.egg/simmechanics_to_urdf/firstgen.py", line 916, in buildTree
2021-09-22T14:21:58.9630992Z KeyError: ('r_ankle_2', 'SCSYS_R_ANKLE_2')
2021-09-22T14:21:58.9985516Z make[2]: *** [simmechanics/CMakeFiles/generate-models-simmechanics.dir/build.make:180: simmechanics/iCubGazeboV3.urdf] Error 1

cc @Mick3Lozzo

@Mick3Lozzo
Copy link

Well, I have to verify this with @mfussi66, is seems regarding the ankle, but I don't know if it is a problem of the CAD simulation model.

@pattacini
Copy link
Member

Quoting @Mick3Lozzo

This coordinate system is inside a suppressed "test" group, so it is not included in the simulation model generation. Now we have SCSYS_R_ANKLE_2_FT_FRONT and SCSYS_R_ANKLE_2_FT_REAR.

I think we could remove it. Is it still used somehow in your application @GiulioRomualdi @S-Dafarra ?

@S-Dafarra
Copy link
Contributor

Quoting @Mick3Lozzo

This coordinate system is inside a suppressed "test" group, so it is not included in the simulation model generation. Now we have SCSYS_R_ANKLE_2_FT_FRONT and SCSYS_R_ANKLE_2_FT_REAR.

I think we could remove it. Is it still used somehow in your application @GiulioRomualdi @S-Dafarra ?

I did not understand what you are referring to

@pattacini
Copy link
Member

pattacini commented Sep 22, 2021

I'm referring to the frame SCSYS_R_ANKLE_2, which is causing the problem although seems to belong to the "suppressed test group" as we now have two frames, one for the front and one for the rear soles.

@S-Dafarra
Copy link
Contributor

I'm referring to the frame SCSYS_R_ANKLE_2, which is causing the problem although seems to belong to the "suppressed test group" as we now have two frames, one for the front and one for the rear soles.

I don't think I ever seen it

@mfussi66
Copy link
Member Author

Since it is a KeyError, it means that the script cannot find the key r_ankle_2, which of course is a consequence of the reference frame not being present in the model (aka the XML generated file). So I think that it means that I have to remove the instances of r_ankle_2 in the file ICUB_3_all_options.yaml, correct?

@Nicogene
Copy link
Member

Nicogene commented Sep 23, 2021

It is quite strange that r_ankle_2 is missing, it has been substituted by a link with a different name?

(and why just r_ankle_2 and not l_ankle_2?)

That link is involved in these joints: r_ankle_roll, r_foot_front_ft_sensor and r_foot_rear_ft_sensor.

If I understood correctly this PR should just update some stls, but seems that something went wrong in the export of the simmechanics xml

@Nicogene Nicogene self-requested a review September 23, 2021 09:42
@Nicogene Nicogene dismissed their stale review September 23, 2021 09:42

Need more investigation

@mfussi66
Copy link
Member Author

mfussi66 commented Sep 23, 2021

It is quite strange that r_ankle_2 is missing, it has been substituted by a link with a different name?

It seems like it belongs to a now suppressed test group of frames: https://github.com/icub-tech-iit/fix/issues/966#issuecomment-925045131

(and why just r_ankle_2 and not l_ankle_2?)

Could it be that the script fails and exits on the first error, which happens to be caused by r_ankle_2 that is parsed first?

@Nicogene
Copy link
Member

Nicogene commented Sep 23, 2021

Could it be that the script fails and exits on the first error, which happens to be caused by r_ankle_2 that is parsed first?

Yes probably after removing that frame we will have other issues, I suggest to test it locally is quite easy, just follow:

- name: Generate models
run: |
sudo apt-get update
sudo apt-get install libeigen3-dev libace-dev libtinyxml-dev libxml2-dev
# Save the url of the repository and the user-name of the committ author
export CURRENT_REPOSITORY_URL=`git remote get-url origin`
# Start in the parent directory of icub-model-generator
cd ${GITHUB_WORKSPACE}
sudo apt-get install --assume-yes --force-yes python-lxml python-yaml python-numpy python-setuptools
# probably python on the path return a python interpreter and the find_package(PythonInterp) in CMake another,
# let's install both debian packages and pip packages to be sure
sudo pip install lxml numpy pyyaml catkin_pkg
# install urdf_parser_py and save the last commit SHA1 hash
git clone $URDF_PARSER_PY_REPOSITORY_URL
cd urdf_parser_py
# workaround for https://github.com/robotology/simmechanics-to-urdf/issues/36
git checkout 31474b9baaf7c3845b40e5a9aa87d5900a2282c3
export URDF_PARSER_PY_COMMIT=`git rev-parse HEAD`
sudo python setup.py install
cd ${GITHUB_WORKSPACE}
# install simmechanics-to-urdf and save the last commit SHA1 hash
git clone $SIMMECHANICS_TO_URDF_REPOSITORY_URL
cd simmechanics-to-urdf
export SIMMECHANICS_TO_URDF_COMMIT=`git rev-parse HEAD`
sudo python setup.py install
cd ${GITHUB_WORKSPACE}
# get C++ dependencies and save their last commit SHA1 hash
# ycm
git clone https://github.com/robotology/ycm.git
cd ycm
git checkout v0.12.0
mkdir build
cd build
cmake ..
sudo cmake --build . --target install
cd ${GITHUB_WORKSPACE}
## yarp
git clone https://github.com/robotology/yarp.git
cd yarp
git checkout v3.4.0
export YARP_COMMIT=`git rev-parse HEAD`
mkdir build
cd build
cmake -DCREATE_LIB_MATH:BOOL=OFF -DYARP_COMPILE_EXECUTABLES:BOOL=OFF ..
sudo cmake --build . --target install
cd ${GITHUB_WORKSPACE}
## idyntree
git clone https://github.com/robotology/idyntree.git
cd idyntree
git checkout v1.2.0
export IDYNTREE_COMMIT=`git rev-parse HEAD`
mkdir build
cd build
cmake ..
sudo cmake --build . --target install
cd ${GITHUB_WORKSPACE}
# Prepare icub-model-generator build
mkdir build
cd build
cmake -DICUB_MODELS_SOURCE_DIR=$ICUB_MODELS_SOURCE_DIR ..
# Build and run
make VERBOSE=1
ctest --output-on-failure

If you have any issue you can call me

@pattacini
Copy link
Member

Hi @Nicogene

It is quite strange that r_ankle_2 is missing, it has been substituted by a link with a different name?

My understanding is that since some time the sole is split in two (a front and a rear part), thus the two distinct frames.

(and why just r_ankle_2 and not l_ankle_2?)

Maybe the CI stopped before processing the left ankle?

If I understood correctly this PR should just update some stls, but seems that something went wrong in the export of the simmechanics XML

It indeed remains unclear why the problem with r_ankle_2 just showed up now.

@Nicogene
Copy link
Member

My understanding is that since some time the sole is split in two (a front and a rear part), thus the two distinct frames.

This is how the ft sensor was defined in iCub 2.5

SIM_SEA_2-5_R_FOOT--SIM_SEA_2-5_R_SOLE: r_foot_ft_sensor

Here instead how they are defined in iCub 3:

SIM_ICUB3_R_ANKLE_2--SIM_ICUB3_R_FOOT_FRONT: r_foot_front_ft_sensor
SIM_ICUB3_R_ANKLE_2--SIM_ICUB3_R_FOOT_REAR: r_foot_rear_ft_sensor

As you can see the r_ankle_2 has been always involved in iCub 3

@pattacini
Copy link
Member

So the problem might be that we need the frame, which has been somehow removed then.
@Mick3Lozzo

@Mick3Lozzo
Copy link

Re-added the frame in both feet @pattacini.

Now we should clarify their placement inside the assembly. 

Probably they should be here ad not inside a suppressed group, but I'll wait for @salvi-mattia, maybe there is a reason.

Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

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

If the model works on gazebo, we can merge it 👍🏻

@pattacini
Copy link
Member

If the model works on gazebo, we can merge it 👍🏻

@mfussi66
The CI now works ok 👍🏻
Do you have feedback from the test with Gazebo?

@mfussi66
Copy link
Member Author

If the model works on gazebo, we can merge it 👍🏻

@mfussi66
The CI now works ok 👍🏻
Do you have feedback from the test with Gazebo?

Not yet, as I need to check how to generate it from the proposed model.

@mfussi66
Copy link
Member Author

image

Yep it seems to be displayed correctly in gazebo!

@Nicogene Nicogene merged commit 924a1e8 into robotology:master Sep 24, 2021
@Nicogene
Copy link
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants