ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Using diff_drive, problem with our hw_interface

asked 2020-03-02 14:59:48 -0500

ndimick gravatar image

Scenario: We (me and @pitosalas) have built a robot (basic diff_drive configuration) and are in the process of implementing our own hw_interface by looking at a variety of sources, particularly My Mobile Robot (https://github.com/eborghi10/my_ROS_m...) [MMR] and Boilerplate (https://github.com/PickNikRobotics/ro...). Here is our source the hw_interface (in case that's useful): https://gist.github.com/NateDimick/bd...

The reason we abandoned the boilerplate is it wasn't clear how to complete the needed methods of boilerplate whereas MMR seemed easier to understand.

Now we are stuck because our code is failing on a link error that we don't understand. Maybe someone will see what we're missing?

Here's the log of our session: https://gist.github.com/NateDimick/a0...

I know its a lot, but we are stuck so maybe you can give a pointer. These are the key lines with the error:

CMakeFiles/hw_interface_node.dir/src/hw_interface.cpp.o: In function `main':
hw_interface.cpp:(.text+0xc7): undefined reference to `controller_manager::ControllerManager::ControllerManager(hardware_interface::RobotHW*, ros::NodeHandle const&)'
hw_interface.cpp:(.text+0x22a): undefined reference to `controller_manager::ControllerManager::update(ros::Time const&, ros::Duration const&, bool)'
hw_interface.cpp:(.text+0x2e1): undefined reference to `controller_manager::ControllerManager::~ControllerManager()'
collect2: error: ld returned 1 exit status

Thanks for any help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-03-02 16:17:34 -0500

gvdhoorn gravatar image

Here is our source the hw_interface

why show a single file and not share the complete package?

A linker error is almost always caused by a missing dependency in your CMakeLists.txt. In this case, have you added controller_manager to the find_package(catkin COMPONENTS ..) call?

edit flag offensive delete link more

Comments

@gvdhoorn Thanks for your answer! and you were right, controller_manager was missing from CMakeLists.txt.

Follow up: we are now at a point where when our diff_drive_controller is not subscribing to cmd_vel? Honestly we're not even sure if the controller is running properly at all. Here is a link to our package with all relevant files to this problem: https://github.com/NateDimick/public_...

Any help is appreciated, everything related to diff_drive_controller has been a nightmare for us so far.

ndimick gravatar image ndimick  ( 2020-03-02 17:22:21 -0500 )edit

Please don't post follow-up questions as comments to answers to other questions.

Post a new one.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-03 01:26:36 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-03-02 14:57:17 -0500

Seen: 378 times

Last updated: Mar 02 '20