Package Summary

Tags No category tags.
Version 0.20.2
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros2/demos.git
VCS Type git
VCS Version humble
Last Updated 2022-12-05
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

C++ action tutorial cpp code

Additional Links

No additional links.

Maintainers

  • Audrow Nash
  • Michael Jeronimo

Authors

  • Jacob Perron
  • Mabel Zhang
README
No README found. No README in repository either.
CHANGELOG

Changelog for package action_tutorials_cpp

0.20.2 (2022-05-10)

0.20.1 (2022-04-08)

0.20.0 (2022-03-01)

0.19.0 (2022-01-14)

0.18.0 (2021-12-17)

  • Update maintainers to Audrow Nash and Michael Jeronimo (#543)
  • Contributors: Audrow Nash

0.17.0 (2021-10-18)

0.16.0 (2021-08-11)

0.15.0 (2021-05-14)

0.14.2 (2021-04-26)

0.14.1 (2021-04-19)

0.14.0 (2021-04-06)

0.13.0 (2021-03-25)

0.12.1 (2021-03-18)

0.12.0 (2021-01-25)

  • Update logging macros (#476)
  • Contributors: Audrow Nash

0.11.0 (2020-12-10)

  • Update the package.xml files with the latest Open Robotics maintainers (#466)
  • Contributors: Michael Jeronimo

0.10.1 (2020-09-21)

  • Update goal response callback signature (#463)
  • Contributors: Jacob Perron

0.10.0 (2020-06-17)

0.9.3 (2020-06-01)

0.9.2 (2020-05-26)

0.9.1 (2020-05-12)

0.9.0 (2020-04-30)

0.8.4 (2019-11-19)

  • Return without sending goal if exiting (#415)
  • Contributors: Shane Loretz

0.8.3 (2019-11-11)

0.8.2 (2019-11-08)

0.8.1 (2019-10-23)

0.8.0 (2019-09-26)

  • Add action tutorials in C++ (#378)
  • Contributors: Siddharth Kucheria

0.7.6 (2019-05-30)

0.7.5 (2019-05-29)

0.7.4 (2019-05-20)

0.7.3 (2019-05-10)

0.7.2 (2019-05-08)

0.7.1 (2019-04-26)

0.7.0 (2019-04-14)

0.6.2 (2019-01-15)

0.6.1 (2018-12-12)

0.6.0 (2018-12-07)

0.5.1 (2018-06-28)

0.5.0 (2018-06-27)

0.4.0 (2017-12-08)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged action_tutorials_cpp at answers.ros.org

Package Summary

Tags No category tags.
Version 0.9.4
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros2/demos.git
VCS Type git
VCS Version foxy
Last Updated 2022-07-25
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

C++ action tutorial cpp code

Additional Links

No additional links.

Maintainers

  • Mabel Zhang
  • Michael Jeronimo

Authors

  • Jacob Perron
README
No README found. No README in repository either.
CHANGELOG

Changelog for package action_tutorials_cpp

0.9.4 (2022-07-25)

  • Update maintainer list for Foxy (#471)
  • Contributors: Michael Jeronimo

0.9.3 (2020-06-01)

0.9.2 (2020-05-26)

0.9.1 (2020-05-12)

0.9.0 (2020-04-30)

0.8.4 (2019-11-19)

  • Return without sending goal if exiting (#415)
  • Contributors: Shane Loretz

0.8.3 (2019-11-11)

0.8.2 (2019-11-08)

0.8.1 (2019-10-23)

0.8.0 (2019-09-26)

  • Add action tutorials in C++ (#378)
  • Contributors: Siddharth Kucheria

0.7.6 (2019-05-30)

0.7.5 (2019-05-29)

0.7.4 (2019-05-20)

0.7.3 (2019-05-10)

0.7.2 (2019-05-08)

0.7.1 (2019-04-26)

0.7.0 (2019-04-14)

0.6.2 (2019-01-15)

0.6.1 (2018-12-12)

0.6.0 (2018-12-07)

0.5.1 (2018-06-28)

0.5.0 (2018-06-27)

0.4.0 (2017-12-08)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged action_tutorials_cpp at answers.ros.org

Package Summary

Tags No category tags.
Version 0.23.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros2/demos.git
VCS Type git
VCS Version rolling
Last Updated 2022-12-07
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

C++ action tutorial cpp code

Additional Links

No additional links.

Maintainers

  • Aditya Pande
  • Audrow Nash
  • Michael Jeronimo

Authors

  • Jacob Perron
  • Mabel Zhang

Action Server

In the constructor for FibonacciActionServer, an action server is created with callbacks that are called when a goal is received, when the goal is cancelled, and when the goal is accepted:

this->action_server_ = rclcpp_action::create_server<Fibonacci>(
  ...
  "fibonacci",
  std::bind(&FibonacciActionServer::handle_goal, this, _1, _2),
  std::bind(&FibonacciActionServer::handle_cancel, this, _1),
  std::bind(&FibonacciActionServer::handle_accepted, this, _1));

The handle_goal callback is called whenever a goal is sent to the action server by an action client. In the example code, the goal is accepted as long as the order is less than or equal to 46, otherwise it is rejected. This is to prevent potential integer overflow:

if (goal->order > 46) {
  return rclcpp_action::GoalResponse::REJECT;
}
return rclcpp_action::GoalResponse::ACCEPT_AND_EXECUTE;

The handle_cancelled callback is called whenever an action client requests to cancel the goal being executed. In this case, the goal cancel request is always accepted.

The handle_accepted callback is called following the action server's acceptance of a goal. In this example, a thread is started to execute the goal:

std::thread{std::bind(&FibonacciActionServer::execute, this, _1), goal_handle}.detach();

The execution thread calculates the Fibonacci sequence up to order and publishes partial sequences as feedback as each item is added to the sequence.

A rclcpp::Rate object is used to sleep between the calculation of each item in order to represent a long-running task.

When execution is complete, the full sequence is returned to the action client. If the goal is cancelled during execution, no result is returned, however the caller may have received partial sequences as feedback up until cancelling.

Action Client

In the constructor for FibonacciActionClient, and action client for the fibonacci action is created:

this->client_ptr_ = rclcpp_action::create_client<Fibonacci>(
      ...
      "fibonacci");

A goal of type Fibonacci is created with order 10. The goal is sent asynchronously with callbacks registered for the goal response, the feedback, and the goal result:

auto send_goal_options = rclcpp_action::Client<Fibonacci>::SendGoalOptions();
send_goal_options.goal_response_callback =
  std::bind(&FibonacciActionClient::goal_response_callback, this, _1);
send_goal_options.feedback_callback =
  std::bind(&FibonacciActionClient::feedback_callback, this, _1, _2);
send_goal_options.result_callback =
  std::bind(&FibonacciActionClient::result_callback, this, _1);
this->client_ptr_->async_send_goal(goal_msg, send_goal_options);

There are three types of callback functions:

  • The goal_response_callback is called when the action server accepts or rejects the goal.
  • The feedback_callback is called whenever the action server sends goal execution feedback.
  • The goal_result_callback is called when the action server is finished executing the goal and returns the result of the goal which is the full or partial Fibonacci sequence.
CHANGELOG

Changelog for package action_tutorials_cpp

0.23.0 (2022-11-02)

0.22.0 (2022-09-13)

  • Fix two small bugs in the fibonacci C++ tutorial. (#564)
  • Contributors: Chris Lalancette

0.21.0 (2022-04-29)

0.20.1 (2022-04-08)

0.20.0 (2022-03-01)

0.19.0 (2022-01-14)

0.18.0 (2021-12-17)

  • Update maintainers to Audrow Nash and Michael Jeronimo (#543)
  • Contributors: Audrow Nash

0.17.0 (2021-10-18)

0.16.0 (2021-08-11)

0.15.0 (2021-05-14)

0.14.2 (2021-04-26)

0.14.1 (2021-04-19)

0.14.0 (2021-04-06)

0.13.0 (2021-03-25)

0.12.1 (2021-03-18)

0.12.0 (2021-01-25)

  • Update logging macros (#476)
  • Contributors: Audrow Nash

0.11.0 (2020-12-10)

  • Update the package.xml files with the latest Open Robotics maintainers (#466)
  • Contributors: Michael Jeronimo

0.10.1 (2020-09-21)

  • Update goal response callback signature (#463)
  • Contributors: Jacob Perron

0.10.0 (2020-06-17)

0.9.3 (2020-06-01)

0.9.2 (2020-05-26)

0.9.1 (2020-05-12)

0.9.0 (2020-04-30)

0.8.4 (2019-11-19)

  • Return without sending goal if exiting (#415)
  • Contributors: Shane Loretz

0.8.3 (2019-11-11)

0.8.2 (2019-11-08)

0.8.1 (2019-10-23)

0.8.0 (2019-09-26)

  • Add action tutorials in C++ (#378)
  • Contributors: Siddharth Kucheria

0.7.6 (2019-05-30)

0.7.5 (2019-05-29)

0.7.4 (2019-05-20)

0.7.3 (2019-05-10)

0.7.2 (2019-05-08)

0.7.1 (2019-04-26)

0.7.0 (2019-04-14)

0.6.2 (2019-01-15)

0.6.1 (2018-12-12)

0.6.0 (2018-12-07)

0.5.1 (2018-06-28)

0.5.0 (2018-06-27)

0.4.0 (2017-12-08)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged action_tutorials_cpp at answers.ros.org

Package Summary

Tags No category tags.
Version 0.8.4
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros2/demos.git
VCS Type git
VCS Version eloquent
Last Updated 2020-11-04
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

C++ action tutorial cpp code

Additional Links

No additional links.

Maintainers

  • Mabel Zhang
  • Michael Jeronimo

Authors

  • Jacob Perron
README
No README found. No README in repository either.
CHANGELOG

Changelog for package action_tutorials_cpp

0.8.4 (2019-11-19)

  • Return without sending goal if exiting (#415)
  • Contributors: Shane Loretz

0.8.3 (2019-11-11)

0.8.2 (2019-11-08)

0.8.1 (2019-10-23)

0.8.0 (2019-09-26)

  • Add action tutorials in C++ (#378)
  • Contributors: Siddharth Kucheria

0.7.6 (2019-05-30)

0.7.5 (2019-05-29)

0.7.4 (2019-05-20)

0.7.3 (2019-05-10)

0.7.2 (2019-05-08)

0.7.1 (2019-04-26)

0.7.0 (2019-04-14)

0.6.2 (2019-01-15)

0.6.1 (2018-12-12)

0.6.0 (2018-12-07)

0.5.1 (2018-06-28)

0.5.0 (2018-06-27)

0.4.0 (2017-12-08)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged action_tutorials_cpp at answers.ros.org

Package Summary

Tags No category tags.
Version 0.14.4
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros2/demos.git
VCS Type git
VCS Version galactic
Last Updated 2022-12-07
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

C++ action tutorial cpp code

Additional Links

No additional links.

Maintainers

  • Mabel Zhang
  • Michael Jeronimo

Authors

  • Jacob Perron
README
No README found. No README in repository either.
CHANGELOG

Changelog for package action_tutorials_cpp

0.14.4 (2022-12-06)

0.14.3 (2021-05-10)

0.14.2 (2021-04-26)

0.14.1 (2021-04-19)

0.14.0 (2021-04-06)

0.13.0 (2021-03-25)

0.12.1 (2021-03-18)

0.12.0 (2021-01-25)

  • Update logging macros (#476)
  • Contributors: Audrow Nash

0.11.0 (2020-12-10)

  • Update the package.xml files with the latest Open Robotics maintainers (#466)
  • Contributors: Michael Jeronimo

0.10.1 (2020-09-21)

  • Update goal response callback signature (#463)
  • Contributors: Jacob Perron

0.10.0 (2020-06-17)

0.9.3 (2020-06-01)

0.9.2 (2020-05-26)

0.9.1 (2020-05-12)

0.9.0 (2020-04-30)

0.8.4 (2019-11-19)

  • Return without sending goal if exiting (#415)
  • Contributors: Shane Loretz

0.8.3 (2019-11-11)

0.8.2 (2019-11-08)

0.8.1 (2019-10-23)

0.8.0 (2019-09-26)

  • Add action tutorials in C++ (#378)
  • Contributors: Siddharth Kucheria

0.7.6 (2019-05-30)

0.7.5 (2019-05-29)

0.7.4 (2019-05-20)

0.7.3 (2019-05-10)

0.7.2 (2019-05-08)

0.7.1 (2019-04-26)

0.7.0 (2019-04-14)

0.6.2 (2019-01-15)

0.6.1 (2018-12-12)

0.6.0 (2018-12-07)

0.5.1 (2018-06-28)

0.5.0 (2018-06-27)

0.4.0 (2017-12-08)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged action_tutorials_cpp at answers.ros.org