|
From: <mee...@us...> - 2009-08-13 00:28:40
|
Revision: 21741
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21741&view=rev
Author: meeussen
Date: 2009-08-13 00:28:28 +0000 (Thu, 13 Aug 2009)
Log Message:
-----------
reorganize controller access through interface class on mc and put controller base class in separate package
Modified Paths:
--------------
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h
pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h
pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h
pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/trigger_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/joint_trajectory_controller2.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h
pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_spec.h
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/mechanism_control.h
pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml
pkg/trunk/stacks/mechanism/mechanism_control/src/mechanism_control.cpp
Added Paths:
-----------
pkg/trunk/stacks/mechanism/controller_interface/
pkg/trunk/stacks/mechanism/controller_interface/CMakeLists.txt
pkg/trunk/stacks/mechanism/controller_interface/Makefile
pkg/trunk/stacks/mechanism/controller_interface/include/
pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/
pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller.h
pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller_provider.h
pkg/trunk/stacks/mechanism/controller_interface/mainpage.dox
pkg/trunk/stacks/mechanism/controller_interface/manifest.xml
pkg/trunk/stacks/mechanism/controller_interface/src/
Removed Paths:
-------------
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller.h
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_handle.h
pkg/trunk/stacks/mechanism/mechanism_control/src/controller_handle.cpp
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/arm_trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -37,7 +37,7 @@
#include <ros/node.h>
#include <boost/thread/mutex.hpp>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_position_controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
#include <robot_mechanism_controllers/joint_effort_controller.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/base_kinematics.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
*/
#include <mechanism_model/robot.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <geometry_msgs/Twist.h>
#include <geometry_msgs/Point.h>
#include <control_toolbox/filters.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -44,7 +44,7 @@
#include "ros/node_handle.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "mechanism_model/robot.h"
#include "control_toolbox/pid.h"
#include "robot_mechanism_controllers/joint_velocity_controller.h"
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/caster_controller_effort.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -41,7 +41,7 @@
#ifndef CASTER_CONTROLLER_EFFORT_H
#define CASTER_CONTROLLER_EFFORT_H
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "mechanism_model/robot.h"
#include "control_toolbox/pid.h"
#include "robot_mechanism_controllers/joint_velocity_controller.h"
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_position_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -41,7 +41,7 @@
#include <ros/node.h>
#include <ros/node_handle.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_listener.h>
#include <tf/message_notifier.h>
#include <tf/transform_datatypes.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/head_servoing_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -39,7 +39,7 @@
#include <ros/node.h>
#include <ros/node_handle.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_listener.h>
#include <tf/message_notifier.h>
#include <tf/transform_datatypes.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/joint_trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -37,7 +37,7 @@
#include <ros/node.h>
#include <boost/thread/mutex.hpp>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_pd_controller.h>
// Services
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_qualification.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
// Services
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/laser_scanner_traj_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_position_smoothing_controller.h>
#include <realtime_tools/realtime_publisher.h>
Modified: pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h
===================================================================
--- pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/pr2_mechanism_controllers/include/pr2_mechanism_controllers/pr2_gripper_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -37,7 +37,7 @@
#include <ros/node.h>
#include <mechanism_model/robot.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_effort_controller.h>
#include <pr2_mechanism_controllers/GripperControllerCmd.h>
#include <pr2_msgs/GripperControllerState.h>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/checkout_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -52,7 +52,7 @@
#include <math.h>
#include <joint_qualification_controllers/RobotData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <boost/scoped_ptr.hpp>
namespace controller
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hold_set_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -50,7 +50,7 @@
#include <math.h>
#include <joint_qualification_controllers/HoldSetData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_position_controller.h>
#include <control_toolbox/dither.h>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/hysteresis_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -49,7 +49,7 @@
#include <math.h>
#include <joint_qualification_controllers/TestData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/joint_velocity_controller.h>
#include <boost/scoped_ptr.hpp>
Modified: pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h
===================================================================
--- pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/qualification_controllers/joint_qualification_controllers/include/joint_qualification_controllers/sine_sweep_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -47,7 +47,7 @@
#include <math.h>
#include <joint_qualification_controllers/TestData.h>
#include <realtime_tools/realtime_srv_call.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/sine_sweep.h>
#include <boost/scoped_ptr.hpp>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_hybrid_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -32,7 +32,7 @@
#include "ros/node.h"
#include "boost/scoped_ptr.hpp"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include <kdl/chain.hpp>
#include <kdl/frames.hpp>
#include "mechanism_model/chain.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_pose_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -76,7 +76,7 @@
#include <ros/node.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <realtime_tools/realtime_publisher.h>
#include <boost/scoped_ptr.hpp>
#include "robot_mechanism_controllers/cartesian_twist_controller.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_tff_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -41,7 +41,7 @@
#include <ros/node.h>
#include <manipulation_msgs/TaskFrameFormalism.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_datatypes.h>
#include <control_toolbox/pid.h>
#include <boost/scoped_ptr.hpp>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -43,7 +43,7 @@
#include <tf/message_notifier.h>
#include <ros/node.h>
#include <geometry_msgs/PoseStamped.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/cartesian_pose_controller.h>
#include <deprecated_srvs/MoveToPose.h>
#include <std_srvs/Empty.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -40,7 +40,7 @@
#include <kdl/frames.hpp>
#include <ros/node.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <tf/transform_datatypes.h>
#include <robot_mechanism_controllers/cartesian_wrench_controller.h>
#include <control_toolbox/pid.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_twist_controller_ik.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -43,7 +43,7 @@
#include <kdl/chainiksolver.hpp>
#include <ros/node.h>
#include <geometry_msgs/Twist.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
#include <control_toolbox/pid.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/cartesian_wrench_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -40,7 +40,7 @@
#include <kdl/chainjnttojacsolver.hpp>
#include <ros/node_handle.h>
#include <geometry_msgs/Wrench.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
#include <diagnostic_msgs/DiagnosticArray.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/dynamic_loader_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -34,7 +34,8 @@
#ifndef DYNAMIC_LOADER_CONTROLLER_H
#define DYNAMIC_LOADER_CONTROLLER_H
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
+#include <tinyxml/tinyxml.h>
#include <ltdl.h>
namespace controller {
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/endeffector_constraint_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -44,7 +44,7 @@
#include "ros/node.h"
#include "geometry_msgs/Wrench.h"
#include "misc_utils/subscription_guard.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "tf/transform_datatypes.h"
#include "misc_utils/advertised_service_guard.h"
#include "joy/Joy.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_autotuner.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -46,7 +46,7 @@
#include <ros/node.h>
#include <vector>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/pid.h>
// Services
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_blind_calibration_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -56,7 +56,7 @@
/***************************************************/
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "robot_mechanism_controllers/joint_velocity_controller.h"
#include "misc_utils/advertised_service_guard.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_constraint_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -62,7 +62,7 @@
#include "geometry_msgs/Wrench.h"
#include "robot_mechanism_controllers/ChangeConstraints.h"
#include "robot_mechanism_controllers/JointConstraint.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "mechanism_model/chain.h"
#include "tf/transform_datatypes.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_chain_sine_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -58,7 +58,7 @@
#ifndef JOINT_CHAIN_SINE_CONTROLLER_H_
#define JOINT_CHAIN_SINE_CONTROLLER_H_
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <kdl/chain.hpp>
#include <kdl/chainfksolver.hpp>
#include <mechanism_model/chain.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_effort_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -52,7 +52,7 @@
*/
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <std_msgs/Float64.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_inverse_dynamics_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -46,7 +46,7 @@
#include <ros/node.h>
#include <std_msgs/Float64MultiArray.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/chain.h>
#include <tf/transform_datatypes.h>
#include <diagnostic_msgs/DiagnosticArray.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_pd_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -53,7 +53,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/pid.h>
#include "misc_utils/advertised_service_guard.h"
#include "misc_utils/subscription_guard.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -60,7 +60,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/pid.h>
#include "control_toolbox/pid_gains_setter.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_smoothing_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -53,7 +53,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <control_toolbox/pid.h>
#include "misc_utils/advertised_service_guard.h"
#include "misc_utils/subscription_guard.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_velocity_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -62,7 +62,7 @@
#include <ros/node.h>
#include <ros/node_handle.h>
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "control_toolbox/pid.h"
#include "control_toolbox/pid_gains_setter.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/plug_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -48,7 +48,7 @@
#include "robot_mechanism_controllers/SetPoseStamped.h"
#include "control_toolbox/pid.h"
#include "misc_utils/subscription_guard.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "tf/transform_datatypes.h"
#include "tf/transform_listener.h"
#include "misc_utils/advertised_service_guard.h"
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/probe.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -35,7 +35,7 @@
#define PROBE_CONTROLLER_H
#include <ros/node_handle.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <robot_mechanism_controllers/JointControllerState.h>
#include <robot_mechanism_controllers/JointTuningMsg.h>
Modified: pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/trigger_controller.h
===================================================================
--- pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/trigger_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/controllers/robot_mechanism_controllers/include/robot_mechanism_controllers/trigger_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
#define TRIGGER_CONTROLLER_H
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <mechanism_model/robot.h>
#include <robot_mechanism_controllers/SetWaveform.h>
#include "hardware_interface/hardware_interface.h"
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/joint_trajectory_controller2.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/joint_trajectory_controller2.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/joint_trajectory_controller2.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -50,7 +50,7 @@
#include <ros/node_handle.h>
#include <control_toolbox/pid.h>
#include <mechanism_control/recorder.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <realtime_tools/realtime_infuser.h>
#include <manipulation_msgs/SplineTraj.h>
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/pid_position_velocity_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -63,7 +63,7 @@
#include <ros/node.h>
#include <ros/node_handle.h>
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "control_toolbox/pid.h"
#include "control_toolbox/pid_gains_setter.h"
#include "misc_utils/advertised_service_guard.h"
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/plug_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -49,7 +49,7 @@
#include "robot_srvs/SetPoseStamped.h"
#include "control_toolbox/pid.h"
#include "misc_utils/subscription_guard.h"
-#include "mechanism_control/controller.h"
+#include "controller_interface/controller.h"
#include "tf/transform_datatypes.h"
#include "tf/transform_listener.h"
#include "misc_utils/advertised_service_guard.h"
Modified: pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h
===================================================================
--- pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/sandbox/experimental_controllers/include/experimental_controllers/trajectory_controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -36,7 +36,7 @@
#include <ros/node.h>
-#include <mechanism_control/controller.h>
+#include <controller_interface/controller.h>
#include <manipulation_msgs/Waypoint.h>
Added: pkg/trunk/stacks/mechanism/controller_interface/CMakeLists.txt
===================================================================
--- pkg/trunk/stacks/mechanism/controller_interface/CMakeLists.txt (rev 0)
+++ pkg/trunk/stacks/mechanism/controller_interface/CMakeLists.txt 2009-08-13 00:28:28 UTC (rev 21741)
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 2.4.6)
+include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+
+# Set the build type. Options are:
+# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
+# Debug : w/ debug symbols, w/o optimization
+# Release : w/o debug symbols, w/ optimization
+# RelWithDebInfo : w/ debug symbols, w/ optimization
+# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
+#set(ROS_BUILD_TYPE RelWithDebInfo)
+
+rospack(controller_interface)
+
+#set the default path for built executables to the "bin" directory
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+#set the default path for built libraries to the "lib" directory
+set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
+
+#uncomment if you have defined messages
+#genmsg()
+#uncomment if you have defined services
+#gensrv()
+
+#common commands for building c++ executables and libraries
+#rospack_add_library(${PROJECT_NAME} src/example.cpp)
+#target_link_libraries(${PROJECT_NAME} another_library)
+#rospack_add_boost_directories()
+#rospack_link_boost(${PROJECT_NAME} thread)
+#rospack_add_executable(example examples/example.cpp)
+#target_link_libraries(example ${PROJECT_NAME})
Added: pkg/trunk/stacks/mechanism/controller_interface/Makefile
===================================================================
--- pkg/trunk/stacks/mechanism/controller_interface/Makefile (rev 0)
+++ pkg/trunk/stacks/mechanism/controller_interface/Makefile 2009-08-13 00:28:28 UTC (rev 21741)
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
\ No newline at end of file
Copied: pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller.h (from rev 21420, pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller.h)
===================================================================
--- pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller.h (rev 0)
+++ pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -0,0 +1,185 @@
+/*********************************************************************
+ * Software License Agreement (BSD License)
+ *
+ * Copyright (c) 2008, Willow Garage, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of the Willow Garage nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *********************************************************************/
+#pragma once
+/***************************************************/
+/*! \namespace controller
+ \brief The controller namespace
+
+ \class controller::Controller
+ \brief A base level controller class.
+
+ */
+/***************************************************/
+
+#include <ros/node_handle.h>
+#include <mechanism_model/robot.h>
+#include <loki/Factory.h>
+#include "controller_interface/controller_provider.h"
+
+
+namespace controller
+{
+
+class Controller
+{
+public:
+ enum {BEFORE_ME, AFTER_ME};
+
+ Controller(): state_(CONSTRUCTED){}
+ virtual ~Controller(){}
+
+ /// The starting method is called by the realtime thread just before the first update call
+ virtual bool starting() { return true; }
+
+ /// The update method is called periodically by the realtime thread when the controller is running
+ virtual void update(void) = 0;
+
+ /// The stopping method is called by the realtime thread just after the last update call
+ virtual bool stopping() {return true;}
+
+ /// The init function is called to initialize the controller from a non-realtime thread
+ virtual bool init(mechanism::RobotState *robot, const ros::NodeHandle &n)
+ {
+ ROS_ERROR("Controller %s did not implement init function", n.getNamespace().c_str());
+ return false;
+ }
+
+ /// Method to get access to another controller by name and type.
+ template<class ControllerType> bool getController(const std::string& name, int sched, ControllerType*& c)
+ {
+ if (contr_prov_ == NULL){
+ ROS_ERROR("No valid pointer to a controller provider exists");
+ return false;
+ }
+ if (!contr_prov_->getControllerByName(name, c)){
+ ROS_ERROR("Could not find controller %s", name.c_str());
+ return false;
+ }
+ if (sched == BEFORE_ME) before_list_.push_back(name);
+ else if (sched == AFTER_ME) after_list_.push_back(name);
+ else{
+ ROS_ERROR("No valid scheduling specified. Need BEFORE_ME or AFTER_ME in getController function");
+ return false;
+ }
+ return true;
+ }
+
+ /// Check if the controller is running
+ bool isRunning()
+ {
+ return (state_ == RUNNING);
+ }
+
+ void updateRequest()
+ {
+ if (state_ == RUNNING)
+ update();
+ }
+
+ bool startRequest()
+ {
+ bool ret = false;
+ // start succeeds even if the controller was already started
+ if (state_ == RUNNING || state_ == INITIALIZED){
+ ret = starting();
+ if (ret) state_ = RUNNING;
+ }
+ return ret;
+ }
+
+
+ bool stopRequest()
+ {
+ bool ret = false;
+ // stop succeeds even if the controller was already stopped
+ if (state_ == RUNNING || state_ == INITIALIZED){
+ stopping();
+ state_ = INITIALIZED;
+ }
+ return ret;
+ }
+
+ bool initRequest(ControllerProvider* cp, mechanism::RobotState *robot, const ros::NodeHandle &n)
+ {
+ contr_prov_ = cp;
+
+ if (state_ != CONSTRUCTED)
+ return false;
+ else
+ {
+ // initialize
+ if (!init(robot, n))
+ return false;
+ state_ = INITIALIZED;
+
+ return true;
+ }
+ }
+
+
+ std::vector<std::string> before_list_, after_list_;
+
+ enum {CONSTRUCTED, INITIALIZED, RUNNING} state_;
+
+private:
+ Controller(const Controller &c);
+ Controller& operator =(const Controller &c);
+ ControllerProvider* contr_prov_;
+
+};
+
+typedef Loki::SingletonHolder
+<
+ Loki::Factory< Controller, std::string >,
+ Loki::CreateUsingNew,
+ Loki::LongevityLifetime::DieAsSmallObjectParent
+ > ControllerFactory;
+
+Loki::Factory< controller::Controller, std::string >& getControllerFactoryInstance();
+#define ROS_REGISTER_CONTROLLER(c) \
+ extern Loki::Factory< controller::Controller, std::string >& getControllerFactoryInstance(); \
+ controller::Controller *ROS_New_##c() { return new c(); } \
+ class RosController##c { \
+ public: \
+ RosController##c() \
+ { \
+ controller::getControllerFactoryInstance().Register(#c, ROS_New_##c); \
+ } \
+ ~RosController##c() \
+ { \
+ controller::getControllerFactoryInstance().Unregister(#c); \
+ } \
+ }; \
+ static RosController##c ROS_CONTROLLER_##c;
+}
Property changes on: pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller.h
___________________________________________________________________
Added: svn:mergeinfo
+ /pkg/branches/gazebo-branch-merge/mechanism/mechanism_control/include/mechanism_control/controller.h:15683-15684,15739-15794,15797-15820,15822-15839,15852-15870,15983-16008,16010-16016,16129-16141,16145-16169,16245-16262,16274-16334
Added: pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller_provider.h
===================================================================
--- pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller_provider.h (rev 0)
+++ pkg/trunk/stacks/mechanism/controller_interface/include/controller_interface/controller_provider.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -0,0 +1,81 @@
+/*********************************************************************
+ * Software License Agreement (BSD License)
+ *
+ * Copyright (c) 2008, Willow Garage, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of the Willow Garage nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *********************************************************************/
+#pragma once
+
+/***************************************************/
+/*! \namespace controller
+ \brief The controller namespace
+
+ \class controller::ControllerProvider
+ \brief An interface to get access to controllers
+
+ */
+/***************************************************/
+
+#include <ros/node_handle.h>
+
+namespace controller
+{
+
+class Controller;
+
+class ControllerProvider
+{
+public:
+ ControllerProvider(){}
+ virtual ~ControllerProvider(){}
+
+ template<class ControllerType> bool getControllerByName(const std::string& name, ControllerType*& c)
+ {
+ // get controller
+ controller::Controller* controller = getControllerByName(name);
+ if (controller == NULL) return false;
+
+ // cast controller to ControllerType
+ ControllerType* controller_type = dynamic_cast< ControllerType* >(controller);
+ if (controller_type == NULL) return false;
+
+ // copy result
+ c = controller_type;
+ return true;
+ };
+
+private:
+ virtual controller::Controller* getControllerByName(const std::string& name) = 0;
+
+ ControllerProvider(const ControllerProvider &c);
+ ControllerProvider& operator =(const ControllerProvider &c);
+
+};
+}
Added: pkg/trunk/stacks/mechanism/controller_interface/mainpage.dox
===================================================================
--- pkg/trunk/stacks/mechanism/controller_interface/mainpage.dox (rev 0)
+++ pkg/trunk/stacks/mechanism/controller_interface/mainpage.dox 2009-08-13 00:28:28 UTC (rev 21741)
@@ -0,0 +1,119 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b controller_interface is ...
+
+<!--
+In addition to providing an overview of your package,
+this is the section where the specification and design/architecture
+should be detailed. While the original specification may be done on the
+wiki, it should be transferred here once your package starts to take shape.
+You can then link to this documentation page from the Wiki.
+-->
+
+
+\section codeapi Code API
+
+<!--
+Provide links to specific auto-generated API documentation within your
+package that is of particular interest to a reader. Doxygen will
+document pretty much every part of your code, so do your best here to
+point the reader to the actual API.
+
+If your codebase is fairly large or has different sets of APIs, you
+should use the doxygen 'group' tag to keep these APIs together. For
+example, the roscpp documentation has 'libros' group.
+-->
+
+\section rosapi ROS API
+
+<!--
+Names are very important in ROS because they can be remapped on the
+command-line, so it is VERY IMPORTANT THAT YOU LIST NAMES AS THEY
+APPEAR IN THE CODE. You should list names of every topic, service and
+parameter used in your code. There is a template below that you can
+use to document each node separately.
+
+List of nodes:
+- \b node_name1
+- \b node_name2
+-->
+
+<!-- START: copy from here to 'END' for each node
+
+<hr>
+
+\subsection node_name node_name
+
+node_name does (provide a basic description of your node)
+
+\subsubsection Usage
+\verbatim
+$ node_type1 [standard ROS args]
+\endverbatim
+
+\par Example
+
+\verbatim
+$ node_type1
+\endverbatim
+
+
+\subsubsection topics ROS topics
+
+Subscribes to:
+- \b "in": [std_msgs/FooType] description of in
+
+Publishes to:
+- \b "out": [std_msgs/FooType] description of out
+
+
+\subsubsection parameters ROS parameters
+
+Reads the following parameters from the parameter server
+
+- \b "~param_name" : \b [type] description of param_name
+- \b "~my_param" : \b [string] description of my_param
+
+Sets the following parameters on the parameter server
+
+- \b "~param_name" : \b [type] description of param_name
+
+
+\subsubsection services ROS services
+- \b "foo_service": [std_srvs/FooType] description of foo_service
+
+
+END: copy for each node -->
+
+
+<!-- START: Uncomment if you have any command-line tools
+
+\section commandline Command-line tools
+
+This section is a catch-all for any additional tools that your package
+provides or uses that may be of use to the reader. For example:
+
+- tools/scripts (e.g. rospack, roscd)
+- roslaunch .launch files
+- xmlparam files
+
+\subsection script_name script_name
+
+Description of what this script/file does.
+
+\subsubsection Usage
+\verbatim
+$ ./script_name [args]
+\endverbatim
+
+\par Example
+
+\verbatim
+$ ./script_name foo bar
+\endverbatim
+
+END: Command-Line Tools Section -->
+
+*/
\ No newline at end of file
Added: pkg/trunk/stacks/mechanism/controller_interface/manifest.xml
===================================================================
--- pkg/trunk/stacks/mechanism/controller_interface/manifest.xml (rev 0)
+++ pkg/trunk/stacks/mechanism/controller_interface/manifest.xml 2009-08-13 00:28:28 UTC (rev 21741)
@@ -0,0 +1,19 @@
+<package>
+ <description brief="This package provides an interface class for controllers.">
+
+ </description>
+ <author>Wim Meeussen</author>
+ <license>BSD</license>
+ <review status="unreviewed" notes=""/>
+ <url>http://pr.willowgarage.com/wiki/controller_interface</url>
+ <depend package="roscpp"/>
+ <depend package="loki"/>
+
+ <export>
+ <cpp cflags='-I${prefix}/include'
+ lflags='-Wl,-rpath,${prefix}/lib -L${prefix}/lib'/>
+ </export>
+
+</package>
+
+
Modified: pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt 2009-08-13 00:28:28 UTC (rev 21741)
@@ -8,7 +8,7 @@
rospack_add_boost_directories()
-rospack_add_library(mechanism_control src/mechanism_control.cpp src/controller_handle.cpp src/recorder.cpp src/scheduler.cpp)
+rospack_add_library(mechanism_control src/mechanism_control.cpp src/recorder.cpp src/scheduler.cpp)
rospack_remove_compile_flags(mechanism_control -W)
rospack_link_boost(mechanism_control thread)
#rospack_add_executable(ms_publisher_test test/ms_publisher_test.cpp)
Deleted: pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller.h
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -1,97 +0,0 @@
-/*********************************************************************
- * Software License Agreement (BSD License)
- *
- * Copyright (c) 2008, Willow Garage, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of the Willow Garage nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *********************************************************************/
-#pragma once
-/***************************************************/
-/*! \namespace controller
- \brief The controller namespace
-
- \class controller::Controller
- \brief A base level controller class.
-
- */
-/***************************************************/
-
-#include <mechanism_model/robot.h>
-#include <ros/node_handle.h>
-#include <mechanism_control/mechanism_control.h>
-#include <mechanism_control/controller_handle.h>
-
-namespace controller
-{
-
-class Controller: public ControllerHandle
-{
-public:
- enum {BEFORE_ME, AFTER_ME};
-
- Controller(){}
- virtual ~Controller(){}
-
- // The starting method is called by the realtime thread just before
- // the first call to update.
- virtual bool starting() { return true; }
- virtual void update(void) = 0;
- virtual bool stopping() {return true;}
- virtual bool init(mechanism::RobotState *robot, const ros::NodeHandle &n)
- {
- ROS_ERROR("Controller %s did not implement init function", n.getNamespace().c_str());
- return false;
- }
-
- template<class ControllerType> bool getController(const std::string& name, int sched, ControllerType*& c)
- {
- if (mc_ == NULL){
- ROS_ERROR("No valid pointer to Mechanism Control exists");
- return false;
- }
- if (!mc_->getControllerByName(name, c)){
- ROS_ERROR("Could not find controller %s", name.c_str());
- return false;
- }
- if (sched == BEFORE_ME) before_list_.push_back(name);
- else if (sched == AFTER_ME) after_list_.push_back(name);
- else{
- ROS_ERROR("No valid scheduling specified. Need BEFORE_ME or AFTER_ME in getController function");
- return false;
- }
- return true;
- };
-
-private:
- Controller(const Controller &c);
- Controller& operator =(const Controller &c);
-
-};
-
-}
Deleted: pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_handle.h
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_handle.h 2009-08-13 00:19:20 UTC (rev 21740)
+++ pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/controller_handle.h 2009-08-13 00:28:28 UTC (rev 21741)
@@ -1,115 +0,0 @@
-/*********************************************************************
- * Software License Agreement (BSD License)
- *
- * Copyright (c) 2008, Willow Garage, Inc.
- * All rights reserved.
- *
...
[truncated message content] |