ocs2
ocs2 copied to clipboard
Run train.py in ocs2_ballbot_mpcnet but stuck at waiting for the first data
Describe the bug I set up and install all the dependency of MPC-Net and then i run the train.py in ocs2_ballbot_mpcnet, it seems everything goes well but the program stuck at waiting for the first data, i dont know whether should i launch another file such as an simulation enviroment?
To Reproduce Steps to reproduce the behavior:
- Go to '~/osc2_ws/src/ocs2/ocs2_mpcnet/ocs2_ballbot_mpcnet/python/ocs2_ballbot_mpcnet
- Run train,py
- The program stuck at here
Screenshots
[CppAdInterface] Loading Shared Library: /home/rmua1/osc2_ws/src/ocs2/ocs2_robotic_examples/ocs2_ballbot/auto_generated/ballbot_dynamics_flow_map/cppad_generated/ballbot_dynamics_flow_map_lib.so [CppAdInterface] Loading Shared Library: /home/rmua1/osc2_ws/src/ocs2/ocs2_robotic_examples/ocs2_ballbot/auto_generated/ballbot_dynamics_jump_map/cppad_generated/ballbot_dynamics_jump_map_lib.so [CppAdInterface] Loading Shared Library: /home/rmua1/osc2_ws/src/ocs2/ocs2_robotic_examples/ocs2_ballbot/auto_generated/ballbot_dynamics_guard_surfaces/cppad_generated/ballbot_dynamics_guard_surfaces_lib.so
Rollout Settings:
=============================================================================
'AbsTolODE'..........................................................1e-05
'RelTolODE'..........................................................0.001
'maxNumStepsPerSecond'..............................................100000
'timeStep'............................................................0.01
'integratorType'.....................................................ODE45 (default)
'checkNumericalStability'................................................0
'reconstructInputTrajectory'.............................................1 (default)
'rootFindingAlgorithm'...................................................0 (default)
'maxSingleEventIterations'..............................................10 (default)
'useTrajectorySpreadingController'.......................................0 (default)
=============================================================================
============== Waiting for first data.
Additional context I think the data-generation is failed but i dont know how to fix it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/rmua1/osc2_ws/src/ocs2/ocs2_mpcnet/ocs2_ballbot_mpcnet/python/ocs2_ballbot_mpcnet/train.py", line 71, in
In "/home/rmua1/osc2_ws/src/ocs2/ocs2_mpcnet/ocs2_mpcnet_core/python/ocs2_mpcnet_core/mpcnet.py
Hi @EricTonyLiu, I just did a new setup following these instructions:
- https://leggedrobotics.github.io/ocs2/installation.html#doxid-ocs2-doc-installation
- https://leggedrobotics.github.io/ocs2/mpcnet.html
And it work on my machine. Can you please double-check if you exactly followed all of those instructions? Also, can you try deploying the default policy with roslaunch ocs2_ballbot_mpcnet ballbot_mpcnet.launch
?
Thank you for your replyment. Yes, i followed the step and install the ocs2 and raisim, the other example such as ocs2_quadrotor works fine to me, i ran roslaunch ocs2_ballbot_mpcnet ballbot_mpcnet.launch, the default policy deployment also works fine my virtual environment is annaconda rather than vens, i dont know whether this needs other setup, at first the environment cannot find the python package like the ocs2-mpcnet_core so i export the python path, then i can run the train.py, but still stuck at Waiting for first data. maybe someone can tell me whether the data come from so i can debug it? thanks a lot
I am facing the same issue. Installed everything following the documentation. Default policy works fine too. On running train.py, the parameters are printed in the terminal 3 times for some reason and finally shows "waiting for 1st data"
@SarveshS325 What are you using for creating the virtual environment?
I used venv to create the virtual environment with access to the system python. I also had to install onnx with pip in the virtual environment in addition to the steps mentioned in the documentation.
@EricTonyLiu and @SarveshS325 Can you please send me the output when you type sudo apt list --installed | grep pybind
in the terminal?
ros-noetic-pybind11-catkin/focal,now 2.10.3-2focal.20230213.204608 amd64 [installed,automatic]
. It's the one installed along with ROS
Aha, I suspect that it might break with the newest pybind version.
Can you add this version to your workspace and try again?
git clone [email protected]:wxmerkt/pybind11_catkin.git -b 2.5.0
Did a clean build with versions 2.5.0 and 2.4.3 pybind. Doesn't change anything
To be sure that it doesn't fix it, did you remove the globally installed package, e.g. sudo apt purge ros-noetic-pybind11-catkin
?
That should make no difference because I am replacing it the workspace
I am currently in the same situation having the same problem: I have followed the installation guide, adding only the installation of onnx through pip install, and the execution of train.py is stuck on "waiting for first data". Has someone found a solution so far?
I am currently in the same situation having the same problem: I have followed the installation guide, adding only the installation of onnx through pip install, and the execution of train.py is stuck on "waiting for first data". Has someone found a solution so far?
I have the same problem too @rubengrandia may we have some suggestions please? CC: @Toto-0
I have the same problems like you. when I execute the train.py, it always stuck on "waiting for the first data". Has someone found a solution now? @Toto-0 @STaliani