Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colcon build error #147

Open
XZ-Niupitang opened this issue Mar 3, 2023 · 2 comments
Open

colcon build error #147

XZ-Niupitang opened this issue Mar 3, 2023 · 2 comments

Comments

@XZ-Niupitang
Copy link

XZ-Niupitang commented Mar 3, 2023

/ROS/src/ros_tutorials/turtlesim/tutorials/teleop_turtle_key.cpp:200:5: error: no match for ‘operator=’ (operand types are ‘rclcpp_action::Client<turtlesim::action::RotateAbsolute>::GoalResponseCallback’ {aka ‘std::function<void(std::shared_ptr<rclcpp_action::ClientGoalHandle<turtlesim::action::RotateAbsolute> >)>’} and ‘TeleopTurtle::sendGoal(float)::<lambda(std::shared_future<std::shared_ptr<rclcpp_action::ClientGoalHandle<turtlesim::action::RotateAbsolute> > >)>’)
  200 |     };
      |     ^

After the error is reported here, teleop_turtle_key.cpp is canceled the sendGoal () function in the compilation is normal, what is the problem?

void TeleopTurtle::sendGoal(float theta)
{
  auto goal = turtlesim::action::RotateAbsolute::Goal();
  goal.theta = theta;
  auto send_goal_options = rclcpp_action::Client<turtlesim::action::RotateAbsolute>::SendGoalOptions();
  // send_goal_options.goal_response_callback =
  //   [this](std::shared_future<rclcpp_action::ClientGoalHandle<turtlesim::action::RotateAbsolute>::SharedPtr> future)
  //   {
  //     RCLCPP_DEBUG(nh_->get_logger(), "Goal response received");
  //     this->goal_handle_ = future.get();
  //   };
  rotate_absolute_client_->async_send_goal(goal, send_goal_options);
}
@mjcarroll
Copy link
Member

We are going to need more information about which platform and versions you are using.

@XZ-Niupitang
Copy link
Author

我们将需要有关您正在使用的平台和版本的更多信息。

The system version is Ubuntu 22.04LTS,The ROS2 environment is humble,After logging out, it is running normally. Creating a package or node under the workspace can compile and work normally. I just want to know whether the code I logged out will cause ROS2 to run incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants