[ros-users] Problem with dynamic reconfigure

Blaise Gassend blaise at willowgarage.com
Sun Jan 30 17:10:27 UTC 2011


On Sun, Jan 30, 2011 at 5:48 AM, Zhiping <TANZ0066 at e.ntu.edu.sg> wrote:
>
> Hi guys,
>
> I have made these amendments in trajectory_planner.cpp in order to include
> the dynamic reconfigure inside the program.
>
> 1) Insert TrajectoryPlanner::reconfigureCB function in line 46
>
>   void TrajectoryPlanner::reconfigureCB(base_local_planner::MyStuffConfig
> &config, uint32_t level)
>
> 2) initiates statement in line 117
>
>    //dynamic_reconfigure Setup                                                                                                 <---------------- Amend part
>    dynamic_reconfigure::Server<base_local_planner::MyStuffConfig> srv;
>
> dynamic_reconfigure::Server<base_local_planner::MyStuffConfig>::CallbackType
> f = boost::bind(&TrajectoryPlanner::reconfigureCB, _1, _2);
>    srv.setCallback(f);
>    //-end
>
> This is the error being prompt:
>  /usr/include/boost/bind/bind.hpp:69: error: ‘void
> (base_local_planner::TrajectoryPlanner::*)(base_local_planner::MyStuffConfig&,
> uint32_t)’ is not a class, struct, or union type
>
> What should i do to resolve this error?

In your bost::bind call, the second argument should be the instance of
TrajectoryPlanner that the reconfigureCB method should be called on. I
think that something like this will work (or at least will lead you to
the next error):

f = boost::bind(&TrajectoryPlanner::reconfigureCB,
my_trajectory_planner, _1, _2);



More information about the ros-users mailing list