Skip to content

Commit

Permalink
Fix ForwardCommandController linker error.
Browse files Browse the repository at this point in the history
Provide an implementation of ForwardCommandController<T>::starting,
because it is not provided in the header.

Instead, it is in the source file joint_effort_controller.cpp.

Related: RethinkRobotics#55.
  • Loading branch information
bhaskara committed Sep 22, 2016
1 parent 6318738 commit e03655d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions baxter_sim_controllers/src/baxter_effort_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
#include <baxter_sim_controllers/baxter_effort_controller.h>
#include <pluginlib/class_list_macros.h>

// Note copied from joint_effort_controller.cpp to avoid a linker error on clang
template <class T>
void forward_command_controller::ForwardCommandController<T>::starting(const ros::Time& time)
{
// Start controller with 0.0 effort
command_buffer_.writeFromNonRT(0.0);
}


namespace baxter_sim_controllers {

Expand Down

1 comment on commit e03655d

@lloydc99
Copy link

@lloydc99 lloydc99 commented on e03655d Nov 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same way I fixed my code to get past the link error.
It appears to be the same way it is handled in the example implementations.
I do not have a functioning install yet to confirm it works.

Please sign in to comment.