Closed HN11 closed 7 years ago
The definition of SimpleController was moved to the Body module, and the definition of SimpleControllerItem was moved to the BodyPlugin. The document has not been updated yet, I'm sorry about it.
Do you mean there are still some plugins that needs to enable SimpleControllerPlugin? Which plugins?
This is the error I received : CMake Warning at sample/SpringModel/CMakeLists.txt:14 (message): The spring model sample controller needs SimpleControllerPlugin.
I also have another question from this tutorial,
I don't understand what this part of the manual means => {
As for compile, it is described in:
add_cnoid_simple_controller(SR1MinimumController SR1MinimumController.cpp)
in CMakeList.txt unde the same directory. See “src/SimpleControllerPlugin/library/CMakeLists.txt” for detail of this function. Basically, it is OK to link with the library “CnoidSimplerController”. (In case of Linux, the file name of the library will be “libCnoidCimpleController.so”. } How should I exactly compile my code and create the shared object (.so) file ? should I treat my code like a usual cpp code or there are special ways for compiling and creating shared object file ?!
Actually, my final goal is to code a controller for my own robot so I was trying to understand how the samples have been coded and used in sampled .cnoid files. Am I obligated to write my code using simplecontroller header , generate .so file (or .dll in case of windows) and then insert it as "controller module" for SimpleController Item in choreonoid ?! What's the best procedure of having my original controller for the model ?!
The spring model sample controller needs SimpleControllerPlugin.
Thank you for informing this. I fixed this problem. f4f1aacf08105e4fb46cc2eae99c21cd25524d4b
should I treat my code like a usual cpp code or there are special ways for compiling and creating shared object file ?!
Usually you can use the add_cnoid_simple_controller function described in the document. If you want to know what the function exactly does, please refer to the implementation of the function. It is implemented in src/Body/CMakeLists.txt.
What's the best procedure of having my original controller for the model ?!
It depends on the situation. If you need inter-process communication or network communication, it might be better to use OpenRTM (RT-Components). Or there will be an option to use ROS. Now I'm developing ROSPlugin for this purpose.
thanks for your consideration :))
What should be the true result of recording a video out of simulation in choreonoid? Cause I receive lots of frames in .png format when I try to record my simulation !
That is a right result. You can use "ffmpeg" command, for example, to generate a movie file from the sequential image files
ffmpeg -r 30 -i scene%08d.png -r 30 movie.mp4