|
From: <mee...@us...> - 2009-08-21 21:26:02
|
Revision: 22597
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=22597&view=rev
Author: meeussen
Date: 2009-08-21 21:25:40 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
move mechanism control to new action lib, create temporary translator package for backwards compatibility, and port milestone2 launch files
Modified Paths:
--------------
pkg/trunk/demos/door_demos_gazebo/launch/door_actions.xml
pkg/trunk/demos/milestone2/milestone2_actions/config/controllers.xml
pkg/trunk/demos/milestone2/milestone2_actions/manifest.xml
pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt
pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/action_mechanism_control.h
pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml
pkg/trunk/stacks/mechanism/mechanism_control/src/action_mechanism_control.cpp
pkg/trunk/stacks/mechanism/mechanism_msgs/manifest.xml
pkg/trunk/stacks/mechanism/stack.xml
Added Paths:
-----------
pkg/trunk/sandbox/switch_controller_translator/
pkg/trunk/sandbox/switch_controller_translator/CMakeLists.txt
pkg/trunk/sandbox/switch_controller_translator/Makefile
pkg/trunk/sandbox/switch_controller_translator/include/
pkg/trunk/sandbox/switch_controller_translator/include/switch_controller_translator/
pkg/trunk/sandbox/switch_controller_translator/mainpage.dox
pkg/trunk/sandbox/switch_controller_translator/manifest.xml
pkg/trunk/sandbox/switch_controller_translator/src/
pkg/trunk/sandbox/switch_controller_translator/src/switch_controller_translator.cpp
pkg/trunk/stacks/mechanism/mechanism_msgs/action/
pkg/trunk/stacks/mechanism/mechanism_msgs/action/SwitchController.action
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerAction.msg
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionFeedback.msg
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionGoal.msg
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionResult.msg
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerFeedback.msg
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerGoal.msg
pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerResult.msg
Removed Paths:
-------------
pkg/trunk/stacks/mechanism/mechanism_control/src/action_runner.cpp
pkg/trunk/stacks/mechanism/mechanism_control/test/action_runner_test.cpp
Modified: pkg/trunk/demos/door_demos_gazebo/launch/door_actions.xml
===================================================================
--- pkg/trunk/demos/door_demos_gazebo/launch/door_actions.xml 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/demos/door_demos_gazebo/launch/door_actions.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -1,12 +1,3 @@
<launch>
<node pkg="doors_core" type="action_runner" output="screen" />
- <!--node pkg="doors_core" type="action_runner_detect_door" output="screen" />
- <node pkg="doors_core" type="action_runner_detect_handle_no_camera" output="screen" />
- <node pkg="doors_core" type="action_runner_grasp_handle" output="screen" />
- <node pkg="doors_core" type="action_runner_touch_door" output="screen" />
- <node pkg="doors_core" type="action_runner_open_door" output="screen" />
- <node pkg="doors_core" type="action_runner_push_door" output="screen" />
- <node pkg="doors_core" type="action_runner_unlatch_handle" output="screen" />
- <node pkg="doors_core" type="action_runner_release_handle" output="screen" />
- <node pkg="doors_core" type="action_runner_check_path" output="screen" /-->
</launch>
Modified: pkg/trunk/demos/milestone2/milestone2_actions/config/controllers.xml
===================================================================
--- pkg/trunk/demos/milestone2/milestone2_actions/config/controllers.xml 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/demos/milestone2/milestone2_actions/config/controllers.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -2,6 +2,7 @@
<!-- action interface to switch controllers -->
<node pkg="mechanism_control" type="action_runner" />
+ <node pkg="switch_controller_translator" type="switch_controller_translator" />
<!-- Base controller and odometry-->
<rosparam file="$(find pr2_default_controllers)/pr2_base_controller.yaml" command="load" ns="pr2_base_controller" />
Modified: pkg/trunk/demos/milestone2/milestone2_actions/manifest.xml
===================================================================
--- pkg/trunk/demos/milestone2/milestone2_actions/manifest.xml 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/demos/milestone2/milestone2_actions/manifest.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -14,5 +14,6 @@
<depend package="pr2_alpha"/>
<depend package="pr2_experimental_controllers"/>
+ <depend package="switch_controller_translator"/>
<depend package="mux"/>
</package>
Added: pkg/trunk/sandbox/switch_controller_translator/CMakeLists.txt
===================================================================
--- pkg/trunk/sandbox/switch_controller_translator/CMakeLists.txt (rev 0)
+++ pkg/trunk/sandbox/switch_controller_translator/CMakeLists.txt 2009-08-21 21:25:40 UTC (rev 22597)
@@ -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(switch_controller_translator)
+
+#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(switch_controller_translator src/switch_controller_translator.cpp)
+#target_link_libraries(example ${PROJECT_NAME})
Added: pkg/trunk/sandbox/switch_controller_translator/Makefile
===================================================================
--- pkg/trunk/sandbox/switch_controller_translator/Makefile (rev 0)
+++ pkg/trunk/sandbox/switch_controller_translator/Makefile 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
\ No newline at end of file
Added: pkg/trunk/sandbox/switch_controller_translator/mainpage.dox
===================================================================
--- pkg/trunk/sandbox/switch_controller_translator/mainpage.dox (rev 0)
+++ pkg/trunk/sandbox/switch_controller_translator/mainpage.dox 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,119 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b switch_controller_translator 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/sandbox/switch_controller_translator/manifest.xml
===================================================================
--- pkg/trunk/sandbox/switch_controller_translator/manifest.xml (rev 0)
+++ pkg/trunk/sandbox/switch_controller_translator/manifest.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,18 @@
+<package>
+ <description brief="switch_controller_translator">
+
+ switch_controller_translator
+
+ </description>
+ <author>Wim Meeussen</author>
+ <license>BSD</license>
+ <review status="unreviewed" notes=""/>
+ <url>http://pr.willowgarage.com/wiki/switch_controller_translator</url>
+
+ <depend package="mechanism_msgs" />
+ <depend package="pr2_robot_actions" />
+ <depend package="action_translator" />
+
+</package>
+
+
Copied: pkg/trunk/sandbox/switch_controller_translator/src/switch_controller_translator.cpp (from rev 22306, pkg/trunk/sandbox/move_base_client/src/move_base_translator.cpp)
===================================================================
--- pkg/trunk/sandbox/switch_controller_translator/src/switch_controller_translator.cpp (rev 0)
+++ pkg/trunk/sandbox/switch_controller_translator/src/switch_controller_translator.cpp 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,73 @@
+/*********************************************************************
+* 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.
+*********************************************************************/
+
+#include "ros/ros.h"
+
+#include <std_msgs/Empty.h>
+#include <pr2_robot_actions/SwitchControllers.h>
+#include <pr2_robot_actions/SwitchControllersState.h>
+
+#include <mechanism_msgs/SwitchControllerAction.h>
+#include <actionlib/client/action_client.h>
+#include <action_translator/action_translator.h>
+#include <robot_actions/action_runner.h>
+#include <boost/thread.hpp>
+
+
+mechanism_msgs::SwitchControllerGoal fromOldGoal(const pr2_robot_actions::SwitchControllers& old_goal)
+{
+ mechanism_msgs::SwitchControllerGoal new_goal;
+ new_goal.start_controllers = old_goal.start_controllers;
+ new_goal.stop_controllers = old_goal.stop_controllers;
+ return new_goal;
+}
+
+int main(int argc, char** argv)
+{
+ ros::init(argc, argv, "move_base_action_translator");
+
+ ros::NodeHandle n;
+ action_translator::ActionTranslator<mechanism_msgs::SwitchControllerAction, pr2_robot_actions::SwitchControllers, std_msgs::Empty>
+ translator("switch_controller", "switch_controllers", &fromOldGoal, NULL, NULL);
+
+ robot_actions::ActionRunner runner(10.0);
+ runner.connect<pr2_robot_actions::SwitchControllers, pr2_robot_actions::SwitchControllersState, std_msgs::Empty>(translator);
+
+ runner.run();
+
+ ros::MultiThreadedSpinner m_spinner(2);
+ m_spinner.spin();
+
+ return 0;
+}
Property changes on: pkg/trunk/sandbox/switch_controller_translator/src/switch_controller_translator.cpp
___________________________________________________________________
Added: svn:mergeinfo
+ /pkg/branches/gazebo-branch-merge/sandbox/move_base_client/src/move_base_translator.cpp:15683-15684,15739-15794,15797-15820,15822-15839,15852-15870,15983-16008,16010-16016,16129-16141,16145-16169,16245-16262,16274-16334
Modified: pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_control/CMakeLists.txt 2009-08-21 21:25:40 UTC (rev 22597)
@@ -15,8 +15,5 @@
#rospack_add_rostest(test/test-mechanism-state-cpp.xml)
#rospack_add_rostest(test/test-mechanism-state-py.xml)
-rospack_add_executable(action_runner src/action_runner.cpp
- src/action_mechanism_control.cpp)
-rospack_add_executable(action_runner_test test/action_runner_test.cpp
- src/action_mechanism_control.cpp)
+rospack_add_executable(action_runner src/action_mechanism_control.cpp)
Modified: pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/action_mechanism_control.h
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/action_mechanism_control.h 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_control/include/mechanism_control/action_mechanism_control.h 2009-08-21 21:25:40 UTC (rev 22597)
@@ -37,26 +37,25 @@
#include <ros/node.h>
-#include <mechanism_msgs/SwitchController.h>
#include <std_msgs/Empty.h>
-#include <pr2_robot_actions/SwitchControllers.h>
-#include <pr2_robot_actions/SwitchControllersState.h>
-#include <robot_actions/action.h>
-#include <robot_actions/action_runner.h>
+#include <mechanism_msgs/SwitchController.h>
+#include <mechanism_msgs/SwitchControllerAction.h>
+#include <actionlib/server/simple_action_server.h>
-
namespace mechanism_control{
-class ActionMechanismControl: public robot_actions::Action<pr2_robot_actions::SwitchControllers, std_msgs::Empty>{
+class ActionMechanismControl{
public:
ActionMechanismControl();
~ActionMechanismControl();
- virtual robot_actions::ResultStatus execute(const pr2_robot_actions::SwitchControllers& c, std_msgs::Empty&);
+ void execute(const mechanism_msgs::SwitchControllerGoalConstPtr& switch_goal);
private:
+ ros::NodeHandle node_;
+ actionlib::SimpleActionServer<mechanism_msgs::SwitchControllerAction> action_server_;
ros::ServiceClient switch_controller_srv_;
Modified: pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_control/manifest.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -23,8 +23,7 @@
<depend package="realtime_tools" />
<depend package="rospy" />
<depend package="tf" />
-<depend package="robot_actions" />
-<depend package="pr2_robot_actions" />
+<depend package="actionlib" />
<depend package="mechanism_msgs" />
<depend package="std_srvs" />
<depend package="rosconsole" />
Modified: pkg/trunk/stacks/mechanism/mechanism_control/src/action_mechanism_control.cpp
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/src/action_mechanism_control.cpp 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_control/src/action_mechanism_control.cpp 2009-08-21 21:25:40 UTC (rev 22597)
@@ -1,4 +1,4 @@
- /*********************************************************************
+/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
@@ -38,47 +38,59 @@
using namespace ros;
using namespace std;
+using namespace mechanism_msgs;
+
namespace mechanism_control{
ActionMechanismControl::ActionMechanismControl():
- robot_actions::Action<pr2_robot_actions::SwitchControllers, std_msgs::Empty>("switch_controllers")
+ action_server_(node_, "switch_controller", boost::bind(&ActionMechanismControl::execute, this, _1))
{
- NodeHandle node;
- switch_controller_srv_ = node.serviceClient<mechanism_msgs::SwitchController>("switch_controller");
+ switch_controller_srv_ = node_.serviceClient<mechanism_msgs::SwitchController>("switch_controller");
};
ActionMechanismControl::~ActionMechanismControl(){};
-robot_actions::ResultStatus ActionMechanismControl::execute(const pr2_robot_actions::SwitchControllers& c, std_msgs::Empty&)
+void ActionMechanismControl::execute(const SwitchControllerGoalConstPtr& switch_goal)
{
ROS_DEBUG("ActionMechanismControl: received request to start %i controllers and stop %i controllers",
- c.start_controllers.size(), c.stop_controllers.size());
- for (unsigned int i=0; i<c.start_controllers.size(); i++)
- ROS_DEBUG("ActionMechanismControl: - starting controller %s", c.start_controllers[i].c_str());
- for (unsigned int i=0; i<c.stop_controllers.size(); i++)
- ROS_DEBUG("ActionMechanismControl: - stopping controller %s", c.stop_controllers[i].c_str());
+ switch_goal->start_controllers.size(), switch_goal->stop_controllers.size());
+ for (unsigned int i=0; i<switch_goal->start_controllers.size(); i++)
+ ROS_DEBUG("ActionMechanismControl: - starting controller %s", switch_goal->start_controllers[i].c_str());
+ for (unsigned int i=0; i<switch_goal->stop_controllers.size(); i++)
+ ROS_DEBUG("ActionMechanismControl: - stopping controller %s", switch_goal->stop_controllers[i].c_str());
mechanism_msgs::SwitchController::Request req;
mechanism_msgs::SwitchController::Response resp;
- req.start_controllers = c.start_controllers;
- req.stop_controllers = c.stop_controllers;
+ req.start_controllers = switch_goal->start_controllers;
+ req.stop_controllers = switch_goal->stop_controllers;
if (!switch_controller_srv_.call(req, resp)){
ROS_ERROR("ActionMechanismControl: failed to communicate with mechanism control to switch controllers");
- return robot_actions::ABORTED;
+ action_server_.setAborted();
}
else{
if (resp.ok){
ROS_DEBUG("ActionMechanismControl: controlers switched succesfully");
- return robot_actions::SUCCESS;
+ action_server_.setSucceeded();
}
else{
ROS_ERROR("ActionMechanismControl: failed to switch controllers");
- return robot_actions::ABORTED;
+ action_server_.setAborted();
}
}
}
}
+
+
+int main(int argc, char** argv)
+{
+ ros::init(argc,argv,"mechanism_control_action_container");
+
+ mechanism_control::ActionMechanismControl act;
+
+ ros::spin();
+ return 0;
+}
Deleted: pkg/trunk/stacks/mechanism/mechanism_control/src/action_runner.cpp
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/src/action_runner.cpp 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_control/src/action_runner.cpp 2009-08-21 21:25:40 UTC (rev 22597)
@@ -1,54 +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 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.
- *********************************************************************/
-
-
-#include "mechanism_control/action_mechanism_control.h"
-
-
-// ----------------------------------
-// MAIN
-// -----------------------------------
-
-int main(int argc, char** argv)
-{
- ros::init(argc,argv,"mechanism_control_action_container");
-
- mechanism_control::ActionMechanismControl act;
- robot_actions::ActionRunner runner(10.0);
- runner.connect<pr2_robot_actions::SwitchControllers, pr2_robot_actions::SwitchControllersState, std_msgs::Empty>(act);
- runner.run();
-
- ros::spin();
- return 0;
-}
Deleted: pkg/trunk/stacks/mechanism/mechanism_control/test/action_runner_test.cpp
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_control/test/action_runner_test.cpp 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_control/test/action_runner_test.cpp 2009-08-21 21:25:40 UTC (rev 22597)
@@ -1,67 +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 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.
- *
- * $Id: trigger_doors_detector.cpp 13808 2009-04-14 14:11:06Z mcgann $
- *
- *********************************************************************/
-
-#include "mechanism_control/action_mechanism_control.h"
-#include <robot_actions/action_runner.h>
-#include <ros/node.h>
-
-
-using namespace ros;
-using namespace std;
-
-
-// -----------------------------------
-// MAIN
-// -----------------------------------
-
-int
- main (int argc, char **argv)
-{
- ros::init(argc, argv,"mechanism_control_action_container");
-
- mechanism_control::ActionMechanismControl act;
- robot_actions::ActionRunner runner(10.0);
- runner.connect<pr2_robot_actions::SwitchControllers, pr2_robot_actions::SwitchControllersState, std_msgs::Empty>(act);
- runner.run();
-
- std_msgs::Empty feedback;
- pr2_robot_actions::SwitchControllers switch_controllers;
- switch_controllers.start_controllers.push_back("r_arm_cartesian_pose_controller");
- act.execute(switch_controllers, feedback);
-
- return (0);
-}
Added: pkg/trunk/stacks/mechanism/mechanism_msgs/action/SwitchController.action
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/action/SwitchController.action (rev 0)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/action/SwitchController.action 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,4 @@
+string[] start_controllers
+string[] stop_controllers
+---
+---
\ No newline at end of file
Modified: pkg/trunk/stacks/mechanism/mechanism_msgs/manifest.xml
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/manifest.xml 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/manifest.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -7,6 +7,7 @@
<review status="unreviewed" notes=""/>
<url>http://pr.willowgarage.com/</url>
<depend package="std_msgs" />
+ <depend package="actionlib" />
<export>
<cpp cflags="-I${prefix}/msg/cpp -I${prefix}/srv/cpp" />
</export>
Added: pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerAction.msg
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerAction.msg (rev 0)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerAction.msg 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,4 @@
+
+SwitchControllerActionGoal action_goal
+SwitchControllerActionResult action_result
+SwitchControllerActionFeedback action_feedback
Added: pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionFeedback.msg
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionFeedback.msg (rev 0)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionFeedback.msg 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalStatus status
+SwitchControllerFeedback feedback
Added: pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionGoal.msg
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionGoal.msg (rev 0)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionGoal.msg 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalID goal_id
+SwitchControllerGoal goal
Added: pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionResult.msg
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionResult.msg (rev 0)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerActionResult.msg 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,4 @@
+
+Header header
+actionlib/GoalStatus status
+SwitchControllerResult result
Added: pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerGoal.msg
===================================================================
--- pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerGoal.msg (rev 0)
+++ pkg/trunk/stacks/mechanism/mechanism_msgs/msg/SwitchControllerGoal.msg 2009-08-21 21:25:40 UTC (rev 22597)
@@ -0,0 +1,2 @@
+string[] start_controllers
+string[] stop_controllers
Modified: pkg/trunk/stacks/mechanism/stack.xml
===================================================================
--- pkg/trunk/stacks/mechanism/stack.xml 2009-08-21 21:22:40 UTC (rev 22596)
+++ pkg/trunk/stacks/mechanism/stack.xml 2009-08-21 21:25:40 UTC (rev 22597)
@@ -10,9 +10,8 @@
<!--depend stack="util"/--> <!-- realtime_tools -->
<depend stack="geometry"/> <!-- kdl, tf, bullet, angles -->
- <depend stack="controllers"/> <!-- control_toolbox, robot_mechanism_controllers, pr2_mechanism_controllers -->
- <depend stack="common"/> <!-- tinyxml, loki, robot_actions -->
+ <depend stack="common"/> <!-- tinyxml, loki, actionlib -->
<depend stack="ros"/> <!-- gtest, roscpp, rospy, std_srvs, rosconsole, std_msgs -->
<depend stack="common_msgs"/> <!-- diagnostic_msgs, robot_srvs -->
- <depend stack="diagnostics"/>
+ <depend stack="diagnostics"/> <!-- diagnostic_updater -->
</stack>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|