After following the Unit 7 without problems, the final steps ended up in the error in the image. Gazebo was launched, but when the robot is spawned, the gazebo terminal gives this error. I have checked, and PLUGINLIB_EXPORT_CLASS is at the end of the file. I have revisited all the files, re-copied them, restarted all the terminals, but the error continues. Any suggestions?
Thank you!
I think you are missing a dependency either in your CMakeLists.txt file or package.xml file or in both.
If you could post your CMakeLists.txt, package.xml and the controller config yaml file here, that would be helpful to debug your issue.
Also, please post your file contents as pre-formatted text (markdown formatted code-block). Otherwise it will be hard to read and debug your issue.
# Controller manager configuration
controller_manager:
ros__parameters:
update_rate: 50 # Hz
# Define a name for controllers that we plan to use
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
rrbot_controller:
type: rrbot_controller/RRBotController
# Properties of the custom controler and definition of joints to use
rrbot_controller:
ros__parameters:
joints:
- joint1
- joint2
interface_name:
position
Hi,
I have checked your code and I can see two things:
This kind of error (undefined symbol) usually happens when there is a problem with previous compilations which are mixing with the new ones. If this error happens to you, first thing is to delete the build and install directories and recompile from zero. Then try again. If the error still persists, then there is a problem with the libraries you need to be including.
I think in your case is just a compilation mixing. So I cleared your build and install and recompiled.
So you have an error in the configuration yaml file.
If you do an ls you will find that:
user:~$ ls /home/user/ros2_ws/install/rrbot_controller/share/rrbot_controller/config/rrbot_controllers_custom.yaml
ls: cannot access '/home/user/ros2_ws/install/rrbot_controller/share/rrbot_controller/config/rrbot_controllers_custom.yaml': No such file or directory
So your yaml config file is not being installed in the install directory. That is a problem with your CMakeLists.txt file. Please modify that file so the config file is installed and let me know if that works or still more problems there