# Error compiling send\_goal function of action client - WallFollower Project

**URL:** <https://get-help.theconstruct.ai/t/error-compiling-send-goal-function-of-action-client-wallfollower-project/23051>\
**Category:** ROS2 Basics in 5 Days (C++)\
**Tags:** error\
**Created:** [March 13, 2023, 6:09pm UTC](https://get-help.theconstruct.ai/t/error-compiling-send-goal-function-of-action-client-wallfollower-project/23051 "2023-03-13T18:09:59Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [March 16, 2023, 4:44am UTC](https://get-help.theconstruct.ai/t/error-compiling-send-goal-function-of-action-client-wallfollower-project/23051/7 "2023-03-16T04:44:21Z")

</div>

Hi @w.ronaldo.cd ,

Here is a simple trick to understand long error outputs: It is usually the reference to the first line of error that has the actual bug. The remaining errors are caused because of the first error.

In your case, The first error is this part:

> [@w.ronaldo.cd](#):
>
> ```auto
> /home/user/ros2_ws/src/Wall Follower/wall_follower/src/wall_follower_part3.cpp: In member function 'void WallFollower::send_goal()':
> /home/user/ros2_ws/src/Wall Follower/wall_follower/src/wall_follower_part3.cpp:119:66: error: no match for 'operator=' (operand types are 'rclcpp_action::Client<custom_interfaces::action::OdomRecord>::GoalResponseCallback' {aka 'std::function<void(std::shared_future<std::shared_ptr<rclcpp_action::ClientGoalHandle<custom_interfaces::action::OdomRecord> > >)>'} and 'std::_Bind_helper<false, void (WallFollower::*)(const std::shared_ptr<rclcpp_action::ClientGoalHandle<custom_interfaces::action::OdomRecord> >&), WallFollower*, const std::_Placeholder<1>&>::type' {aka 'std::_Bind<void (WallFollower::*(WallFollower*, std::_Placeholder<1>))(const std::shared_ptr<rclcpp_action::ClientGoalHandle<custom_interfaces::action::OdomRecord> >&)>'})
> 119 | std::bind(&WallFollower::goal_response_callback, this, _1);
> |         
> 
> ```

The other error outputs are just irrelevant and will just make you nervous. So don’t panic!

So the error says operator mismatch in the line:  
`std::bind(&WallFollower::goal_response_callback, this, _1);`.

I know exactly, why you are getting this error.  
**Reason:** The rosject uses `Foxy` as ROS2 version while You have learned ROS2 Basics with `Humble`.  
There was a major syntax difference in Goal Response Callback function.  
So the error is not in the reported line but the function itself!  
Handling these errors requires some finesse which you will develop as you code.

ROS2 Foxy GoalResponseCallback:

```c++
void goal_response_callback(std::shared_future<GoalHandleOdomRecord::SharedPtr> future)
{
    // ...
}

```

ROS2 Humble GoalResponseCallback:

```c++
void goal_response_callback(const GoalHandleOdomRecord::SharedPtr & goal_handle)
{
    // ...
}

```

Do you notice the function definition difference here?

So just use the `Foxy` version’s definition in your Rosject. This will fix your issue.

Sorry, I could not identify this error earlier. My bad. Thanks for your patience. Much appreciated!

Let me know if this gets your problem fixed. I believe this should get your issue fixed.

Regards,  
Girish

---

_[View the full topic](https://get-help.theconstruct.ai/t/error-compiling-send-goal-function-of-action-client-wallfollower-project/23051)._
