A ROS wrapper for ORCA.

Introduction

The basic idea behind this library is to wrap the entirety of the ORCA library and expose the public class interfaces using service and topics.

In order to enable distributed control of the various orca classes, each class has a wrapper and a proxy. The wrapper must be instantiated when the orca class is created. The wrapper gives access to the classes public member functions via services. These services are called from the class proxies. Class proxies provide virtually identical public interfaces to the orca classes they wrap, and behind the scenes make ROS service calls to execute functions in the class wrapper. For example take the following pseudo-code:

*controller_node*

1 auto orca_task = std::make_shared<orca::task::CartesianTask>(...);
2 orca_ros::task::RosCartesianTask(robot_name, controller_name, orca_task);
3 
4 ...
5 
6 while(ros::ok())
7 {
8  // execute control loop
9 }

*task_proxy_node*

1 orca_ros::task::RosCartesianTaskProxy cart_task_proxy(robot_name, controller_name, task_name);
2 
3 while(ros::ok())
4 {
5  std::cout << "Postion Reference:\n" << cart_task_proxy.servoController()->getDesiredCartesianPose() << "\n";
6 }

In the controller_node we see that the only line that is needed to wrap the orca::task::CartesianTask is orca_ros::task::RosCartesianTask(robot_name, controller_name, orca_task);. We just have to make sure the RosCartesianTask object doesn't go out of scope in order to keep the services alive.

On the task_proxy_node side of things we need 3 pieces of information: the robot, controller and task names. With these three strings we can connect to the CartesianTask using the RosCartesianTaskProxy object and control it remotely from this node. In the example we are simply getting the current position reference from the internal servo controller.

Run the example:

Requires Gazebo and RViz

1 roslaunch orca_ros orca_ros_rviz_demo.launch