-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add legs FT IMU frames - address review #113
Add legs FT IMU frames - address review #113
Conversation
I have just edited the yaml files. I hope that'd be enough? or should I compile/generate a few files after the changes and push it as well? |
If you can rebase your commits with @fiorisi it will be great, otherwise I will merge & squash, thanks! |
The error in Travis persists. I will check it. |
Given that one commit is "adding YARP conf files" and another is approximately "removing YARP conf files", for keep a simple history it would be nice to merge the two last commits, but again I can just merge all the commits of the PR and that will also result in a cleanish git history. |
If I am not mistaken, we should also fix/workaround robotology/simmechanics-to-urdf#36 . |
Ah okay, I can squash those commits. |
Ok, after reading through the code, I understand this error is because I turned @traversaro could you elaborate on this comment a bit more, #113 (comment) and should we address it in this PR? |
eff9861
to
44e99c6
Compare
If I understood correctly robotology/simmechanics-to-urdf#36, using the latest |
cc @nunoguedelha I think we will need your review for this PR |
exportedFrameName: l_upper_leg_ft_imu_3B12_frame | ||
- frameName: SCSYS_L_FOOT_FT-IMU_3B13 | ||
frameReferenceLink: l_ankle_2 | ||
exportedFrameName: l_foot_ft_imu_3B13_frame |
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 far as I remember, sensors don't need an exported fixed URDF frames, i.e. fake link with zero mass connected to a link with a fixed joint. this is automatically handled by iDyntree, the exportFrameInURDF
parameter is not mandatory (refer to https://github.com/robotology/simmechanics-to-urdf/blob/master/README.md).
exportFrameInURDF: Yes | ||
linkName: l_ankle_2 | ||
sensorName: l_foot_ft_imu_3B13 | ||
sensorType: "imu" |
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.
exportFrameInURDF -> No
As mentioned in my previous comment aboce, it is not mandatory to export a fake link frame in the URDF. So we can leave exportFrameInURDF
to the default value "No" (I explain further how the default is set).
sensorName
I would use all lower case, as for all other sensor names used in the URDF.
sensorType
For each IMU sensor, we shold add one accelerometer and one gyroscope. For instance, for SCSYS_L_UPPER_LEG_FT-IMU_3B12:
- frameName: SCSYS_L_UPPER_LEG_FT-IMU_3B12
linkName: l_hip_2
sensorName: l_upper_leg_ft_acc_3b12
sensorType: "accelerometer"
- frameName: SCSYS_L_UPPER_LEG_FT-IMU_3B12
linkName: l_hip_2
sensorName: l_upper_leg_ft_gyro_3b12
sensorType: "gyroscope"
The default block is identified by the parser through the sensorType
...
accelerometer:
https://github.com/robotology/icub-model-generator/blob/44e99c620cbbc237a84929023b80aab220ab0428/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in#L652-L658
gyroscope:
https://github.com/robotology/icub-model-generator/blob/44e99c620cbbc237a84929023b80aab220ab0428/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in#L652-L658
The purpose of these default blocks was to avoid to fill the same information for the large number of MTB accelerometers.
the default sensor blob:
https://github.com/robotology/icub-model-generator/blob/44e99c620cbbc237a84929023b80aab220ab0428/simmechanics/data/icub2_5/ICUB_2-5_BB_simmechanics_options.yaml.in#L656-L658
will cause a problem. A workaround would be to set an empty sensorBlobs:
field, which requires a small change in the parser. I can help on that.
linkName <-- POTENTIAL ISSUE
Is the transform of the IMU sensor frame expressed with respect to the FT parent link, or with respect to the FT sensor frame as illustrated here?
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.
linkName <-- POTENTIAL ISSUE
Is the transform of the IMU sensor frame expressed with respect to the FT parent link, or with respect to the FT sensor frame as illustrated here?
After discussing with @prashanthr05 and going through the Simmechanics output file, we realized that the relative transform that will appear in the generated URDF model file, under the tag <sensor><origin>
is computed from the composition of the absolute pose of the IMU sensor frame (defined in the simmechanics output ICUB_2-5_BB_SIM_MODEL.xml
with respect to the same WORLD frame) and the linkName
frame pose with respect to the WORLD. Since l_hip_2
and r_hip_2
are respectively parents of the FT sensor fixed frames l_leg_ft_sensor
and r_leg_ft_sensor
, it is ok to use them as the FT-IMU parent links.
While compiling, I get this error: [ 3%] Generating iCubGazeboV2_5_plus.urdf
Traceback (most recent call last):
File "/usr/local/bin/simmechanics_to_urdf", line 11, in <module>
load_entry_point('simmechanics-to-urdf==0.2', 'console_scripts', 'simmechanics_to_urdf')()
File "build/bdist.linux-x86_64/egg/simmechanics_to_urdf/firstgen.py", line 1871, in main
File "build/bdist.linux-x86_64/egg/simmechanics_to_urdf/firstgen.py", line 177, in convert
File "build/bdist.linux-x86_64/egg/simmechanics_to_urdf/firstgen.py", line 249, in addSensors
KeyError: ('r_hip_2', 'SCSYS_R_UPPER_LEG_FT-IMU_3B11')
simmechanics/CMakeFiles/generate-models-simmechanics.dir/build.make:92: recipe for target 'simmechanics/iCubGazeboV2_5_plus.urdf' failed
make[2]: *** [simmechanics/iCubGazeboV2_5_plus.urdf] Error 1
CMakeFiles/Makefile2:1202: recipe for target 'simmechanics/CMakeFiles/generate-models-simmechanics.dir/all' failed
make[1]: *** [simmechanics/CMakeFiles/generate-models-simmechanics.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2 REASONThe IMU frames have not been generated in the WORKAROUND
Any suggestions @nunoguedelha @fiorisi ? |
To workaround robotology/simmechanics-to-urdf#36 we can also just checkout a commit of |
Pushed fix on |
Somehow, an additional indentation is being added in the generated yaml files with the current changes and the parser fails for this reason. |
Fixed in 933d1cc We can merge this PR if #113 (comment) is addressed. |
After testing the backward compatibility PR of urdf_parser_py following the steps suggested in robotology/simmechanics-to-urdf#38 (comment), the visual and collision components of every link was added and I could visualize the frames added in this PR in RViz successfully. Showing only 4 out of the 8 frames added here to have a degree of readability. |
I am not sure why I can't directly edit your PR, but I think adding the line:
after the line Other info for the change: Commit message: Use latest confirmed working version of urdf_parser_py Using urdf_parser_py's commit 31474b9baaf7c3845b40e5a9aa87d5900a2282c3, that precedes the regression introduced in ros/urdf_parser_py#26 and discussed in robotology/simmechanics-to-urdf#36 . |
@nunoguedelha I do not understand why the Travis is failing now. Could you please check this? |
I am unable to reproduce locally, so I opened #116 to migrate Travis to Bionic and hopefully align the two systems. |
Can you rebase against the latest master? |
- add individual accelerometer and gyroscope type frames to the associated IMU frame - fix naming conventions - sensorName to be all in small letters - do not export these frames as zero-mass links in the urdf - just add these frames as sensor frames to the associated link
….txt Cmake will add the params to the yaml file only when building the normal iCub2.5 model
Using urdf_parser_py's commit 31474b9baaf7c3845b40e5a9aa87d5900a2282c3, that precedes the regression introduced in ros/urdf_parser_py#26 (ros/urdf_parser_py#26) and discussed in robotology/simmechanics-to-urdf#36 (robotology/simmechanics-to-urdf#36). The commit used is based from the info contained in this icub-models commit: robotology/icub-models@b69b989 (robotology/icub-models@b69b989).
784c95c
to
d34c544
Compare
@traversaro done. Let's see what Travis says! |
@traversaro friendly ping..! |
I have no idea about why Travis is failing, probably there is strange interaction with the branch problems you were mentioning f2f. I pushed the branch in this repo, and I think we can open a new PR from that. Note that you have access to the repo, so you can easily manage the PR also from this new branch. |
This PR incorporates the changes to suggested in PR #111 and removes the
gazebo_imu
plugins to be compatible with the robot.cc @traversaro @fiorisi