Closed xela-95 closed 6 months ago
You may want to update your libode package version, during the weekend we fixed some critical bugs (see conda-forge/libode-feedstock#22 and conda-forge/libode-feedstock#23).
is the latest libode version the 0.16.2? https://anaconda.org/conda-forge/libode
Yes, but the fix is in the latest build, i.e. 14, so make sure to have installed libode==0.16.2=*_14
, just updating libode should install the latest build
Can you open an issue in https://github.com/gazebosim/gz-sim to report the issue? Thanks!
One of the major issues now is to guarantee that the Gazebo clock is set as Yarp clock on the /clock
port, otherwise the control and the simulator will run at different speed.
Here are my attempts:
By setting the environment variable YARP_CLOCK
when I launch gazebo with gz sim example.workd --verbose
Gazebo remains stuck (with a black GUI) logging:
[INFO] |yarp.os.Port|/IITICUBLAP218/gz/79976/clock:i| Port /IITICUBLAP218/gz/79976/clock:i active at tcp://10.240.2.19:10002/
[INFO] |yarp.os.Network| Success: port-to-port persistent connection added.
[ERROR] |yarp.os.NetworkClock| Cannot find time port "/clock" or a time topic "/clock@"
[INFO] |yarp.os.Time| Waiting for clock server to start broadcasting data ...
[INFO] |yarp.os.Time| Waiting for clock server to start broadcasting data ...
If I just try to set YARP_CLOCK
when launching the WalkingModule by launching it with: YARP_CLOCK=/clock WalkingModule
I got:
[INFO] |yarp.os.Port|/IITICUBLAP218/WalkingModule/82982/clock:i| Port /IITICUBLAP218/WalkingModule/82982/clock:i active at tcp://10.240.2.19:10085/
[INFO] |yarp.os.Network| Success: port-to-port persistent connection added.
[INFO] |yarp.os.Time| Waiting for clock server to start broadcasting data ...
[INFO] |yarp.os.impl.PortCoreInputUnit|/IITICUBLAP218/WalkingModule/82982/clock:i| Receiving input from /clock to /IITICUBLAP218/WalkingModule/82982/clock:i using tcp
[DEBUG] |yarp.dev.PolyDriver|remotecontrolboardremapper| Parameters are (REMOTE_CONTROLBOARD_OPTIONS (writeStrict on)) (axesNames (torso_pitch torso_roll torso_yaw l_shoulder_pitch l_shoulder_roll l_shoulder_yaw l_elbow r_shoulder_pitch r_shoulder_roll r_shoulder_yaw r_elbow l_hip_pitch l_hip_roll l_hip_yaw l_knee l_ankle_pitch l_ankle_roll r_hip_pitch r_hip_roll r_hip_yaw r_knee r_ankle_pitch r_ankle_roll)) (device remotecontrolboardremapper) (localPortPrefix "/walking-coordinator/remoteControlBoard") (remoteControlBoards ("/ergocubSim/torso" "/ergocubSim/left_arm" "/ergocubSim/right_arm" "/ergocubSim/left_leg" "/ergocubSim/right_leg"))
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/walking-coordinator/remoteControlBoard/ergocubSim/torso") (remote "/ergocubSim/torso") (writeStrict on)
[INFO] |yarp.device.remote_controlboard| RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/torso/rpc:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/torso/rpc:o active at tcp://10.240.2.19:10086/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o active at tcp://10.240.2.19:10087/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/torso/stateExt:i| Port /walking-coordinator/remoteControlBoard/ergocubSim/torso/stateExt:i active at tcp://10.240.2.19:10088/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/rpc:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/torso/rpc:o to /ergocubSim/torso/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o to /ergocubSim/torso/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/stateExt:i| Receiving input from /ergocubSim/torso/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/torso/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/walking-coordinator/remoteControlBoard/ergocubSim/left_arm") (remote "/ergocubSim/left_arm") (writeStrict on)
[INFO] |yarp.device.remote_controlboard| RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/rpc:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/rpc:o active at tcp://10.240.2.19:10089/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o active at tcp://10.240.2.19:10090/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/stateExt:i| Port /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/stateExt:i active at tcp://10.240.2.19:10091/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/rpc:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/rpc:o to /ergocubSim/left_arm/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o to /ergocubSim/left_arm/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/stateExt:i| Receiving input from /ergocubSim/left_arm/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/walking-coordinator/remoteControlBoard/ergocubSim/right_arm") (remote "/ergocubSim/right_arm") (writeStrict on)
[INFO] |yarp.device.remote_controlboard| RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/rpc:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/rpc:o active at tcp://10.240.2.19:10092/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o active at tcp://10.240.2.19:10093/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/stateExt:i| Port /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/stateExt:i active at tcp://10.240.2.19:10094/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/rpc:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/rpc:o to /ergocubSim/right_arm/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o to /ergocubSim/right_arm/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/stateExt:i| Receiving input from /ergocubSim/right_arm/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/walking-coordinator/remoteControlBoard/ergocubSim/left_leg") (remote "/ergocubSim/left_leg") (writeStrict on)
[INFO] |yarp.device.remote_controlboard| RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/rpc:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/rpc:o active at tcp://10.240.2.19:10095/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o active at tcp://10.240.2.19:10096/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/stateExt:i| Port /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/stateExt:i active at tcp://10.240.2.19:10097/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/rpc:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/rpc:o to /ergocubSim/left_leg/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o to /ergocubSim/left_leg/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/stateExt:i| Receiving input from /ergocubSim/left_leg/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[DEBUG] |yarp.dev.PolyDriver|remote_controlboard| Parameters are (device remote_controlboard) (local "/walking-coordinator/remoteControlBoard/ergocubSim/right_leg") (remote "/ergocubSim/right_leg") (writeStrict on)
[INFO] |yarp.device.remote_controlboard| RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/rpc:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/rpc:o active at tcp://10.240.2.19:10098/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o| Port /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o active at tcp://10.240.2.19:10099/
[INFO] |yarp.os.Port|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/stateExt:i| Port /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/stateExt:i active at tcp://10.240.2.19:10100/
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/rpc:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/rpc:o to /ergocubSim/right_leg/rpc:i using tcp
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o| Sending output from /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o to /ergocubSim/right_leg/command:i using udp
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/stateExt:i| Receiving input from /ergocubSim/right_leg/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/stateExt:i using udp
[INFO] |yarp.dev.PolyDriver|remote_controlboard| Created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO] |yarp.dev.PolyDriver|remotecontrolboardremapper| Created device <remotecontrolboardremapper>. See C++ class RemoteControlBoardRemapper for documentation.
[ERROR] [configure] Unable to read encoders.
[ERROR] [WalkingModule::configure] Unable to configure the robot.
[INFO] |yarp.os.RFModule| RFModule failed to open.
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/rpc:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/torso/rpc:o to /ergocubSim/torso/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o| output for route /walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o->udp->/ergocubSim/torso/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/torso/command:o to /ergocubSim/torso/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/torso/stateExt:i| Removing input from /ergocubSim/torso/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/torso/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/rpc:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/rpc:o to /ergocubSim/left_arm/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o| output for route /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o->udp->/ergocubSim/left_arm/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/command:o to /ergocubSim/left_arm/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_arm/stateExt:i| Removing input from /ergocubSim/left_arm/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/left_arm/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/rpc:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/rpc:o to /ergocubSim/right_arm/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o| output for route /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o->udp->/ergocubSim/right_arm/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/command:o to /ergocubSim/right_arm/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_arm/stateExt:i| Removing input from /ergocubSim/right_arm/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/right_arm/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/rpc:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/rpc:o to /ergocubSim/left_leg/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o| output for route /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o->udp->/ergocubSim/left_leg/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/command:o to /ergocubSim/left_leg/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/left_leg/stateExt:i| Removing input from /ergocubSim/left_leg/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/left_leg/stateExt:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/rpc:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/rpc:o to /ergocubSim/right_leg/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o| output for route /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o->udp->/ergocubSim/right_leg/command:i asking other side to close by out-of-band means
[INFO] |yarp.os.impl.PortCoreOutputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o| Removing output from /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/command:o to /ergocubSim/right_leg/command:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/walking-coordinator/remoteControlBoard/ergocubSim/right_leg/stateExt:i| Removing input from /ergocubSim/right_leg/stateExt:o to /walking-coordinator/remoteControlBoard/ergocubSim/right_leg/stateExt:i
[WARNING] |yarp.os.NetworkClock| Destroying network clock
[INFO] |yarp.os.Network| Success: port-to-port persistent connection added.
[INFO] |yarp.os.impl.PortCoreInputUnit|/IITICUBLAP218/WalkingModule/82982/clock:i| Removing input from /clock to /IITICUBLAP218/WalkingModule/82982/clock:i
and then stops. I think this is the right path, I'm investigating the error of the WalkingModule
By setting the environment variable
YARP_CLOCK
when I launch gazebo withgz sim example.workd --verbose
Gazebo remains stuck (with a black GUI) logging:
This is probably a bug, ideally if the network clock is set we should avoid requiring the clock in the plugin that publish it, can you open an issue for that?
This is probably a bug, ideally if the network clock is set we should avoid requiring the clock in the plugin that publish it, can you open an issue for that?
Sorry I'm not sure to have fully understood, can you rephrase?
[ERROR] [configure] Unable to read encoders.
This error comes from https://github.com/robotology/walking-controllers/blob/edc8984998043c98182f726e17822deb2a7b1915/src/RobotInterface/src/Helper.cpp#L391-L401
The strange thing is that when I tried logging when the getEncoders
and getEncoderSpeeds
method si invoked, the method never logged anything.
https://github.com/robotology/gz-sim-yarp-plugins/blob/6b25488fb793743ff90d00d9c9184e7e86f5031c/plugins/controlboard/src/ControlBoardDriver.cpp#L1612-L1629
I've also made an attempt by launching the yarprobotinterface using the YARP_CLOCK variable and this is what I got:
Thanks to @traversaro we found out that the format of the timestamps published on the /clock
port by the clock plugin is not what the Yarp Clock and the other modules were expecting.
We found this by comparing the signal through yarp read ... /clock
with a second clock created through:
YARP_CLOCK=/clock2 yarp clock /clock2
By reading this clock the format is seconds nanoseconds
like: 63 936749458
I then updated the clock plugin to use this format and then done the walking tutorial being careful to launch both yarprobotinterface and Walking module with the YARP_CLOCK environment variable set to /clock
.
Here's a video of the result 🥳
The simulation is slow (sim2real ratio of 10-30 %) but that's matter for future plugins optimizations :)
CC @S-Dafarra @GiulioRomualdi let me know if you note something strange in the simulation or if you want me to try change some simulation settings :)
The simulation is slow (sim2real ratio of 10-30 %) but that's matter for future plugins optimizations :)
My guess is that is not something plugin-related, but rather that the model is quite complex. Probably once we integrate the plugin in the ergoCub creo generation pipeline we can also test the minContact model.
My guess is that is not something plugin-related, but rather that the model is quite complex.
Why do you think that? Certainly the plugins I've written have large space for optimizations 😅 but I don't know what is their impact on the overall simulation (it will be useful to understand it BTW).
Probably once we integrate the plugin in the ergoCub creo generation pipeline we can also test the minContact model.
Yep that's for sure!
In my opinion, some possible investigation routes could be:
I've tried to change physics engine: in addition to Dartsim, bullet and bullet-featherstone are the ones officially supported.
By launching gazebo with
gz sim example.world --physics-engine gz-physics-bullet-plugin --verbose
Gazebo crashes with the following logs:
Gazebo crashes with the following logs:
Cool, probably it make sense to check this happens without any plugin, and then report the issue in gz-sim .
In my opinion, some possible investigation routes could be:
* how fast does it go without the visualization? * are the collisions active? If so, what about removing them all manually except those in the feet? * is it possible to chop away part of the robot (like the head and the forearms) and check how much of an improvement it is?
I think I can close this issue since its acceptance criteria have been met.
I will open a new issue to track how the simulation changes by following these investigation routes.
This issue will track all the technical details concerning #94.
Using walking-controllers release v0.8.0 (latest): https://github.com/robotology/walking-controllers/releases/tag/v0.8.0