-
Notifications
You must be signed in to change notification settings - Fork 2
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
Import ergoCub in Gazebo #103
Comments
CC @traversaro |
Habemus the first version of ergocub in Gazebo Harmonic! @traversaro I continued from the work you started on Friday, this time I:
<?xml version='1.0'?>
<sdf version='1.7'>
<model name="ergocub_fixed">
<include>
<uri>model://ergoCub/robots/ergoCubGazeboV1_1</uri>
<pose>0.0 0 1.0 0 0 3.14</pose>
</include>
<joint name="fixed_base" type="fixed">
<parent>world</parent>
<child>ergoCub::root_link</child>
</joint>
</model>
</sdf>
<?xml version="1.0"?>
<sdf version="1.7">
<world name="turorial_controlboard">
<physics name="1ms" type="ignored">
<max_step_size>0.001</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<plugin
filename="gz-sim-physics-system"
name="gz::sim::systems::Physics">
</plugin>
<plugin
filename="gz-sim-user-commands-system"
name="gz::sim::systems::UserCommands">
</plugin>
<plugin
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
</plugin>
<plugin
filename="gz-sim-scene-broadcaster-system"
name="gz::sim::systems::SceneBroadcaster">
</plugin>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
</collision>
<visual name="visual">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<ambient>0.8 0.8 0.8 1</ambient>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
</material>
</visual>
</link>
</model>
<include>
<pose>0 0 0.5 0 -0.1 3.14</pose>
<!-- <uri>model://ergoCubSN001_fixed</uri> -->
<uri>model://ergoCub/robots/ergoCubGazeboV1_1_fixed</uri>
</include>
</world>
</sdf>
P.S.: in order to make the of sdf find the models the following environment variable has been set: export GZ_SIM_RESOURCE_PATH=${GZ_SIM_RESOURCE_PATH}:<path-to-ergocub-sw-installation>/share/
|
Here's the converted and modified |
Now I will try to add the sensors and plugins one at a time and see if everything works. |
The first plugin I tried to enable is the yarprobotinterface: <plugin name="gzyarp::RobotInterface" filename="gz-sim-yarp-robotinterface-system">
<yarpRobotInterfaceConfigurationFile>model://ergoCub/conf/ergocub.xml</yarpRobotInterfaceConfigurationFile>
</plugin> The plugin is recognized and starts, but it has troubles finding the configuration file using the |
Added the FT sensors: model.zip |
Added all IMUs: model.zip |
Added Laser: model.zip |
Yes, I think at a first round we can concentrate on having:
that are the sensors required for walking. |
@traversaro a curiosity: while all the other IMU plugins are inside Is it on purpose? It seems related to https://github.com/icub-tech-iit/ergocub-software/blob/dbbdd3940718d71ce5763999bfb857504cd772c5/urdf/ergoCub/robots/ergoCubGazeboV1_1/model.urdf#L2965-L2974, since they also have the same configuration file. Since our plugin needs a mandatory |
That seems to be a bug in the model. fyi @Nicogene |
I'm getting an error when trying to launch the model with one controlboard active:
This error comes from
part of the method
Apparently the position vector returned has size 0 causing the |
It would be useful to get via debug or print the joint name on which you are experiencing this problem. |
I think that this is because it has been added as xmlBlob, since right now we are missing the CSYS in the cad, but it can be fixed by changing the blob. See:
Is it causing any issues? |
OT: To be honest, I am not sure how that can work in Gazebo Classic. |
Nope, I didn't test it since I'm working mainly with iCub models. Btw the test may be easily adaptable to ergoCub models. I did a rapid check by attaching to this MASserver and testing only the
cc @traversaro |
Ok, I have no idea how that works. Anyhow, I can open a separate issue. |
Status as reported in robotology/gz-sim-yarp-plugins#103 (comment)
For convenience, I've created a temporary repository containing all the changes to the ergocub sdf to make it work with gz-sim-yarp-plugins: https://github.com/xela-95/ergocub_ws, so I don't have to upload copies of the modified sdf directly here. |
After completing #89 I'm able to handle all the controlboards of ergoCub on Gazebo: 2024-03-11_09-52-06.mp4The updated version of the ergoCub model I've used in this video is https://github.com/xela-95/ergocub_ws/tree/deda44006360e08fd630754518db227d4185562e CC @traversaro |
Just in case anyone from AMI is wondering why we are using a personal repo: we want to avoid as much as possible for people to think that this is a repo from which the updated model of ergocub is available, so using a personal repo seems the perfect way of doing so. |
With the new modifications introduced by #116 I'm now able to use URI paths for yarp configuration strings: https://github.com/xela-95/ergocub_ws/tree/9657015d3adbcd1e20e5f89595cf63f27c9f8885 Now I'm commenting one at a time the devices in https://github.com/xela-95/ergocub_ws/blob/9657015d3adbcd1e20e5f89595cf63f27c9f8885/install/share/ergoCub/conf/ergocub.xml to see if they are working. I'm currently stuck at https://github.com/xela-95/ergocub_ws/blob/9657015d3adbcd1e20e5f89595cf63f27c9f8885/install/share/ergoCub/conf/ergocub.xml#L25C1-L25C75 since the
|
The origin of the errors is:
The error logs are coming from Apparently it cannot find any sensor available. Any clue on how to debug this @traversaro? |
Can you check if the devices to which the remapper is attached return the correct value for the |
Thanks for pointing me in that direction. I am logging the sensor names and they seem correct, but I noted that the |
The same for |
Good catch! Indeed the temperature sensors are supported in gyp:
Probably it would be also good to change the error message in YARP to refer to the type of sensors could not be found. |
Note: when using
are wrote from https://github.com/robotology/yarp/blob/1326677585ffb3303b42760f5839e5e1f1a8338e/src/yarpmotorgui/partitem.cpp#L217 due to a missing implementation of gz-sim-yarp-plugins/plugins/controlboard/src/ControlBoardDriver.cpp Lines 1378 to 1381 in 85d7d8a
|
Ergocub has been imported in Gazebo and it works with yarpmotorgui. Sensors not currently implemented are still commented out but this will not block us from trying to go forward with trying walking in #94. |
I will add issues to implement the missing interfaces in FT and IMUs, or there are reasons not to do it?
Yep that would be useful! Maybe I can open a PR in future :) |
No, let's for go for it! |
Concerning the camera, at the moment it is not possible to enable https://github.com/icub-tech-iit/ergocub-software/blob/master/urdf/ergoCub/conf/sensors/rgbd_camera_wrapper.xml since this is causing errors, I think due to the missing depth camera, so this device will remain commented until #106. |
Ergocub has been imported successfully into Gazebo. Closing! |
With this issue we want to import one of the ergoCub models available in https://github.com/icub-tech-iit/ergocub-software into Gazebo.
Upgrades required to make it work
RGBD Camera-> postponedresetPositionsAndTrajectoryGenerators
at initial configuration #108The text was updated successfully, but these errors were encountered: