Hello,
I would like to know which simulator is the best to make a lot a simulations. In order to try evolutionary or reinforcement learning algorithms (could requires 500 000 simulations for instance).
Usually, I use only a low level physic engine like ODE in C++ to skip any unnecessary computations.
I’m afraid that using python + v-rep is too slow.
Could it be possible to use C++ instead of python ? I know v-rep can, but will poppy be controllable?
I saw a poppy package for ros and gazebo.
2) Will it be faster than v-rep + pypot ?
3) Is it possible to control poppy with a gazebo plugin (in c++) without ROS ?
In your case, the major problem is the computation time of the physic engine. Except if you have a very heavy algorithm, the difference between Python and C++ will be insignificant.
There is a no-display mode with v-rep, it is convenient when you want to launch several experimentations at the same time. Maybe @Pierre has more experience using v-rep for big batch of experimentation ?
If you rather prefer to use gazebot, there is the URDF file, you can import it.
For the ROS implementation, maybe @Manon has more information ?
Gazebo can be used without ROS, I have no idea if it will be faster than v-rep. My Gazebo-expert collegue will be there on Monday if you have more precise questions.
Using C++ to control the robot should not be complicated, you only have to implement a few serial commands. After that, if you want to re-code the whole pypot in C++… make it public !
I completely agree with @Matthieu, the real bottleneck of what you want to do will be the physic simulation and/or the evolutionary algorithm you want to use.
Pypot basically just send commands either to v-rep (by sending a few message on a socket…) or on real motors (using the serial communication). In both cases it uses the standard C library underneath. So re-writting this in c++ would basically change nothing
I agree with @Pierre, for instance, to do complex mathematical operations (matrix multiplication), I wanted to use C operations instead of Python but numpy library made for scientific computation is already optimized and uses C code functions (open BLAS). This is not on the language that pypot can be faster. We have to see the hardware before.
The algorithms can be heavy (for instance thousands of backpropagation with neural networks at almost each time step) and they are already developed in c++.
Finally for these 3 reasons, I used the poppy .ttt scene file and control the robot with the c++ api and the no-display mode.
Indeed the time used for communication between python and v-rep will be insignificant compare to the physic motor and the algorithm. Thus, the choose of the c++ is more to keep the compatibility with my others environments than for performance.