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

model with eyes, arms, and legs working? #248

Open
matejhof opened this issue Dec 5, 2024 · 5 comments
Open

model with eyes, arms, and legs working? #248

matejhof opened this issue Dec 5, 2024 · 5 comments

Comments

@matejhof
Copy link

matejhof commented Dec 5, 2024

We're in need for a whole-body simulator for our iCub 2.7 - that has eyes, arms, and legs - everything moving and working. We (with @rustlluk and @SpisakJ) came across

How do we make one world model that has everything?
And is it ok to use 2.5 models for 2.7 iCub?
@traversaro

@traversaro
Copy link
Member

I think it should be sufficient to take the iCubGazeboV2_5_visuomanip and reintroduce the left_leg and right_leg devices in https://github.com/robotology/icub-models/blob/master/iCub_manual/conf_manual/iCubGazeboV2_5_visuomanip/icub.xml by taking them from https://github.com/robotology/icub-models/blob/master/iCub/conf/icub.xml , and similarly add back the left_leg and right_leg controlboards in https://github.com/robotology/icub-models/blob/master/iCub_manual/robots/iCubGazeboV2_5_visuomanip/model.urdf#L2699 by taking them from https://github.com/robotology/icub-models/blob/master/iCub/robots/iCubGazeboV2_5/model.urdf#L2525-L2530 .

I think it could be a good idea to at least add back these devices commented in the iCubGazeboV2_5_visuomanip so that people interesting in having a iCubGazeboV2_5_visuomanip_with_legs could easily do that.

And is it ok to use 2.5 models for 2.7 iCub?

The main differences are the IMU mounted in the head and in the waist, see https://icub-tech-iit.github.io/documentation/icub_versions/#currently-known-icub-versions . Indeed, the only differences are the one introduced in CMake in https://github.com/robotology/icub-models-generator/blob/4329c54f59ea19d2a8d01d0e76bf7736247a5164/simmechanics/CMakeLists.txt#L276-L313 . So as long as you do not make any assumptions/use those IMUs, everything should be the same.

@matejhof
Copy link
Author

matejhof commented Dec 5, 2024

Thanks @traversaro for the quick help!
@SpisakJ is going to try it tomorrow!

@SpisakJ
Copy link

SpisakJ commented Dec 6, 2024

Hey, thanks for the information, we tried something like this already, added this to the visuomanip icub xml:

 <xi:include href="../../../iCub/conf/wrappers/motorControl/left_leg-mc_wrapper.xml" />
	<xi:include href="../../../iCub/conf/wrappers/motorControl/right_leg-mc_wrapper.xml" />

and the remappers:

	<xi:include href="../../../iCub/conf/wrappers/motorControl/left_leg-mc_remapper.xml" />
	<xi:include href="../../../iCub/conf/wrappers/motorControl/right_leg-mc_remapper.xml" />

and added the controlboards in the urdf:

model://iCub/conf/gazebo_icub_right_leg.ini


model://iCub/conf/gazebo_icub_left_leg.ini

However when trying to start the gazebo sim the following error is encountered:

[INFO] Executing attach action, level 5 on device left_leg-mc_remapper with parameters [("networks" = "(left_leg_joints1)"), ("left_leg_joints1" = "left_leg_hardware_device")]
[ERROR] Target device left_leg_hardware_device (network = left_leg_joints1 ) does not exist.
[ERROR] Cannot run attach action on device left_leg-mc_remapper
[INFO] Executing attach action, level 5 on device right_leg-mc_remapper with parameters [("networks" = "(right_leg_joints1)"), ("right_leg_joints1" = "right_leg_hardware_device")]
[ERROR] Target device right_leg_hardware_device (network = right_leg_joints1 ) does not exist.
[ERROR] Cannot run attach action on device right_leg-mc_remapper

There is also the alljoints-mc_remapper.xml file I am not completly sure if it is used by the V2_5 visuomanip icub since its not in its icub.xml but we also tried to modify that to include the legs as done in the alljoints-mc_remapper.xml file from the V2_5 but this did also not help.

After that we tried copying further gazebo references over from the V2_5 urdf to the visuomanip urdf, which perhaps expectedly also didnt help since the problem is with this right_leg_hardware_device rather than any sensors.

The right_leg_hardware_device or left leg as well are named in the gazebo_icub_right_leg.ini file or left respectively, and the "left_leg_joints1" I belive comes from the left_leg-mc_reampper.xml where the hardware device is also again.

The ini files are used in the urdf controllboards but since there the path is defined based on the model I thought this might be the problem and changed these to be the same as the other controlboards:

model://iCub/conf_manual/iCubGazeboV2_5_visuomanip/gazebo_icub_right_leg.ini


model://iCub/conf_manual/iCubGazeboV2_5_visuomanip/gazebo_icub_left_leg.ini

of course also copying the ini file to iCubGazbeoV2_5_visuomanip
but this also did not help.

Do you have any further ideas?

@traversaro
Copy link
Member

Hello @SpisakJ , can you push your modification to a fork of the repo or something similar? Otherwise it is difficult to inspect your change to understand what is going on, thanks!

@SpisakJ
Copy link

SpisakJ commented Dec 6, 2024

I added a fork https://github.com/SpisakJ/icub-models_visuo_with_legs/tree/master
To show the changes,
@rustlluk also tried it on an older version were just adding the controlboards worked, so I might just try that instead.

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

No branches or pull requests

3 participants