Closed Saeed-Mansouri closed 1 year ago
Hi @Saeed-Mansouri
There's a few things to check as hinted by the error message
The controller name does not match the name exported by CONTROLLER_CONSTRUCTOR
For lipm_walking_controller, that's in src/lib.cpp
. Make sure the name in the CONTROLLER_CONSTRUCTOR
macro is indeed XO
The controller library is not in a path read by mc_rtc
That would be the case if you did not installed in a destination configured inControllerModulePaths
but given the configuration is loaded from /usr/local/lib/mc_controller/etc
I am going to assume this part is ok (i.e. you have `/usr/local/lib/mc_controller/xo_controller.so``)
The controller library hasn't been properly linked
This is the most common issue.
As a first step, run: ldd /usr/local/lib/mc_controller/xo_controller.so
. If some files are not found then you should figure out why.
If that does not work, prefix the command with LD_DEBUG=libs
(e.g. LD_DEBUG=libs mc_rtc_ticker 2> ld.log
) then scan the output for errors. Note that some errors are normal (everything with _LTX_
in it, errors about LOAD_GLOBAL
and errors about create_args_required
). Specifically look around the part where the load of xo_controller.so
is happening.
The controller constuctor segfaults
That one should probably be removed. It is not caught by mc_rtc anymore.
Thank you for your assistance! It's quite interesting that the issue has been resolved by simply shutting down the PC and starting it again. Sometimes, a good old restart does the magic. Now, everything is working well without any changes or rebuilds. Thank you again for your support!
I am seeking assistance with adding a new controller to
mc_rtc
. Here are the steps I've taken so far:Copied the
lipm_walking_controller
folder and pasted it. Renamed the copied folder toxo_controller
. Changed the controller's defined name from "LIPMWalking" to "XO". Removed the build folders for bothmc_rtc
andxo_controller
. Rebuilt the projects. However, I encountered the following errors when attempting to run the new controller:I would greatly appreciate any assistance in resolving these issues and successfully running the new controller.
Thank you in advance for your help!