repo_id stringlengths 19 138 | file_path stringlengths 32 200 | content stringlengths 1 12.9M | __index_level_0__ int64 0 0 |
|---|---|---|---|
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/ref_server.cpp | /*********************************************************************
* 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.
*********************************************************************/
//! \author Vijay Pradeep
#include <actionlib/server/action_server.h>
#include <actionlib/TestAction.h>
#include <ros/ros.h>
#include <cstdio>
namespace actionlib
{
class RefServer : public ActionServer<TestAction>
{
public:
typedef ServerGoalHandle<TestAction> GoalHandle;
RefServer(ros::NodeHandle& n, const std::string& name);
private:
void goalCallback(GoalHandle gh);
void cancelCallback(GoalHandle gh);
};
}
using namespace actionlib;
RefServer::RefServer(ros::NodeHandle& n, const std::string& name)
: ActionServer<TestAction>(n, name,
boost::bind(&RefServer::goalCallback, this, _1),
boost::bind(&RefServer::cancelCallback, this, _1),
false)
{
start();
printf("Creating ActionServer [%s]\n", name.c_str());
}
void RefServer::goalCallback(GoalHandle gh)
{
TestGoal goal = *gh.getGoal();
switch (goal.goal)
{
case 1:
gh.setAccepted();
gh.setSucceeded(TestResult(), "The ref server has succeeded");
break;
case 2:
gh.setAccepted();
gh.setAborted(TestResult(), "The ref server has aborted");
break;
case 3:
gh.setRejected(TestResult(), "The ref server has rejected");
break;
default:
break;
}
}
void RefServer::cancelCallback(GoalHandle gh)
{
}
int main(int argc, char** argv)
{
ros::init(argc, argv, "ref_server");
ros::NodeHandle nh;
RefServer ref_server(nh, "reference_action");
ros::spin();
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/simple_execute_ref_server_test.launch | <launch>
<node pkg="actionlib" type="actionlib-simple_execute_ref_server" name="ref_server" output="screen" />
<test test-name="simple_client_test" pkg="actionlib" type="actionlib-simple_client_test" />
<test test-name="simple_client_wait_test" pkg="actionlib" type="actionlib-simple_client_wait_test" />
</launch>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_imports.launch | <launch>
<test test-name="test_imports" pkg="actionlib" type="test_imports.py" />
</launch>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_cpp_simple_client_cancel_crash.launch | <launch>
<test test-name="test_cpp_simple_client_cancel_crash" pkg="actionlib" type="actionlib-test_cpp_simple_client_cancel_crash"/>
</launch>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/add_two_ints_client.cpp | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#include <ros/ros.h>
#include <actionlib/client/service_client.h>
#include <actionlib/TwoIntsAction.h>
int main(int argc, char** argv)
{
ros::init(argc, argv, "add_two_ints_client");
if(argc != 3)
{
ROS_INFO_NAMED("actionlib", "Usage: add_two_ints_client X Y");
return 1;
}
ros::NodeHandle n;
actionlib::ServiceClient client = actionlib::serviceClient<actionlib::TwoIntsAction>(n, "add_two_ints");
client.waitForServer();
actionlib::TwoIntsGoal req;
actionlib::TwoIntsResult resp;
req.a = atoi(argv[1]);
req.b = atoi(argv[2]);
if(client.call(req, resp))
{
ROS_INFO_NAMED("actionlib", "Sum: %ld", (long int)resp.sum);
return 1;
}
return 0;
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_ref_action_server.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
PKG='actionlib'
import sys
import unittest
import rospy
from actionlib_msgs.msg import *
from actionlib import SimpleActionClient
from actionlib import ActionClient
from actionlib.msg import TestAction, TestGoal
class TestRefSimpleActionServer(unittest.TestCase):
def testsimple(self):
return
client = ActionClient('reference_action', TestAction)
self.assert_(client.wait_for_action_server_to_start(rospy.Duration(2.0)),
'Could not connect to the action server')
goal = TestGoal(1)
client.send_goal(goal)
self.assert_(client.wait_for_goal_to_finish(rospy.Duration(2.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.SUCCEEDED, client.get_terminal_state())
self.assertEqual(GoalStatus.SUCCEEDED, client.get_state())
goal = TestGoal(2)
client.send_goal(goal)
self.assert_(client.wait_for_goal_to_finish(rospy.Duration(10.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.ABORTED, client.get_terminal_state())
self.assertEqual(GoalStatus.ABORTED, client.get_state())
def test_abort(self):
client = ActionClient('reference_action', TestAction)
self.assert_(client.wait_for_server(rospy.Duration(2.0)),
'Could not connect to the action server')
goal_work = TestGoal(4)
goal_abort = TestGoal(6)
goal_feedback = TestGoal(8)
g1=client.send_goal(goal_work)
g2=client.send_goal(goal_work)
g3=client.send_goal(goal_work)
g4=client.send_goal(goal_work)
rospy.sleep(0.5);
self.assertEqual(g1.get_goal_status(),GoalStatus.ACTIVE) #,"Should be active")
self.assertEqual(g2.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
self.assertEqual(g3.get_goal_status(),GoalStatus.ACTIVE,"Shoule be active")
self.assertEqual(g4.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
g5=client.send_goal(goal_abort)
rospy.sleep(0.5);
self.assertEqual(g5.get_goal_status(),GoalStatus.SUCCEEDED,"Should be done")
self.assertEqual(g1.get_goal_status(),GoalStatus.ABORTED,"Should be aborted")
self.assertEqual(g2.get_goal_status(),GoalStatus.ABORTED,"Should be aborted")
self.assertEqual(g3.get_goal_status(),GoalStatus.ABORTED,"Shoule be aborted")
self.assertEqual(g4.get_goal_status(),GoalStatus.ABORTED,"Should be aborted")
def test_feedback(self):
client = ActionClient('reference_action', TestAction)
self.assert_(client.wait_for_server(rospy.Duration(2.0)),
'Could not connect to the action server')
goal_work = TestGoal(4)
goal_abort = TestGoal(6)
goal_feedback = TestGoal(7)
rospy.logwarn("This is a hacky way to associate goals with feedback");
feedback={};
def update_feedback(id,g,f):
feedback[id]=f;
g1=client.send_goal(goal_work,feedback_cb=lambda g,f:update_feedback(0,g,f))
g2=client.send_goal(goal_work,feedback_cb=lambda g,f:update_feedback(1,g,f))
g3=client.send_goal(goal_work,feedback_cb=lambda g,f:update_feedback(2,g,f))
g4=client.send_goal(goal_work,feedback_cb=lambda g,f:update_feedback(3,g,f))
rospy.sleep(0.5);
self.assertEqual(g1.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
self.assertEqual(g2.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
self.assertEqual(g3.get_goal_status(),GoalStatus.ACTIVE,"Shoule be active")
self.assertEqual(g4.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
g5=client.send_goal(goal_feedback)
rospy.sleep(0.5);
self.assertEqual(g5.get_goal_status(),GoalStatus.SUCCEEDED,"Should be done")
self.assertEqual(g1.get_goal_status(),GoalStatus.ACTIVE)
self.assertEqual(feedback[0].feedback,4)
self.assertEqual(g2.get_goal_status(),GoalStatus.ACTIVE)
self.assertEqual(feedback[1].feedback,3)
self.assertEqual(g3.get_goal_status(),GoalStatus.ACTIVE)
self.assertEqual(feedback[2].feedback,2)
self.assertEqual(g4.get_goal_status(),GoalStatus.ACTIVE)
self.assertEqual(feedback[3].feedback,1)
g6=client.send_goal(goal_abort)
rospy.sleep(0.5);
def test_result(self):
client = ActionClient('reference_action', TestAction)
self.assert_(client.wait_for_server(rospy.Duration(2.0)),
'Could not connect to the action server')
goal_work = TestGoal(4)
goal_abort = TestGoal(6)
goal_result = TestGoal(8)
rospy.logwarn("This is a hacky way to associate goals with feedback");
g1=client.send_goal(goal_work)
g2=client.send_goal(goal_work)
g3=client.send_goal(goal_work)
g4=client.send_goal(goal_work)
rospy.sleep(0.5);
self.assertEqual(g1.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
self.assertEqual(g2.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
self.assertEqual(g3.get_goal_status(),GoalStatus.ACTIVE,"Shoule be active")
self.assertEqual(g4.get_goal_status(),GoalStatus.ACTIVE,"Should be active")
g5=client.send_goal(goal_result)
rospy.sleep(0.5);
self.assertEqual(g5.get_goal_status(),GoalStatus.SUCCEEDED,"Should be done")
self.assertEqual(g1.get_goal_status(),GoalStatus.SUCCEEDED)
self.assertEqual(g1.get_result().result,4)
self.assertEqual(g2.get_goal_status(),GoalStatus.ABORTED)
self.assertEqual(g2.get_result().result,3)
self.assertEqual(g3.get_goal_status(),GoalStatus.SUCCEEDED)
self.assertEqual(g3.get_result().result,2)
self.assertEqual(g4.get_goal_status(),GoalStatus.ABORTED)
self.assertEqual(g4.get_result().result,1)
g6=client.send_goal(goal_abort)
rospy.sleep(0.5);
if __name__ == '__main__':
import rostest
rospy.init_node('test_ref_simple_action_server')
rostest.rosrun('actionlib', 'test_simple_action_client_python', TestRefSimpleActionServer)
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/simple_client_allocator_test.cpp | /*********************************************************************
* 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.
*********************************************************************/
//! \author Vijay Pradeep
#include <gtest/gtest.h>
#include <actionlib/TestAction.h>
#include <actionlib/client/simple_action_client.h>
#include <stdlib.h>
using namespace actionlib;
TEST(SimpleClientAllocator, easy_test)
{
typedef actionlib::SimpleActionClient<TestAction> TrajClient;
TrajClient* traj_client_ = new TrajClient("test_action", true);
ros::Duration(1,0).sleep();
delete traj_client_;
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
ros::init(argc, argv, "simple_client_allocator");
return RUN_ALL_TESTS();
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/ref_server_test.launch | <launch>
<node pkg="actionlib" type="actionlib-ref_server" name="ref_server" output="screen" />
<test test-name="ref_server_test" pkg="actionlib" type="actionlib-simple_client_test" />
</launch>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_ref_simple_action_server.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
PKG='actionlib'
import sys
import unittest
import rospy
from actionlib_msgs.msg import *
from actionlib import SimpleActionClient
from actionlib import ActionClient
from actionlib.msg import TestAction, TestGoal
class TestRefSimpleActionServer(unittest.TestCase):
def test_one(self):
client = SimpleActionClient('reference_simple_action', TestAction)
self.assert_(client.wait_for_server(rospy.Duration(2.0)),
'Could not connect to the action server')
goal = TestGoal(1)
client.send_goal(goal)
self.assert_(client.wait_for_result(rospy.Duration(2.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.SUCCEEDED, client.get_state())
goal = TestGoal(2)
client.send_goal(goal)
self.assert_(client.wait_for_result(rospy.Duration(10.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.ABORTED, client.get_state())
goal = TestGoal(3)
client.send_goal(goal)
self.assert_(client.wait_for_result(rospy.Duration(10.0)),
"Goal didn't finish")
#The simple server can't reject goals
self.assertEqual(GoalStatus.ABORTED, client.get_state())
goal = TestGoal(9)
saved_feedback={};
def on_feedback(fb):
rospy.loginfo("Got feedback")
saved_feedback[0]=fb
client.send_goal(goal,feedback_cb=on_feedback)
self.assert_(client.wait_for_result(rospy.Duration(10.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.SUCCEEDED, client.get_state())
self.assertEqual(saved_feedback[0].feedback,9)
if __name__ == '__main__':
import rostest
rospy.init_node('test_ref_simple_action_server')
rostest.rosrun('actionlib', 'test_simple_action_client_python', TestRefSimpleActionServer)
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/exercise_simple_client.cpp | /*
* Copyright (c) 2009, 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, Inc. 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.
*/
// Derived from excercise_simple_server.py
#include <gtest/gtest.h>
#include <ros/ros.h>
#include <actionlib/TestRequestAction.h>
#include <actionlib/TestRequestGoal.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib_msgs/GoalStatus.h>
#define EXPECT_STATE(expected_state) EXPECT_TRUE( ac_.getState() == SimpleClientGoalState::expected_state) \
<< "Expected [" << #expected_state << "], but goal state is [" << ac_.getState().toString() << "]";
using namespace actionlib;
using namespace actionlib_msgs;
class SimpleClientFixture : public testing::Test
{
public:
SimpleClientFixture() : ac_("test_request_action"), default_wait_(60.0) { }
protected:
virtual void SetUp()
{
// Make sure that the server comes up
ASSERT_TRUE( ac_.waitForServer(ros::Duration(10.0)) );
}
SimpleActionClient<TestRequestAction> ac_;
ros::Duration default_wait_;
};
TEST_F(SimpleClientFixture, just_succeed)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_SUCCESS;
goal.the_result = 42;
ac_.sendGoal(goal);
ac_.waitForResult(default_wait_);
EXPECT_STATE(SUCCEEDED);
EXPECT_EQ(42, ac_.getResult()->the_result);
}
TEST_F(SimpleClientFixture, just_abort)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_ABORTED;
goal.the_result = 42;
ac_.sendGoal(goal);
ac_.waitForResult(default_wait_);
EXPECT_STATE(ABORTED);
EXPECT_EQ(42, ac_.getResult()->the_result);
}
TEST_F(SimpleClientFixture, just_preempt)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_SUCCESS;
goal.delay_terminate = ros::Duration(1000);
goal.the_result = 42;
ac_.sendGoal(goal);
// Sleep for 10 seconds or until we hear back from the action server
for (unsigned int i=0; i < 100; i++)
{
ROS_DEBUG_NAMED("actionlib", "Waiting for Server Response");
if (ac_.getState() != SimpleClientGoalState::PENDING)
break;
ros::Duration(0.1).sleep();
}
ac_.cancelGoal();
ac_.waitForResult(default_wait_);
EXPECT_STATE(PREEMPTED);
EXPECT_EQ(42, ac_.getResult()->the_result);
}
TEST_F(SimpleClientFixture, drop)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_DROP;
goal.the_result = 42;
ac_.sendGoal(goal);
ac_.waitForResult(default_wait_);
EXPECT_STATE(ABORTED);
EXPECT_EQ(0, ac_.getResult()->the_result);
}
TEST_F(SimpleClientFixture, exception)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_EXCEPTION;
goal.the_result = 42;
ac_.sendGoal(goal);
ac_.waitForResult(default_wait_);
EXPECT_STATE(ABORTED);
EXPECT_EQ(0, ac_.getResult()->the_result);
}
TEST_F(SimpleClientFixture, ignore_cancel_and_succeed)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_SUCCESS;
goal.delay_terminate = ros::Duration(2.0);
goal.ignore_cancel = true;
goal.the_result = 42;
ac_.sendGoal(goal);
// Sleep for 10 seconds or until we hear back from the action server
for (unsigned int i=0; i < 100; i++)
{
ROS_DEBUG_NAMED("actionlib", "Waiting for Server Response");
if (ac_.getState() != SimpleClientGoalState::PENDING)
break;
ros::Duration(0.1).sleep();
}
ac_.cancelGoal();
ac_.waitForResult(default_wait_ + default_wait_);
EXPECT_STATE(SUCCEEDED);
EXPECT_EQ(42, ac_.getResult()->the_result);
}
TEST_F(SimpleClientFixture, lose)
{
TestRequestGoal goal;
goal.terminate_status = TestRequestGoal::TERMINATE_LOSE;
goal.the_result = 42;
ac_.sendGoal(goal);
ac_.waitForResult(default_wait_);
EXPECT_STATE(LOST);
}
void spinThread()
{
ros::NodeHandle nh;
ros::spin();
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
ros::init(argc, argv, "simple_client_test");
boost::thread spin_thread(&spinThread);
int result = RUN_ALL_TESTS();
ros::shutdown();
spin_thread.join();
return result;
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/simple_client_wait_test.cpp | /*********************************************************************
* 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.
*********************************************************************/
//! \author Vijay Pradeep
#include <gtest/gtest.h>
#include <actionlib/TestAction.h>
#include <actionlib/client/simple_action_client.h>
using namespace actionlib;
TEST(SimpleClient, easy_wait_test)
{
ros::NodeHandle n;
SimpleActionClient<TestAction> client(n, "reference_action");
bool started = client.waitForServer(ros::Duration(10.0));
ASSERT_TRUE(started);
TestGoal goal;
SimpleClientGoalState state(SimpleClientGoalState::LOST);
goal.goal = 1;
state = client.sendGoalAndWait(goal, ros::Duration(10,0), ros::Duration(10,0));
EXPECT_TRUE( state == SimpleClientGoalState::SUCCEEDED)
<< "Expected [SUCCEEDED], but goal state is [" << client.getState().toString() << "]";
goal.goal = 4;
state = client.sendGoalAndWait(goal, ros::Duration(2,0), ros::Duration(1,0));
EXPECT_TRUE( state == SimpleClientGoalState::PREEMPTED)
<< "Expected [PREEMPTED], but goal state is [" << client.getState().toString() << "]";
}
void spinThread()
{
ros::NodeHandle nh;
ros::spin();
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
ros::init(argc, argv, "simple_client_test");
boost::thread spin_thread(&spinThread);
int result = RUN_ALL_TESTS();
ros::shutdown();
spin_thread.join();
return result;
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_simple_action_server_deadlock.py | #! /usr/bin/env python
#
# Copyright (c) 2013, Miguel Sarabia
# Imperial College London
# 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 Imperial College London 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.
#
class Constants:
pkg = "actionlib"
node = "test_simple_action_server_deadlock"
topic = "deadlock"
deadlock_timeout = 45 # in seconds
shutdown_timeout = 2 # in seconds
max_action_duration = 3
import random
import sys
import threading
import unittest
import actionlib
from actionlib.msg import TestAction
import rosnode
import rospy
class DeadlockTest(unittest.TestCase):
def test_deadlock(self):
# Prepare condition (for safe preemption)
self.condition = threading.Condition()
self.last_execution_time = None
# Prepare Simple Action Server
self.action_server = actionlib.SimpleActionServer(
Constants.topic,
TestAction,
execute_cb=self.execute_callback,
auto_start=False)
self.action_server.register_preempt_callback(self.preempt_callback)
self.action_server.start()
# Sleep for the amount specified
rospy.sleep(Constants.deadlock_timeout)
# Start actual tests
running_nodes = set(rosnode.get_node_names())
required_nodes = {
"/deadlock_companion_1",
"/deadlock_companion_2",
"/deadlock_companion_3",
"/deadlock_companion_4",
"/deadlock_companion_5"}
self.assertTrue(required_nodes.issubset(running_nodes),
"Required companion nodes are not currently running")
# Shutdown companions so that we can exit nicely
termination_time = rospy.Time.now()
rosnode.kill_nodes(required_nodes)
rospy.sleep(Constants.shutdown_timeout)
# Check last execution wasn't too long ago...
self.assertIsNotNone(self.last_execution_time is None,
"Execute Callback was never executed")
time_since_last_execution = (
termination_time - self.last_execution_time).to_sec()
self.assertTrue(
time_since_last_execution < 2 * Constants.max_action_duration,
"Too long since last goal was executed; likely due to a deadlock")
def execute_callback(self, goal):
# Note down last_execution time
self.last_execution_time = rospy.Time.now()
# Determine duration of this action
action_duration = random.uniform(0, Constants.max_action_duration)
with self.condition:
if not self.action_server.is_preempt_requested():
self.condition.wait(action_duration)
if self.action_server.is_preempt_requested():
self.action_server.set_preempted()
else:
self.action_server.set_succeeded()
def preempt_callback(self):
with self.condition:
self.condition.notify()
if __name__ == '__main__':
import rostest
rospy.init_node(Constants.node)
rostest.rosrun(Constants.pkg, Constants.node, DeadlockTest)
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_server_components.py | #!/usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
# Author: Alexander Sorokin.
PKG='actionlib'
import rospy
import sys
import unittest
import threading
from actionlib import goal_id_generator,status_tracker
import actionlib_msgs.msg
## A sample python unit test
class TestGoalIDGenerator(unittest.TestCase):
def test_generator(self):
gen1 = goal_id_generator.GoalIDGenerator();
id1 = gen1.generate_ID()
id2 = gen1.generate_ID()
id3 = gen1.generate_ID()
nn1,s1,ts1 = id1.id.split('-');
nn2,s2,ts2 = id2.id.split('-');
nn3,s3,ts3 = id3.id.split('-');
self.assertEquals(nn1, "/test_goal_id_generator","node names are different")
self.assertEquals(nn1, nn2, "node names are different")
self.assertEquals(nn1, nn3, "node names are different")
self.assertEquals(s1, "1", "Sequence numbers mismatch")
self.assertEquals(s2, "2", "Sequence numbers mismatch")
self.assertEquals(s3, "3", "Sequence numbers mismatch")
def test_threaded_generation(self):
"""
This test checks that all the ids are generated unique. This test should fail if the synchronization is set incorrectly.
@note this test is can succeed when the errors are present.
"""
global ids_lists
ids_lists={};
def gen_ids(tID=1,num_ids=1000):
gen = goal_id_generator.GoalIDGenerator();
for i in range(0,num_ids):
id=gen.generate_ID();
ids_lists[tID].append(id);
num_ids=1000;
num_threads=200;
threads=[];
for tID in range(0,num_threads):
ids_lists[tID]=[];
t=threading.Thread(None,gen_ids,None,(),{'tID':tID,'num_ids':num_ids});
threads.append(t);
t.start();
for t in threads:
t.join();
all_ids={};
for tID in range(0,num_threads):
self.assertEquals(len(ids_lists[tID]),num_ids)
for id in ids_lists[tID]:
nn,s,ts = id.id.split('-');
self.assertFalse(s in all_ids,"Duplicate ID found");
all_ids[s]=1;
def test_status_tracker(self):
tracker=status_tracker.StatusTracker("test-id",actionlib_msgs.msg.GoalStatus.PENDING);
self.assertEquals(tracker.status.goal_id,"test-id");
self.assertEquals(tracker.status.status,actionlib_msgs.msg.GoalStatus.PENDING);
if __name__ == '__main__':
import rostest
rospy.init_node("test_goal_id_generator")
rostest.rosrun(PKG, 'test_goal_id_generator', TestGoalIDGenerator)
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_python_server.launch | <launch>
<node pkg="actionlib" type="ref_server.py" name="ref_server" output="screen" />
<test test-name="test_python_server" pkg="actionlib" type="actionlib-simple_client_test"/>
</launch>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/ref_server.py | #!/usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
# Author: Alexander Sorokin.
# Based on code from ref_server.cpp by Vijay Pradeep
PKG='actionlib'
import rospy
import sys
from actionlib.action_server import ActionServer
from actionlib.msg import TestAction,TestFeedback,TestResult
class RefServer (ActionServer):
def __init__(self,name):
action_spec=TestAction
ActionServer.__init__(self,name,action_spec,self.goalCallback,self.cancelCallback, False);
self.start()
rospy.loginfo("Creating ActionServer [%s]\n", name);
self.saved_goals=[]
def goalCallback(self,gh):
goal = gh.get_goal();
rospy.loginfo("Got goal %d", int(goal.goal))
if goal.goal == 1:
gh.set_accepted();
gh.set_succeeded(None, "The ref server has succeeded");
elif goal.goal == 2:
gh.set_accepted();
gh.set_aborted(None, "The ref server has aborted");
elif goal.goal == 3:
gh.set_rejected(None, "The ref server has rejected");
elif goal.goal == 4:
self.saved_goals.append(gh);
gh.set_accepted();
elif goal.goal == 5:
gh.set_accepted();
for g in self.saved_goals:
g.set_succeeded();
self.saved_goals = [];
gh.set_succeeded();
elif goal.goal == 6:
gh.set_accepted();
for g in self.saved_goals:
g.set_aborted();
self.saved_goals = [];
gh.set_succeeded();
elif goal.goal == 7:
gh.set_accepted();
n=len(self.saved_goals);
for i,g in enumerate(self.saved_goals):
g.publish_feedback(TestFeedback(n-i));
gh.set_succeeded();
elif goal.goal == 8:
gh.set_accepted();
n=len(self.saved_goals);
for i,g in enumerate(self.saved_goals):
if i % 2 ==0:
g.set_succeeded(TestResult(n-i), "The ref server has succeeded");
else:
g.set_aborted(TestResult(n-i), "The ref server has aborted")
self.saved_goals=[];
gh.set_succeeded();
else:
pass
def cancelCallback(self,gh):
pass
if __name__=="__main__":
rospy.init_node("ref_server");
ref_server = RefServer("reference_action");
rospy.spin();
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_cpp_simple_client_cancel_crash.cpp | /*********************************************************************
* 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.
*********************************************************************/
//! \author Vijay Pradeep
#include <gtest/gtest.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/TestAction.h>
typedef actionlib::SimpleActionClient<actionlib::TestAction> Client;
TEST(SimpleClientCancelCrash, uninitialized_crash)
{
ros::NodeHandle nh;
Client client("test_client", true);
ROS_INFO_NAMED("actionlib", "calling cancelGoal()");
client.cancelGoal();
ROS_INFO_NAMED("actionlib", "Done calling cancelGoal()");
EXPECT_TRUE(true);
ROS_INFO_NAMED("actionlib", "Successfully done with test. Exiting");
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
ros::init(argc, argv, "test_cpp_simple_client_cancel_crash");
return RUN_ALL_TESTS();
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/test_cpp_simple_client_allocator.launch | <launch>
<test test-name="test_cpp_simple_client_allocator" pkg="actionlib" type="actionlib-simple_client_allocator_test"/>
</launch>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/simple_python_client_test.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
import sys
import unittest
import rospy
from actionlib_msgs.msg import *
from actionlib import SimpleActionClient
from actionlib.msg import TestAction, TestGoal
class TestSimpleActionClient(unittest.TestCase):
def testsimple(self):
client = SimpleActionClient('reference_action', TestAction)
self.assert_(client.wait_for_server(rospy.Duration(10.0)),
'Could not connect to the action server')
goal = TestGoal(1)
client.send_goal(goal)
self.assert_(client.wait_for_result(rospy.Duration(10.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.SUCCEEDED, client.get_state())
self.assertEqual("The ref server has succeeded", client.get_goal_status_text())
goal = TestGoal(2)
client.send_goal(goal)
self.assert_(client.wait_for_result(rospy.Duration(10.0)),
"Goal didn't finish")
self.assertEqual(GoalStatus.ABORTED, client.get_state())
self.assertEqual("The ref server has aborted", client.get_goal_status_text())
if __name__ == '__main__':
import rostest
rospy.init_node('simple_python_client_test')
rostest.rosrun('actionlib', 'test_simple_action_client_python', TestSimpleActionClient)
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/test/mock_simple_server.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
import sys
import time
import rospy
import rostest
from actionlib.simple_action_server import SimpleActionServer
from actionlib.server_goal_handle import ServerGoalHandle;
from actionlib.msg import *
class RefSimpleServer(SimpleActionServer):
def __init__(self, name):
SimpleActionServer.__init__(self, name, TestRequestAction, self.execute_cb, False)
self.start()
def execute_cb(self, goal):
rospy.logdebug("Goal:\n" + str(goal))
result = TestRequestResult(goal.the_result, True)
if goal.pause_status > rospy.Duration(0.0):
rospy.loginfo("Locking the action server for %.3f seconds" % goal.pause_status.to_sec())
status_continue_time = rospy.get_rostime() + goal.pause_status
# Takes the action server lock to prevent status from
# being published (simulates a freeze).
with self.action_server.lock:
while rospy.get_rostime() < status_continue_time:
time.sleep(0.02)
rospy.loginfo("Unlocking the action server")
terminate_time = rospy.get_rostime() + goal.delay_terminate
while rospy.get_rostime() < terminate_time:
time.sleep(0.02)
if not goal.ignore_cancel:
if self.is_preempt_requested():
self.set_preempted(result, goal.result_text)
return
rospy.logdebug("Terminating goal as: %i" % goal.terminate_status)
if goal.terminate_status == TestRequestGoal.TERMINATE_SUCCESS:
self.set_succeeded(result, goal.result_text)
elif goal.terminate_status == TestRequestGoal.TERMINATE_ABORTED:
self.set_aborted(result, goal.result_text)
elif goal.terminate_status == TestRequestGoal.TERMINATE_REJECTED:
rospy.logerr("Simple action server cannot reject goals")
self.set_aborted(None, "Simple action server cannot reject goals")
elif goal.terminate_status == TestRequestGoal.TERMINATE_DROP:
rospy.loginfo("About to drop the goal. This should produce an error message.")
return
elif goal.terminate_status == TestRequestGoal.TERMINATE_EXCEPTION:
rospy.loginfo("About to throw an exception. This should produce an error message.")
raise Exception("Terminating by throwing an exception")
elif goal.terminate_status == TestRequestGoal.TERMINATE_LOSE:
# Losing the goal requires messing about in the action server's innards
for i, s in enumerate(self.action_server.status_list):
if s.status.goal_id.id == self.current_goal.goal.goal_id.id:
del self.action_server.status_list[i]
break
self.current_goal = ServerGoalHandle()
else:
rospy.logerr("Don't know how to terminate as %d" % goal.terminate_status)
self.set_aborted(None, "Don't know how to terminate as %d" % goal.terminate_status)
if __name__ == '__main__':
rospy.init_node("ref_simple_server")
ref_server = RefSimpleServer("test_request_action")
print "Spinning"
rospy.spin()
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/decl.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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.
*
*********************************************************************/
/*
* Cross platform macros.
*
*/
#ifndef ACTIONLIB_DECL_H_INCLUDED
#define ACTIONLIB_DECL_H_INCLUDED
#include <ros/macros.h>
#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries
#ifdef actionlib_EXPORTS // we are building a shared lib/dll
#define ACTIONLIB_DECL ROS_HELPER_EXPORT
#else // we are using shared lib/dll
#define ACTIONLIB_DECL ROS_HELPER_IMPORT
#endif
#else // ros is being built around static libraries
#define ACTIONLIB_DECL
#define ACTIONLIB_DECL
#endif
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/destruction_guard.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_DESTRUCTION_GUARD_
#define ACTIONLIB_DESTRUCTION_GUARD_
#include <boost/thread/condition.hpp>
#include <boost/thread/mutex.hpp>
namespace actionlib {
/**
* @class DestructionGuard
* @brief This class protects an object from being destructed until all users of that object relinquish control of it
*/
class DestructionGuard {
public:
/**
* @brief Constructor for a DestructionGuard
*/
DestructionGuard() : use_count_(0), destructing_(false){}
void destruct(){
boost::mutex::scoped_lock lock(mutex_);
destructing_ = true;
while(use_count_ > 0){
count_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
}
}
/**
* @brief Attempts to protect the guarded object from being destructed
* @return True if protection succeeded, false if protection failed
*/
bool tryProtect(){
boost::mutex::scoped_lock lock(mutex_);
if(destructing_)
return false;
use_count_++;
return true;
}
/**
* @brief Releases protection on the guarded object
*/
void unprotect(){
boost::mutex::scoped_lock lock(mutex_);
use_count_--;
}
/**
* @class ScopedProtector
* @brief Protects a DestructionGuard until this object goes out of scope
*/
class ScopedProtector
{
public:
/**
* @brief Constructor for a ScopedProtector
* @param guard The DestructionGuard to protect
*/
ScopedProtector(DestructionGuard& guard) : guard_(guard), protected_(false){
protected_ = guard_.tryProtect();
}
/**
* @brief Checks if the ScopedProtector successfully protected the DestructionGuard
* @return True if protection succeeded, false otherwise
*/
bool isProtected(){
return protected_;
}
/**
* @brief Releases protection of the DestructionGuard if necessary
*/
~ScopedProtector(){
if(protected_)
guard_.unprotect();
}
private:
DestructionGuard& guard_;
bool protected_;
};
private:
boost::mutex mutex_;
int use_count_;
bool destructing_;
boost::condition count_condition_;
};
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/one_shot_timer.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTION_TOOLS_ROBUST_ONE_SHOT_TIMER_H_
#define ACTION_TOOLS_ROBUST_ONE_SHOT_TIMER_H_
#include "ros/ros.h"
#include "boost/bind.hpp"
//! Horrible hack until ROS Supports this (ROS Trac #1387)
class OneShotTimer
{
public:
OneShotTimer() : active_(false) { }
void cb(const ros::TimerEvent& e)
{
if (active_)
{
active_ = false;
if (callback_)
callback_(e);
else
ROS_ERROR_NAMED("actionlib", "Got a NULL Timer OneShotTimer Callback");
}
}
boost::function<void (const ros::TimerEvent& e)> getCb()
{
return boost::bind(&OneShotTimer::cb, this, _1);
}
void registerOneShotCb(boost::function<void (const ros::TimerEvent& e)> callback)
{
callback_ = callback;
}
void stop()
{
//timer_.stop();
active_ = false;
}
const ros::Timer& operator=(const ros::Timer& rhs)
{
active_ = true;
timer_ = rhs;
return timer_;
}
private:
ros::Timer timer_;
bool active_;
boost::function<void (const ros::TimerEvent& e)> callback_;
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/managed_list.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_MANAGED_LIST_H_
#define ACTIONLIB_MANAGED_LIST_H_
#include "ros/console.h"
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <list>
#include <actionlib/destruction_guard.h>
namespace actionlib
{
/**
* \brief wrapper around an STL list to help with reference counting
* Provides handles elements in an STL list. When all the handles go out of scope,
* the element in the list is destroyed.
*/
template <class T>
class ManagedList
{
private:
struct TrackedElem
{
T elem;
boost::weak_ptr<void> handle_tracker_;
};
public:
class Handle;
class iterator
{
public:
iterator() { }
T& operator*() { return it_->elem; }
T& operator->() { return it_->elem; }
bool operator==(const iterator& rhs) const { return it_ == rhs.it_; }
bool operator!=(const iterator& rhs) const { return !(*this == rhs); }
void operator++() { it_++; }
Handle createHandle(); //!< \brief Creates a refcounted Handle from an iterator
friend class ManagedList;
private:
iterator(typename std::list<TrackedElem>::iterator it) : it_(it) { }
typename std::list<TrackedElem>::iterator it_;
};
typedef typename boost::function< void(iterator)> CustomDeleter;
private:
class ElemDeleter
{
public:
ElemDeleter(iterator it, CustomDeleter deleter, const boost::shared_ptr<DestructionGuard>& guard) :
it_(it), deleter_(deleter), guard_(guard)
{ }
void operator() (void* ptr)
{
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "ManagedList: The DestructionGuard associated with this list has already been destructed. You must delete all list handles before deleting the ManagedList");
return;
}
ROS_DEBUG_NAMED("actionlib", "IN DELETER");
if (deleter_)
deleter_(it_);
}
private:
iterator it_;
CustomDeleter deleter_;
boost::shared_ptr<DestructionGuard> guard_;
};
public:
class Handle
{
public:
/**
* \brief Construct an empty handle
*/
Handle() : it_(iterator()), handle_tracker_(boost::shared_ptr<void>()), valid_(false) { }
const Handle& operator=(const Handle& rhs)
{
if ( rhs.valid_ ) {
it_ = rhs.it_;
}
handle_tracker_ = rhs.handle_tracker_;
valid_ = rhs.valid_;
return rhs;
}
/**
* \brief stop tracking the list element with this handle, even though the
* Handle hasn't gone out of scope
*/
void reset()
{
valid_ = false;
#ifndef _MSC_VER
// this prevents a crash on MSVC, but I bet the problem is elsewhere.
// it puts the lotion in the basket.
it_ = iterator();
#endif
handle_tracker_.reset();
}
/**
* \brief get the list element that this handle points to
* fails/asserts if this is an empty handle
* \return Reference to the element this handle points to
*/
T& getElem()
{
assert(valid_);
return *it_;
}
/**
* \brief Checks if two handles point to the same list elem
*/
bool operator==(const Handle& rhs) const
{
assert(valid_);
assert(rhs.valid_);
return (it_ == rhs.it_);
}
friend class ManagedList;
// Need this friend declaration so that iterator::createHandle() can
// call the private Handle::Handle() declared below.
friend class iterator;
private:
Handle( const boost::shared_ptr<void>& handle_tracker, iterator it) :
it_(it), handle_tracker_(handle_tracker), valid_(true)
{ }
iterator it_;
boost::shared_ptr<void> handle_tracker_;
bool valid_;
};
ManagedList() { }
/**
* \brief Add an element to the back of the ManagedList
*/
Handle add(const T& elem)
{
return add(elem, boost::bind(&ManagedList<T>::defaultDeleter, this, _1) );
}
/**
* \brief Add an element to the back of the ManagedList, along with a Custom deleter
* \param elem The element we want to add
* \param deleter Object on which operator() is called when refcount goes to 0
*/
Handle add(const T& elem, CustomDeleter custom_deleter, const boost::shared_ptr<DestructionGuard>& guard)
{
TrackedElem tracked_t;
tracked_t.elem = elem;
typename std::list<TrackedElem>::iterator list_it = list_.insert(list_.end(), tracked_t);
iterator managed_it = iterator(list_it);
ElemDeleter deleter(managed_it, custom_deleter, guard);
boost::shared_ptr<void> tracker( (void*) NULL, deleter);
list_it->handle_tracker_ = tracker;
return Handle(tracker, managed_it);
}
/**
* \brief Removes an element from the ManagedList
*/
void erase(iterator it)
{
list_.erase(it.it_);
}
iterator end() { return iterator(list_.end()); }
iterator begin() { return iterator(list_.begin()); }
private:
void defaultDeleter(iterator it)
{
erase(it);
}
std::list<TrackedElem> list_;
};
template<class T>
typename ManagedList<T>::Handle ManagedList<T>::iterator::createHandle()
{
if (it_->handle_tracker_.expired())
ROS_ERROR_NAMED("actionlib", "Tried to create a handle to a list elem with refcount 0");
boost::shared_ptr<void> tracker = it_->handle_tracker_.lock();
return Handle(tracker, *this);
}
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/goal_id_generator.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTION_LIB_GOAL_ID_GENERATOR_H_
#define ACTION_LIB_GOAL_ID_GENERATOR_H_
#include <sstream>
#include <string>
#include "ros/time.h"
#include "actionlib_msgs/GoalID.h"
#include <actionlib/decl.h>
namespace actionlib
{
class ACTIONLIB_DECL GoalIDGenerator
{
public:
/**
* Create a generator that prepends the fully qualified node name to the Goal ID
*/
GoalIDGenerator();
/**
* \param name Unique name to prepend to the goal id. This will
* generally be a fully qualified node name.
*/
GoalIDGenerator(const std::string& name);
/**
* \param name Set the name to prepend to the goal id. This will
* generally be a fully qualified node name.
*/
void setName(const std::string& name);
/**
* \brief Generates a unique ID
* \return A unique GoalID for this action
*/
actionlib_msgs::GoalID generateID();
private:
std::string name_ ;
};
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/action_definition.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTION_DEFINITION_H_
#define ACTION_DEFINITION_H_
//A macro that will generate helpful typedefs for action client, server, and policy implementers
namespace actionlib {
#define ACTION_DEFINITION(ActionSpec) \
typedef typename ActionSpec::_action_goal_type ActionGoal; \
typedef typename ActionGoal::_goal_type Goal; \
typedef typename ActionSpec::_action_result_type ActionResult; \
typedef typename ActionResult::_result_type Result; \
typedef typename ActionSpec::_action_feedback_type ActionFeedback; \
typedef typename ActionFeedback::_feedback_type Feedback; \
\
typedef boost::shared_ptr<const ActionGoal> ActionGoalConstPtr; \
typedef boost::shared_ptr<ActionGoal> ActionGoalPtr; \
typedef boost::shared_ptr<const Goal> GoalConstPtr;\
\
typedef boost::shared_ptr<const ActionResult> ActionResultConstPtr; \
typedef boost::shared_ptr<const Result> ResultConstPtr;\
\
typedef boost::shared_ptr<const ActionFeedback> ActionFeedbackConstPtr; \
typedef boost::shared_ptr<const Feedback> FeedbackConstPtr;
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/enclosure_deleter.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#include <boost/shared_ptr.hpp>
#ifndef ACTIONLIB_ENCLOSURE_DELETER_H_
#define ACTIONLIB_ENCLOSURE_DELETER_H_
namespace actionlib
{
/*
* This allows the creation of a shared pointer to a section
* of an already reference counted structure. For example,
* if in the following picture Enclosure is reference counted with
* a boost::shared_ptr and you want to return a boost::shared_ptr
* to the Member that is referenced counted along with Enclosure objects
*
* Enclosure --------------- <--- Already reference counted
* -----Member <------- A member of enclosure objects, eg. Enclosure.Member
*/
template <class Enclosure> class EnclosureDeleter {
public:
EnclosureDeleter(const boost::shared_ptr<Enclosure>& enc_ptr) : enc_ptr_(enc_ptr){}
template<class Member> void operator()(Member* member_ptr){
enc_ptr_.reset();
}
private:
boost::shared_ptr<Enclosure> enc_ptr_;
};
template <class Enclosure, class Member>
boost::shared_ptr<Member> share_member(boost::shared_ptr<Enclosure> enclosure, Member &member)
{
EnclosureDeleter<Enclosure> d(enclosure);
boost::shared_ptr<Member> p(&member, d);
return p;
}
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client_goal_status.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_GOAL_STATUS_H_
#define ACTIONLIB_CLIENT_GOAL_STATUS_H_
#include <string>
#include "actionlib/GoalStatus.h"
namespace actionlib
{
/**
* \brief Thin wrapper around an enum in order to help interpret the client-side status of a goal request
* The possible states are defined the ClientGoalStatus::StateEnum. They are also defined in StateEnum.
* we can also get there from \link ClientGoalStatus::StateEnum here \endlink
**/
class ClientGoalStatus
{
public:
//! \brief Defines the various states the Goal can be in, as perceived by the client
enum StateEnum
{
PENDING, //!< The goal has yet to be processed by the action server
ACTIVE, //!< The goal is currently being processed by the action server
PREEMPTED, //!< The goal was preempted by either another goal, or a preempt message being sent to the action server
SUCCEEDED, //!< The goal was achieved successfully by the action server
ABORTED, //!< The goal was aborted by the action server
REJECTED, //!< The ActionServer refused to start processing the goal, possibly because a goal is infeasible
LOST //!< The goal was sent by the ActionClient, but disappeared due to some communication error
} ;
ClientGoalStatus(StateEnum state)
{
state_ = state;
}
/**
* \brief Build a ClientGoalStatus from a GoalStatus.
* Note that the only GoalStatuses that can be converted into a
* ClientGoalStatus are {PREEMPTED, SUCCEEDED, ABORTED, REJECTED}
* \param goal_status The GoalStatus msg that we want to convert
*/
ClientGoalStatus(const GoalStatus& goal_status)
{
fromGoalStatus(goal_status);
}
/**
* \brief Check if the goal is in a terminal state
* \return TRUE if in PREEMPTED, SUCCEDED, ABORTED, REJECTED, or LOST
*/
inline bool isDone() const
{
if (state_ == PENDING || state_ == ACTIVE)
return false;
return true;
}
/**
* \brief Copy the raw enum into the object
*/
inline const StateEnum& operator=(const StateEnum& state)
{
state_ = state;
return state;
}
/**
* \brief Straightforward enum equality check
*/
inline bool operator==(const ClientGoalStatus& rhs) const
{
return state_ == rhs.state_;
}
/**
* \brief Straightforward enum inequality check
*/
inline bool operator!=(const ClientGoalStatus& rhs) const
{
return !(state_ == rhs.state_);
}
/**
* \brief Store a GoalStatus in a ClientGoalStatus
* Note that the only GoalStatuses that can be converted into a
* ClientGoalStatus are {PREEMPTED, SUCCEEDED, ABORTED, REJECTED}
* \param goal_status The GoalStatus msg that we want to convert
*/
void fromGoalStatus(const GoalStatus& goal_status)
{
switch(goal_status.status)
{
case GoalStatus::PREEMPTED:
state_ = ClientGoalStatus::PREEMPTED; break;
case GoalStatus::SUCCEEDED:
state_ = ClientGoalStatus::SUCCEEDED; break;
case GoalStatus::ABORTED:
state_ = ClientGoalStatus::ABORTED; break;
case GoalStatus::REJECTED:
state_ = ClientGoalStatus::REJECTED; break;
default:
state_ = ClientGoalStatus::LOST;
ROS_ERROR_NAMED("actionlib", "Cannot convert GoalStatus %u to ClientGoalState", goal_status.status); break;
}
}
/**
* \brief Stringify the enum
* \return String that has the name of the enum
*/
std::string toString() const
{
switch(state_)
{
case PENDING:
return "PENDING";
case ACTIVE:
return "ACTIVE";
case PREEMPTED:
return "PREEMPTED";
case SUCCEEDED:
return "SUCCEEDED";
case ABORTED:
return "ABORTED";
case REJECTED:
return "REJECTED";
case LOST:
return "LOST";
default:
ROS_ERROR_NAMED("actionlib", "BUG: Unhandled ClientGoalStatus");
break;
}
return "BUG-UNKNOWN";
}
private:
StateEnum state_;
ClientGoalStatus(); //!< Need to always specific an initial state. Thus, no empty constructor
};
}
#endif // ACTION_TOOLS_CLIENT_GOAL_STATE_H_
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/handle_tracker_deleter_imp.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_HANDLE_TRACKER_DELETER_IMP_H_
#define ACTIONLIB_HANDLE_TRACKER_DELETER_IMP_H_
namespace actionlib {
template <class ActionSpec>
HandleTrackerDeleter<ActionSpec>::HandleTrackerDeleter(ActionServerBase<ActionSpec>* as,
typename std::list<StatusTracker<ActionSpec> >::iterator status_it, boost::shared_ptr<DestructionGuard> guard)
: as_(as), status_it_(status_it), guard_(guard) {}
template <class ActionSpec>
void HandleTrackerDeleter<ActionSpec>::operator()(void* ptr){
if(as_){
//make sure that the action server hasn't been destroyed yet
DestructionGuard::ScopedProtector protector(*guard_);
if(protector.isProtected()){
//make sure to lock while we erase status for this goal from the list
as_->lock_.lock();
(*status_it_).handle_destruction_time_ = ros::Time::now();
//as_->status_list_.erase(status_it_);
as_->lock_.unlock();
}
}
}
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/action_server_base.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTION_LIB_ACTION_SERVER_BASE
#define ACTION_LIB_ACTION_SERVER_BASE
#include <ros/ros.h>
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <actionlib_msgs/GoalID.h>
#include <actionlib_msgs/GoalStatusArray.h>
#include <actionlib_msgs/GoalStatus.h>
#include <actionlib/enclosure_deleter.h>
#include <actionlib/goal_id_generator.h>
#include <actionlib/action_definition.h>
#include <actionlib/server/status_tracker.h>
#include <actionlib/server/handle_tracker_deleter.h>
#include <actionlib/server/server_goal_handle.h>
#include <actionlib/destruction_guard.h>
#include <list>
namespace actionlib {
/**
* @class ActionServerBase
* @brief The ActionServerBase implements the logic for an ActionServer.
*/
template <class ActionSpec>
class ActionServerBase {
public:
//for convenience when referring to ServerGoalHandles
typedef ServerGoalHandle<ActionSpec> GoalHandle;
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
/**
* @brief Constructor for an ActionServer
* @param goal_cb A goal callback to be called when the ActionServer receives a new goal over the wire
* @param cancel_cb A cancel callback to be called when the ActionServer receives a new cancel request over the wire
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
ActionServerBase(
boost::function<void (GoalHandle)> goal_cb,
boost::function<void (GoalHandle)> cancel_cb,
bool auto_start = false);
/**
* @brief Destructor for the ActionServerBase
*/
virtual ~ActionServerBase();
/**
* @brief Register a callback to be invoked when a new goal is received, this will replace any previously registered callback
* @param cb The callback to invoke
*/
void registerGoalCallback(boost::function<void (GoalHandle)> cb);
/**
* @brief Register a callback to be invoked when a new cancel is received, this will replace any previously registered callback
* @param cb The callback to invoke
*/
void registerCancelCallback(boost::function<void (GoalHandle)> cb);
/**
* @brief Explicitly start the action server, used it auto_start is set to false
*/
void start();
/**
* @brief The ROS callback for goals coming into the ActionServerBase
*/
void goalCallback(const boost::shared_ptr<const ActionGoal>& goal);
/**
* @brief The ROS callback for cancel requests coming into the ActionServerBase
*/
void cancelCallback(const boost::shared_ptr<const actionlib_msgs::GoalID>& goal_id);
protected:
// Allow access to protected fields for helper classes
friend class ServerGoalHandle<ActionSpec>;
friend class HandleTrackerDeleter<ActionSpec>;
/**
* @brief Initialize all ROS connections and setup timers
*/
virtual void initialize() = 0;
/**
* @brief Publishes a result for a given goal
* @param status The status of the goal with which the result is associated
* @param result The result to publish
*/
virtual void publishResult(const actionlib_msgs::GoalStatus& status, const Result& result) = 0;
/**
* @brief Publishes feedback for a given goal
* @param status The status of the goal with which the feedback is associated
* @param feedback The feedback to publish
*/
virtual void publishFeedback(const actionlib_msgs::GoalStatus& status, const Feedback& feedback) = 0;
/**
* @brief Explicitly publish status
*/
virtual void publishStatus() = 0;
boost::recursive_mutex lock_;
std::list<StatusTracker<ActionSpec> > status_list_;
boost::function<void (GoalHandle)> goal_callback_;
boost::function<void (GoalHandle)> cancel_callback_;
ros::Time last_cancel_;
ros::Duration status_list_timeout_;
GoalIDGenerator id_generator_;
bool started_;
boost::shared_ptr<DestructionGuard> guard_;
};
template <class ActionSpec>
ActionServerBase<ActionSpec>::ActionServerBase(
boost::function<void (GoalHandle)> goal_cb,
boost::function<void (GoalHandle)> cancel_cb,
bool auto_start) :
goal_callback_(goal_cb),
cancel_callback_(cancel_cb),
started_(auto_start),
guard_(new DestructionGuard)
{
}
template <class ActionSpec>
ActionServerBase<ActionSpec>::~ActionServerBase()
{
// Block until we can safely destruct
guard_->destruct();
}
template <class ActionSpec>
void ActionServerBase<ActionSpec>::registerGoalCallback(boost::function<void (GoalHandle)> cb)
{
goal_callback_ = cb;
}
template <class ActionSpec>
void ActionServerBase<ActionSpec>::registerCancelCallback(boost::function<void (GoalHandle)> cb)
{
cancel_callback_ = cb;
}
template <class ActionSpec>
void ActionServerBase<ActionSpec>::start()
{
initialize();
started_ = true;
publishStatus();
}
template <class ActionSpec>
void ActionServerBase<ActionSpec>::goalCallback(const boost::shared_ptr<const ActionGoal>& goal)
{
boost::recursive_mutex::scoped_lock lock(lock_);
//if we're not started... then we're not actually going to do anything
if(!started_)
return;
ROS_DEBUG_NAMED("actionlib", "The action server has received a new goal request");
//we need to check if this goal already lives in the status list
for(typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.begin(); it != status_list_.end(); ++it){
if(goal->goal_id.id == (*it).status_.goal_id.id){
// The goal could already be in a recalling state if a cancel came in before the goal
if ( (*it).status_.status == actionlib_msgs::GoalStatus::RECALLING ) {
(*it).status_.status = actionlib_msgs::GoalStatus::RECALLED;
publishResult((*it).status_, Result());
}
//if this is a request for a goal that has no active handles left,
//we'll bump how long it stays in the list
if((*it).handle_tracker_.expired()){
(*it).handle_destruction_time_ = goal->goal_id.stamp;
}
//make sure not to call any user callbacks or add duplicate status onto the list
return;
}
}
//if the goal is not in our list, we need to create a StatusTracker associated with this goal and push it on
typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.insert(status_list_.end(), StatusTracker<ActionSpec> (goal));
//we need to create a handle tracker for the incoming goal and update the StatusTracker
HandleTrackerDeleter<ActionSpec> d(this, it, guard_);
boost::shared_ptr<void> handle_tracker((void *)NULL, d);
(*it).handle_tracker_ = handle_tracker;
//check if this goal has already been canceled based on its timestamp
if(goal->goal_id.stamp != ros::Time() && goal->goal_id.stamp <= last_cancel_){
//if it has... just create a GoalHandle for it and setCanceled
GoalHandle gh(it, this, handle_tracker, guard_);
gh.setCanceled(Result(), "This goal handle was canceled by the action server because its timestamp is before the timestamp of the last cancel request");
}
else{
GoalHandle gh = GoalHandle(it, this, handle_tracker, guard_);
//make sure that we unlock before calling the users callback
lock_.unlock();
//now, we need to create a goal handle and call the user's callback
goal_callback_(gh);
lock_.lock();
}
}
template <class ActionSpec>
void ActionServerBase<ActionSpec>::cancelCallback(const boost::shared_ptr<const actionlib_msgs::GoalID>& goal_id)
{
boost::recursive_mutex::scoped_lock lock(lock_);
//if we're not started... then we're not actually going to do anything
if(!started_)
return;
//we need to handle a cancel for the user
ROS_DEBUG_NAMED("actionlib", "The action server has received a new cancel request");
bool goal_id_found = false;
for(typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.begin(); it != status_list_.end(); ++it){
//check if the goal id is zero or if it is equal to the goal id of
//the iterator or if the time of the iterator warrants a cancel
if(
(goal_id->id == "" && goal_id->stamp == ros::Time()) //id and stamp 0 --> cancel everything
|| goal_id->id == (*it).status_.goal_id.id //ids match... cancel that goal
|| (goal_id->stamp != ros::Time() && (*it).status_.goal_id.stamp <= goal_id->stamp) //stamp != 0 --> cancel everything before stamp
){
//we need to check if we need to store this cancel request for later
if(goal_id->id == (*it).status_.goal_id.id)
goal_id_found = true;
//attempt to get the handle_tracker for the list item if it exists
boost::shared_ptr<void> handle_tracker = (*it).handle_tracker_.lock();
if((*it).handle_tracker_.expired()){
//if the handle tracker is expired, then we need to create a new one
HandleTrackerDeleter<ActionSpec> d(this, it, guard_);
handle_tracker = boost::shared_ptr<void>((void *)NULL, d);
(*it).handle_tracker_ = handle_tracker;
//we also need to reset the time that the status is supposed to be removed from the list
(*it).handle_destruction_time_ = ros::Time();
}
//set the status of the goal to PREEMPTING or RECALLING as approriate
//and check if the request should be passed on to the user
GoalHandle gh(it, this, handle_tracker, guard_);
if(gh.setCancelRequested()){
//make sure that we're unlocked before we call the users callback
lock_.unlock();
//call the user's cancel callback on the relevant goal
cancel_callback_(gh);
//lock for further modification of the status list
lock_.lock();
}
}
}
//if the requested goal_id was not found, and it is non-zero, then we need to store the cancel request
if(goal_id->id != "" && !goal_id_found){
typename std::list<StatusTracker<ActionSpec> >::iterator it = status_list_.insert(status_list_.end(),
StatusTracker<ActionSpec> (*goal_id, actionlib_msgs::GoalStatus::RECALLING));
//start the timer for how long the status will live in the list without a goal handle to it
(*it).handle_destruction_time_ = goal_id->stamp;
}
//make sure to set last_cancel_ based on the stamp associated with this cancel request
if(goal_id->stamp > last_cancel_)
last_cancel_ = goal_id->stamp;
}
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/service_server_imp.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_SERVER_SERVICE_SERVER_IMP_H_
#define ACTIONLIB_SERVER_SERVICE_SERVER_IMP_H_
namespace actionlib {
template <class ActionSpec>
ServiceServer advertiseService(ros::NodeHandle n, std::string name,
boost::function<bool (const typename ActionSpec::_action_goal_type::_goal_type&,
typename ActionSpec::_action_result_type::_result_type& result)> service_cb)
{
boost::shared_ptr<ServiceServerImp> server_ptr(new ServiceServerImpT<ActionSpec>(n, name, service_cb));
return ServiceServer(server_ptr);
}
template <class ActionSpec>
ServiceServerImpT<ActionSpec>::ServiceServerImpT(ros::NodeHandle n, std::string name,
boost::function<bool (const Goal&, Result& result)> service_cb)
: service_cb_(service_cb)
{
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n, name,
boost::bind(&ServiceServerImpT::goalCB, this, _1), false));
as_->start();
}
template <class ActionSpec>
void ServiceServerImpT<ActionSpec>::goalCB(GoalHandle goal){
goal.setAccepted("This goal has been accepted by the service server");
//we need to pass the result into the users callback
Result r;
if(service_cb_(*(goal.getGoal()), r))
goal.setSucceeded(r, "The service server successfully processed the request");
else
goal.setAborted(r, "The service server failed to process the request");
}
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/simple_action_server_imp.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
namespace actionlib {
template <class ActionSpec>
SimpleActionServer<ActionSpec>::SimpleActionServer(std::string name, ExecuteCallback execute_callback, bool auto_start)
: new_goal_(false), preempt_request_(false), new_goal_preempt_request_(false), execute_callback_(execute_callback), execute_thread_(NULL), need_to_terminate_(false) {
if (execute_callback_ != NULL)
{
execute_thread_ = new boost::thread(boost::bind(&SimpleActionServer::executeLoop, this));
}
//create the action server
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n_, name,
boost::bind(&SimpleActionServer::goalCallback, this, _1),
boost::bind(&SimpleActionServer::preemptCallback, this, _1),
auto_start));
}
template <class ActionSpec>
SimpleActionServer<ActionSpec>::SimpleActionServer(std::string name, bool auto_start)
: new_goal_(false), preempt_request_(false), new_goal_preempt_request_(false), execute_callback_(NULL), execute_thread_(NULL), need_to_terminate_(false) {
//create the action server
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n_, name,
boost::bind(&SimpleActionServer::goalCallback, this, _1),
boost::bind(&SimpleActionServer::preemptCallback, this, _1),
auto_start));
if (execute_callback_ != NULL)
{
execute_thread_ = new boost::thread(boost::bind(&SimpleActionServer::executeLoop, this));
}
}
template <class ActionSpec>
SimpleActionServer<ActionSpec>::SimpleActionServer(std::string name, ExecuteCallback execute_callback)
: new_goal_(false), preempt_request_(false), new_goal_preempt_request_(false), execute_callback_(execute_callback), execute_thread_(NULL), need_to_terminate_(false) {
//create the action server
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n_, name,
boost::bind(&SimpleActionServer::goalCallback, this, _1),
boost::bind(&SimpleActionServer::preemptCallback, this, _1),
true));
if (execute_callback_ != NULL)
{
execute_thread_ = new boost::thread(boost::bind(&SimpleActionServer::executeLoop, this));
}
}
template <class ActionSpec>
SimpleActionServer<ActionSpec>::SimpleActionServer(ros::NodeHandle n, std::string name, ExecuteCallback execute_callback, bool auto_start)
: n_(n), new_goal_(false), preempt_request_(false), new_goal_preempt_request_(false), execute_callback_(execute_callback), execute_thread_(NULL), need_to_terminate_(false) {
//create the action server
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n, name,
boost::bind(&SimpleActionServer::goalCallback, this, _1),
boost::bind(&SimpleActionServer::preemptCallback, this, _1),
auto_start));
if (execute_callback_ != NULL)
{
execute_thread_ = new boost::thread(boost::bind(&SimpleActionServer::executeLoop, this));
}
}
template <class ActionSpec>
SimpleActionServer<ActionSpec>::SimpleActionServer(ros::NodeHandle n, std::string name, bool auto_start)
: n_(n), new_goal_(false), preempt_request_(false), new_goal_preempt_request_(false), execute_callback_(NULL), execute_thread_(NULL), need_to_terminate_(false) {
//create the action server
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n, name,
boost::bind(&SimpleActionServer::goalCallback, this, _1),
boost::bind(&SimpleActionServer::preemptCallback, this, _1),
auto_start));
if (execute_callback_ != NULL)
{
execute_thread_ = new boost::thread(boost::bind(&SimpleActionServer::executeLoop, this));
}
}
template <class ActionSpec>
SimpleActionServer<ActionSpec>::SimpleActionServer(ros::NodeHandle n, std::string name, ExecuteCallback execute_callback)
: n_(n), new_goal_(false), preempt_request_(false), new_goal_preempt_request_(false), execute_callback_(execute_callback), execute_thread_(NULL), need_to_terminate_(false) {
//create the action server
as_ = boost::shared_ptr<ActionServer<ActionSpec> >(new ActionServer<ActionSpec>(n, name,
boost::bind(&SimpleActionServer::goalCallback, this, _1),
boost::bind(&SimpleActionServer::preemptCallback, this, _1),
true));
if (execute_callback_ != NULL)
{
execute_thread_ = new boost::thread(boost::bind(&SimpleActionServer::executeLoop, this));
}
}
template <class ActionSpec>
SimpleActionServer<ActionSpec>::~SimpleActionServer()
{
if(execute_thread_)
shutdown();
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::shutdown()
{
if (execute_callback_)
{
{
boost::mutex::scoped_lock terminate_lock(terminate_mutex_);
need_to_terminate_ = true;
}
assert(execute_thread_);
execute_thread_->join();
delete execute_thread_;
execute_thread_ = NULL;
}
}
template <class ActionSpec>
boost::shared_ptr<const typename SimpleActionServer<ActionSpec>::Goal> SimpleActionServer<ActionSpec>::acceptNewGoal(){
boost::recursive_mutex::scoped_lock lock(lock_);
if(!new_goal_ || !next_goal_.getGoal()){
ROS_ERROR_NAMED("actionlib", "Attempting to accept the next goal when a new goal is not available");
return boost::shared_ptr<const Goal>();
}
//check if we need to send a preempted message for the goal that we're currently pursuing
if(isActive()
&& current_goal_.getGoal()
&& current_goal_ != next_goal_){
current_goal_.setCanceled(Result(), "This goal was canceled because another goal was recieved by the simple action server");
}
ROS_DEBUG_NAMED("actionlib", "Accepting a new goal");
//accept the next goal
current_goal_ = next_goal_;
new_goal_ = false;
//set preempt to request to equal the preempt state of the new goal
preempt_request_ = new_goal_preempt_request_;
new_goal_preempt_request_ = false;
//set the status of the current goal to be active
current_goal_.setAccepted("This goal has been accepted by the simple action server");
return current_goal_.getGoal();
}
template <class ActionSpec>
bool SimpleActionServer<ActionSpec>::isNewGoalAvailable(){
return new_goal_;
}
template <class ActionSpec>
bool SimpleActionServer<ActionSpec>::isPreemptRequested(){
return preempt_request_;
}
template <class ActionSpec>
bool SimpleActionServer<ActionSpec>::isActive(){
if(!current_goal_.getGoal())
return false;
unsigned int status = current_goal_.getGoalStatus().status;
return status == actionlib_msgs::GoalStatus::ACTIVE || status == actionlib_msgs::GoalStatus::PREEMPTING;
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::setSucceeded(const Result& result, const std::string& text){
boost::recursive_mutex::scoped_lock lock(lock_);
ROS_DEBUG_NAMED("actionlib", "Setting the current goal as succeeded");
current_goal_.setSucceeded(result, text);
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::setAborted(const Result& result, const std::string& text){
boost::recursive_mutex::scoped_lock lock(lock_);
ROS_DEBUG_NAMED("actionlib", "Setting the current goal as aborted");
current_goal_.setAborted(result, text);
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::setPreempted(const Result& result, const std::string& text){
boost::recursive_mutex::scoped_lock lock(lock_);
ROS_DEBUG_NAMED("actionlib", "Setting the current goal as canceled");
current_goal_.setCanceled(result, text);
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::registerGoalCallback(boost::function<void ()> cb){
// Cannot register a goal callback if an execute callback exists
if (execute_callback_)
ROS_WARN_NAMED("actionlib", "Cannot call SimpleActionServer::registerGoalCallback() because an executeCallback exists. Not going to register it.");
else
goal_callback_ = cb;
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::registerPreemptCallback(boost::function<void ()> cb){
preempt_callback_ = cb;
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::publishFeedback(const FeedbackConstPtr& feedback)
{
current_goal_.publishFeedback(*feedback);
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::publishFeedback(const Feedback& feedback)
{
current_goal_.publishFeedback(feedback);
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::goalCallback(GoalHandle goal){
boost::recursive_mutex::scoped_lock lock(lock_);
ROS_DEBUG_NAMED("actionlib", "A new goal has been recieved by the single goal action server");
//check that the timestamp is past or equal to that of the current goal and the next goal
if((!current_goal_.getGoal() || goal.getGoalID().stamp >= current_goal_.getGoalID().stamp)
&& (!next_goal_.getGoal() || goal.getGoalID().stamp >= next_goal_.getGoalID().stamp)){
//if next_goal has not been accepted already... its going to get bumped, but we need to let the client know we're preempting
if(next_goal_.getGoal() && (!current_goal_.getGoal() || next_goal_ != current_goal_)){
next_goal_.setCanceled(Result(), "This goal was canceled because another goal was recieved by the simple action server");
}
next_goal_ = goal;
new_goal_ = true;
new_goal_preempt_request_ = false;
//if the server is active, we'll want to call the preempt callback for the current goal
if(isActive()){
preempt_request_ = true;
//if the user has registered a preempt callback, we'll call it now
if(preempt_callback_)
preempt_callback_();
}
//if the user has defined a goal callback, we'll call it now
if(goal_callback_)
goal_callback_();
// Trigger runLoop to call execute()
execute_condition_.notify_all();
}
else{
//the goal requested has already been preempted by a different goal, so we're not going to execute it
goal.setCanceled(Result(), "This goal was canceled because another goal was recieved by the simple action server");
}
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::preemptCallback(GoalHandle preempt){
boost::recursive_mutex::scoped_lock lock(lock_);
ROS_DEBUG_NAMED("actionlib", "A preempt has been received by the SimpleActionServer");
//if the preempt is for the current goal, then we'll set the preemptRequest flag and call the user's preempt callback
if(preempt == current_goal_){
ROS_DEBUG_NAMED("actionlib", "Setting preempt_request bit for the current goal to TRUE and invoking callback");
preempt_request_ = true;
//if the user has registered a preempt callback, we'll call it now
if(preempt_callback_)
preempt_callback_();
}
//if the preempt applies to the next goal, we'll set the preempt bit for that
else if(preempt == next_goal_){
ROS_DEBUG_NAMED("actionlib", "Setting preempt request bit for the next goal to TRUE");
new_goal_preempt_request_ = true;
}
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::executeLoop(){
ros::Duration loop_duration = ros::Duration().fromSec(.1);
while (n_.ok())
{
{
boost::mutex::scoped_lock terminate_lock(terminate_mutex_);
if (need_to_terminate_)
break;
}
boost::recursive_mutex::scoped_lock lock(lock_);
if (isActive())
ROS_ERROR_NAMED("actionlib", "Should never reach this code with an active goal");
else if (isNewGoalAvailable())
{
GoalConstPtr goal = acceptNewGoal();
ROS_FATAL_COND(!execute_callback_, "execute_callback_ must exist. This is a bug in SimpleActionServer");
// Make sure we're not locked when we call execute
lock.unlock();
execute_callback_(goal);
lock.lock();
if (isActive())
{
ROS_WARN_NAMED("actionlib", "Your executeCallback did not set the goal to a terminal status.\n"
"This is a bug in your ActionServer implementation. Fix your code!\n"
"For now, the ActionServer will set this goal to aborted");
setAborted(Result(), "This goal was aborted by the simple action server. The user should have set a terminal status on this goal and did not");
}
}
else
execute_condition_.timed_wait(lock, boost::posix_time::milliseconds(loop_duration.toSec() * 1000.0f));
}
}
template <class ActionSpec>
void SimpleActionServer<ActionSpec>::start(){
as_->start();
}
};
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/service_server.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_SERVER_SERVICE_SERVER_H_
#define ACTIONLIB_SERVER_SERVICE_SERVER_H_
#include <actionlib/action_definition.h>
#include <actionlib/server/action_server.h>
namespace actionlib {
class ServiceServerImp {
public:
ServiceServerImp(){}
virtual ~ServiceServerImp(){}
};
class ServiceServer {
public:
ServiceServer(boost::shared_ptr<ServiceServerImp> server) : server_(server) {}
private:
boost::shared_ptr<ServiceServerImp> server_;
};
template <class ActionSpec>
ServiceServer advertiseService(ros::NodeHandle n, std::string name,
boost::function<bool (const typename ActionSpec::_action_goal_type::_goal_type&,
typename ActionSpec::_action_result_type::_result_type& result)> service_cb);
template <class ActionSpec>
class ServiceServerImpT : public ServiceServerImp {
public:
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
typedef typename ActionServer<ActionSpec>::GoalHandle GoalHandle;
ServiceServerImpT(ros::NodeHandle n, std::string name,
boost::function<bool (const Goal&, Result& result)> service_cb);
void goalCB(GoalHandle g);
private:
boost::shared_ptr<ActionServer<ActionSpec> > as_;
boost::function<bool (const Goal&, Result& result)> service_cb_;
};
};
//include the implementation
#include <actionlib/server/service_server_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/simple_action_server.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_SIMPLE_ACTION_SERVER_H_
#define ACTIONLIB_SIMPLE_ACTION_SERVER_H_
#include <boost/thread/condition.hpp>
#include <ros/ros.h>
#include <actionlib/server/action_server.h>
#include <actionlib/action_definition.h>
namespace actionlib {
/** @class SimpleActionServer @brief The SimpleActionServer
* implements a single goal policy on top of the ActionServer class. The
* specification of the policy is as follows: only one goal can have an
* active status at a time, new goals preempt previous goals based on the
* stamp in their GoalID field (later goals preempt earlier ones), an
* explicit preempt goal preempts all goals with timestamps that are less
* than or equal to the stamp associated with the preempt, accepting a new
* goal implies successful preemption of any old goal and the status of the
* old goal will be change automatically to reflect this.
*/
template <class ActionSpec>
class SimpleActionServer {
public:
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
typedef typename ActionServer<ActionSpec>::GoalHandle GoalHandle;
typedef boost::function<void (const GoalConstPtr&)> ExecuteCallback;
/**
* @brief Constructor for a SimpleActionServer
* @param name A name for the action server
* @param execute_cb Optional callback that gets called in a separate thread whenever
* a new goal is received, allowing users to have blocking callbacks.
* Adding an execute callback also deactivates the goalCallback.
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
SimpleActionServer(std::string name, ExecuteCallback execute_cb, bool auto_start);
/**
* @brief Constructor for a SimpleActionServer
* @param name A name for the action server
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
SimpleActionServer(std::string name, bool auto_start);
/**
* @brief DEPRECATED: Constructor for a SimpleActionServer
* @param name A name for the action server
* @param execute_cb Optional callback that gets called in a separate thread whenever
* a new goal is received, allowing users to have blocking callbacks.
* Adding an execute callback also deactivates the goalCallback.
*/
ROS_DEPRECATED SimpleActionServer(std::string name, ExecuteCallback execute_cb = NULL);
/**
* @brief Constructor for a SimpleActionServer
* @param n A NodeHandle to create a namespace under
* @param name A name for the action server
* @param execute_cb Optional callback that gets called in a separate thread whenever
* a new goal is received, allowing users to have blocking callbacks.
* Adding an execute callback also deactivates the goalCallback.
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
SimpleActionServer(ros::NodeHandle n, std::string name, ExecuteCallback execute_cb, bool auto_start);
/**
* @brief Constructor for a SimpleActionServer
* @param n A NodeHandle to create a namespace under
* @param name A name for the action server
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
SimpleActionServer(ros::NodeHandle n, std::string name, bool auto_start);
/**
* @brief Constructor for a SimpleActionServer
* @param n A NodeHandle to create a namespace under
* @param name A name for the action server
* @param execute_cb Optional callback that gets called in a separate thread whenever
* a new goal is received, allowing users to have blocking callbacks.
* Adding an execute callback also deactivates the goalCallback.
*/
ROS_DEPRECATED SimpleActionServer(ros::NodeHandle n, std::string name, ExecuteCallback execute_cb = NULL);
~SimpleActionServer();
/**
* @brief Accepts a new goal when one is available The status of this
* goal is set to active upon acceptance, and the status of any
* previously active goal is set to preempted. Preempts received for the
* new goal between checking if isNewGoalAvailable or invokation of a
* goal callback and the acceptNewGoal call will not trigger a preempt
* callback. This means, isPreemptReqauested should be called after
* accepting the goal even for callback-based implementations to make
* sure the new goal does not have a pending preempt request.
* @return A shared_ptr to the new goal.
*/
boost::shared_ptr<const Goal> acceptNewGoal();
/**
* @brief Allows polling implementations to query about the availability of a new goal
* @return True if a new goal is available, false otherwise
*/
bool isNewGoalAvailable();
/**
* @brief Allows polling implementations to query about preempt requests
* @return True if a preempt is requested, false otherwise
*/
bool isPreemptRequested();
/**
* @brief Allows polling implementations to query about the status of the current goal
* @return True if a goal is active, false otherwise
*/
bool isActive();
/**
* @brief Sets the status of the active goal to succeeded
* @param result An optional result to send back to any clients of the goal
* @param result An optional text message to send back to any clients of the goal
*/
void setSucceeded(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Sets the status of the active goal to aborted
* @param result An optional result to send back to any clients of the goal
* @param result An optional text message to send back to any clients of the goal
*/
void setAborted(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Publishes feedback for a given goal
* @param feedback Shared pointer to the feedback to publish
*/
void publishFeedback(const FeedbackConstPtr& feedback);
/**
* @brief Publishes feedback for a given goal
* @param feedback The feedback to publish
*/
void publishFeedback(const Feedback& feedback);
/**
* @brief Sets the status of the active goal to preempted
* @param result An optional result to send back to any clients of the goal
* @param result An optional text message to send back to any clients of the goal
*/
void setPreempted(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Allows users to register a callback to be invoked when a new goal is available
* @param cb The callback to be invoked
*/
void registerGoalCallback(boost::function<void ()> cb);
/**
* @brief Allows users to register a callback to be invoked when a new preempt request is available
* @param cb The callback to be invoked
*/
void registerPreemptCallback(boost::function<void ()> cb);
/**
* @brief Explicitly start the action server, used it auto_start is set to false
*/
void start();
/**
* @brief Explicitly shutdown the action server
*/
void shutdown();
private:
/**
* @brief Callback for when the ActionServer receives a new goal and passes it on
*/
void goalCallback(GoalHandle goal);
/**
* @brief Callback for when the ActionServer receives a new preempt and passes it on
*/
void preemptCallback(GoalHandle preempt);
/**
* @brief Called from a separate thread to call blocking execute calls
*/
void executeLoop();
ros::NodeHandle n_;
boost::shared_ptr<ActionServer<ActionSpec> > as_;
GoalHandle current_goal_, next_goal_;
bool new_goal_, preempt_request_, new_goal_preempt_request_;
boost::recursive_mutex lock_;
boost::function<void ()> goal_callback_;
boost::function<void ()> preempt_callback_;
ExecuteCallback execute_callback_;
boost::condition execute_condition_;
boost::thread* execute_thread_;
boost::mutex terminate_mutex_;
bool need_to_terminate_;
};
};
//include the implementation here
#include <actionlib/server/simple_action_server_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/status_tracker_imp.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_STATUS_TRACKER_IMP_H_
#define ACTIONLIB_STATUS_TRACKER_IMP_H_
namespace actionlib {
template <class ActionSpec>
StatusTracker<ActionSpec>::StatusTracker(const actionlib_msgs::GoalID& goal_id, unsigned int status){
//set the goal id and status appropriately
status_.goal_id = goal_id;
status_.status = status;
}
template <class ActionSpec>
StatusTracker<ActionSpec>::StatusTracker(const boost::shared_ptr<const ActionGoal>& goal)
: goal_(goal) {
//set the goal_id from the message
status_.goal_id = goal_->goal_id;
//initialize the status of the goal to pending
status_.status = actionlib_msgs::GoalStatus::PENDING;
//if the goal id is zero, then we need to make up an id for the goal
if(status_.goal_id.id == ""){
status_.goal_id = id_generator_.generateID();
}
//if the timestamp of the goal is zero, then we'll set it to now()
if(status_.goal_id.stamp == ros::Time()){
status_.goal_id.stamp = ros::Time::now();
}
}
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/action_server_imp.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_ACTION_SERVER_IMP_H_
#define ACTIONLIB_ACTION_SERVER_IMP_H_
namespace actionlib {
template <class ActionSpec>
ActionServer<ActionSpec>::ActionServer(
ros::NodeHandle n,
std::string name,
bool auto_start) :
ActionServerBase<ActionSpec>(boost::function<void (GoalHandle)>(),boost::function<void (GoalHandle)>(), auto_start),
node_(n, name)
{
//if we're to autostart... then we'll initialize things
if(this->started_){
ROS_WARN_NAMED("actionlib", "You've passed in true for auto_start for the C++ action server at [%s]. You should always pass in false to avoid race conditions.", node_.getNamespace().c_str());
}
}
template <class ActionSpec>
ActionServer<ActionSpec>::ActionServer(ros::NodeHandle n, std::string name) :
ActionServerBase<ActionSpec>(boost::function<void (GoalHandle)>(),boost::function<void (GoalHandle)>(), true),
node_(n, name)
{
//if we're to autostart... then we'll initialize things
if(this->started_){
ROS_WARN_NAMED("actionlib", "You've passed in true for auto_start for the C++ action server at [%s]. You should always pass in false to avoid race conditions.", node_.getNamespace().c_str());
initialize();
publishStatus();
}
}
template <class ActionSpec>
ActionServer<ActionSpec>::ActionServer(ros::NodeHandle n, std::string name,
boost::function<void (GoalHandle)> goal_cb,
boost::function<void (GoalHandle)> cancel_cb,
bool auto_start) :
ActionServerBase<ActionSpec>(goal_cb, cancel_cb, auto_start),
node_(n, name)
{
//if we're to autostart... then we'll initialize things
if(this->started_){
ROS_WARN_NAMED("actionlib", "You've passed in true for auto_start for the C++ action server at [%s]. You should always pass in false to avoid race conditions.", node_.getNamespace().c_str());
initialize();
publishStatus();
}
}
template <class ActionSpec>
ActionServer<ActionSpec>::ActionServer(ros::NodeHandle n, std::string name,
boost::function<void (GoalHandle)> goal_cb,
boost::function<void (GoalHandle)> cancel_cb) :
ActionServerBase<ActionSpec>(goal_cb, cancel_cb, true),
node_(n, name)
{
//if we're to autostart... then we'll initialize things
if(this->started_){
ROS_WARN_NAMED("actionlib", "You've passed in true for auto_start for the C++ action server at [%s]. You should always pass in false to avoid race conditions.", node_.getNamespace().c_str());
initialize();
publishStatus();
}
}
template <class ActionSpec>
ActionServer<ActionSpec>::ActionServer(ros::NodeHandle n, std::string name,
boost::function<void (GoalHandle)> goal_cb,
bool auto_start) :
ActionServerBase<ActionSpec>(goal_cb, boost::function<void (GoalHandle)>(), auto_start),
node_(n, name)
{
//if we're to autostart... then we'll initialize things
if(this->started_){
ROS_WARN_NAMED("actionlib", "You've passed in true for auto_start for the C++ action server at [%s]. You should always pass in false to avoid race conditions.", node_.getNamespace().c_str());
initialize();
publishStatus();
}
}
template <class ActionSpec>
ActionServer<ActionSpec>::~ActionServer()
{
}
template <class ActionSpec>
void ActionServer<ActionSpec>::initialize()
{
result_pub_ = node_.advertise<ActionResult>("result", 50);
feedback_pub_ = node_.advertise<ActionFeedback>("feedback", 50);
status_pub_ = node_.advertise<actionlib_msgs::GoalStatusArray>("status", 50, true);
//read the frequency with which to publish status from the parameter server
//if not specified locally explicitly, use search param to find actionlib_status_frequency
double status_frequency, status_list_timeout;
if(!node_.getParam("status_frequency", status_frequency))
{
std::string status_frequency_param_name;
if(!node_.searchParam("actionlib_status_frequency", status_frequency_param_name))
status_frequency = 5.0;
else
node_.param(status_frequency_param_name, status_frequency, 5.0);
}
else
ROS_WARN_NAMED("actionlib", "You're using the deprecated status_frequency parameter, please switch to actionlib_status_frequency.");
node_.param("status_list_timeout", status_list_timeout, 5.0);
this->status_list_timeout_ = ros::Duration(status_list_timeout);
if(status_frequency > 0){
status_timer_ = node_.createTimer(ros::Duration(1.0 / status_frequency),
boost::bind(&ActionServer::publishStatus, this, _1));
}
goal_sub_ = node_.subscribe<ActionGoal>("goal", 50,
boost::bind(&ActionServerBase<ActionSpec>::goalCallback, this, _1));
cancel_sub_ = node_.subscribe<actionlib_msgs::GoalID>("cancel", 50,
boost::bind(&ActionServerBase<ActionSpec>::cancelCallback, this, _1));
}
template <class ActionSpec>
void ActionServer<ActionSpec>::publishResult(const actionlib_msgs::GoalStatus& status, const Result& result)
{
boost::recursive_mutex::scoped_lock lock(this->lock_);
//we'll create a shared_ptr to pass to ROS to limit copying
boost::shared_ptr<ActionResult> ar(new ActionResult);
ar->header.stamp = ros::Time::now();
ar->status = status;
ar->result = result;
ROS_DEBUG_NAMED("actionlib", "Publishing result for goal with id: %s and stamp: %.2f", status.goal_id.id.c_str(), status.goal_id.stamp.toSec());
result_pub_.publish(ar);
publishStatus();
}
template <class ActionSpec>
void ActionServer<ActionSpec>::publishFeedback(const actionlib_msgs::GoalStatus& status, const Feedback& feedback)
{
boost::recursive_mutex::scoped_lock lock(this->lock_);
//we'll create a shared_ptr to pass to ROS to limit copying
boost::shared_ptr<ActionFeedback> af(new ActionFeedback);
af->header.stamp = ros::Time::now();
af->status = status;
af->feedback = feedback;
ROS_DEBUG_NAMED("actionlib", "Publishing feedback for goal with id: %s and stamp: %.2f", status.goal_id.id.c_str(), status.goal_id.stamp.toSec());
feedback_pub_.publish(af);
}
template <class ActionSpec>
void ActionServer<ActionSpec>::publishStatus(const ros::TimerEvent& e)
{
boost::recursive_mutex::scoped_lock lock(this->lock_);
//we won't publish status unless we've been started
if(!this->started_)
return;
publishStatus();
}
template <class ActionSpec>
void ActionServer<ActionSpec>::publishStatus()
{
boost::recursive_mutex::scoped_lock lock(this->lock_);
//build a status array
actionlib_msgs::GoalStatusArray status_array;
status_array.header.stamp = ros::Time::now();
status_array.status_list.resize(this->status_list_.size());
unsigned int i = 0;
for(typename std::list<StatusTracker<ActionSpec> >::iterator it = this->status_list_.begin(); it != this->status_list_.end();){
status_array.status_list[i] = (*it).status_;
//check if the item is due for deletion from the status list
if((*it).handle_destruction_time_ != ros::Time()
&& (*it).handle_destruction_time_ + this->status_list_timeout_ < ros::Time::now()){
it = this->status_list_.erase(it);
}
else
++it;
++i;
}
status_pub_.publish(status_array);
}
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/status_tracker.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_STATUS_TRACKER_H_
#define ACTIONLIB_STATUS_TRACKER_H_
#include <actionlib_msgs/GoalID.h>
#include <actionlib_msgs/GoalStatus.h>
#include <actionlib/action_definition.h>
#include <actionlib/goal_id_generator.h>
namespace actionlib {
/**
* @class StatusTracker
* @brief A class for storing the status of each goal the action server
* is currently working on
*/
template <class ActionSpec>
class StatusTracker {
private:
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
public:
StatusTracker(const actionlib_msgs::GoalID& goal_id, unsigned int status);
StatusTracker(const boost::shared_ptr<const ActionGoal>& goal);
boost::shared_ptr<const ActionGoal> goal_;
boost::weak_ptr<void> handle_tracker_;
actionlib_msgs::GoalStatus status_;
ros::Time handle_destruction_time_;
private:
GoalIDGenerator id_generator_;
};
};
//include the implementation
#include <actionlib/server/status_tracker_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/server_goal_handle.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_SERVER_GOAL_HANDLE_H_
#define ACTIONLIB_SERVER_GOAL_HANDLE_H_
#include <actionlib_msgs/GoalID.h>
#include <actionlib_msgs/GoalStatus.h>
#include <actionlib/action_definition.h>
#include <actionlib/server/status_tracker.h>
#include <actionlib/destruction_guard.h>
#include <boost/shared_ptr.hpp>
namespace actionlib {
//forward declaration of ActionServerBase
template <class ActionSpec>
class ActionServerBase;
/**
* @class ServerGoalHandle
* @brief Encapsulates a state machine for a given goal that the user can
* trigger transisions on. All ROS interfaces for the goal are managed by
* the ActionServer to lessen the burden on the user.
*/
template <class ActionSpec>
class ServerGoalHandle {
private:
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
public:
/**
* @brief Default constructor for a ServerGoalHandle
*/
ServerGoalHandle();
/**
* @brief Copy constructor for a ServerGoalHandle
* @param gh The goal handle to copy
*/
ServerGoalHandle(const ServerGoalHandle& gh);
/** @brief Accept the goal referenced by the goal handle. This will
* transition to the ACTIVE state or the PREEMPTING state depending
* on whether a cancel request has been received for the goal
* @param text Optionally, any text message about the status change being made that should be passed to the client
*/
void setAccepted(const std::string& text = std::string(""));
/**
* @brief Set the status of the goal associated with the ServerGoalHandle to RECALLED or PREEMPTED
* depending on what the current status of the goal is
* @param result Optionally, the user can pass in a result to be sent to any clients of the goal
* @param text Optionally, any text message about the status change being made that should be passed to the client
*/
void setCanceled(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Set the status of the goal associated with the ServerGoalHandle to rejected
* @param result Optionally, the user can pass in a result to be sent to any clients of the goal
* @param text Optionally, any text message about the status change being made that should be passed to the client
*/
void setRejected(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Set the status of the goal associated with the ServerGoalHandle to aborted
* @param result Optionally, the user can pass in a result to be sent to any clients of the goal
* @param text Optionally, any text message about the status change being made that should be passed to the client
*/
void setAborted(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Set the status of the goal associated with the ServerGoalHandle to succeeded
* @param result Optionally, the user can pass in a result to be sent to any clients of the goal
* @param text Optionally, any text message about the status change being made that should be passed to the client
*/
void setSucceeded(const Result& result = Result(), const std::string& text = std::string(""));
/**
* @brief Send feedback to any clients of the goal associated with this ServerGoalHandle
* @param feedback The feedback to send to the client
*/
void publishFeedback(const Feedback& feedback);
/**
* @brief Determine if the goal handle is valid (tracking a valid goal,
* and associated with a valid action server). If the handle is valid, it
* means that the accessors \ref getGoal, \ref getGoalID, etc, can be
* called without generating errors.
*
* @return True if valid, False if invalid
*/
bool isValid() const;
/**
* @brief Accessor for the goal associated with the ServerGoalHandle
* @return A shared_ptr to the goal object
*/
boost::shared_ptr<const Goal> getGoal() const;
/**
* @brief Accessor for the goal id associated with the ServerGoalHandle
* @return The goal id
*/
actionlib_msgs::GoalID getGoalID() const;
/**
* @brief Accessor for the status associated with the ServerGoalHandle
* @return The goal status
*/
actionlib_msgs::GoalStatus getGoalStatus() const;
/**
* @brief Equals operator for a ServerGoalHandle
* @param gh The goal handle to copy
*/
ServerGoalHandle& operator=(const ServerGoalHandle& gh);
/**
* @brief Equals operator for ServerGoalHandles
* @param other The ServerGoalHandle to compare to
* @return True if the ServerGoalHandles refer to the same goal, false otherwise
*/
bool operator==(const ServerGoalHandle& other) const;
/**
* @brief != operator for ServerGoalHandles
* @param other The ServerGoalHandle to compare to
* @return True if the ServerGoalHandles refer to different goals, false otherwise
*/
bool operator!=(const ServerGoalHandle& other) const;
private:
/**
* @brief A private constructor used by the ActionServer to initialize a ServerGoalHandle
*/
ServerGoalHandle(typename std::list<StatusTracker<ActionSpec> >::iterator status_it,
ActionServerBase<ActionSpec>* as, boost::shared_ptr<void> handle_tracker, boost::shared_ptr<DestructionGuard> guard);
/**
* @brief A private method to set status to PENDING or RECALLING
* @return True if the cancel request should be passed on to the user, false otherwise
*/
bool setCancelRequested();
typename std::list<StatusTracker<ActionSpec> >::iterator status_it_;
boost::shared_ptr<const ActionGoal> goal_;
ActionServerBase<ActionSpec>* as_;
boost::shared_ptr<void> handle_tracker_;
boost::shared_ptr<DestructionGuard> guard_;
friend class ActionServerBase<ActionSpec>;
};
};
//include the implementation
#include <actionlib/server/server_goal_handle_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/server_goal_handle_imp.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_SERVER_GOAL_HANDLE_IMP_H_
#define ACTIONLIB_SERVER_GOAL_HANDLE_IMP_H_
namespace actionlib {
template <class ActionSpec>
ServerGoalHandle<ActionSpec>::ServerGoalHandle() : as_(NULL) {}
template <class ActionSpec>
ServerGoalHandle<ActionSpec>::ServerGoalHandle(const ServerGoalHandle& gh):
status_it_(gh.status_it_), goal_(gh.goal_), as_(gh.as_), handle_tracker_(gh.handle_tracker_), guard_(gh.guard_){}
template <class ActionSpec>
void ServerGoalHandle<ActionSpec>::setAccepted(const std::string& text){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return;
}
ROS_DEBUG_NAMED("actionlib", "Accepting goal, id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
unsigned int status = (*status_it_).status_.status;
//if we were pending before, then we'll go active
if(status == actionlib_msgs::GoalStatus::PENDING){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::ACTIVE;
(*status_it_).status_.text = text;
as_->publishStatus();
}
//if we were recalling before, now we'll go to preempting
else if(status == actionlib_msgs::GoalStatus::RECALLING){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::PREEMPTING;
(*status_it_).status_.text = text;
as_->publishStatus();
}
else
ROS_ERROR_NAMED("actionlib", "To transition to an active state, the goal must be in a pending or recalling state, it is currently in state: %d",
(*status_it_).status_.status);
}
else
ROS_ERROR_NAMED("actionlib", "Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
void ServerGoalHandle<ActionSpec>::setCanceled(const Result& result, const std::string& text){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return;
}
ROS_DEBUG_NAMED("actionlib", "Setting status to canceled on goal, id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
unsigned int status = (*status_it_).status_.status;
if(status == actionlib_msgs::GoalStatus::PENDING || status == actionlib_msgs::GoalStatus::RECALLING){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::RECALLED;
(*status_it_).status_.text = text;
as_->publishResult((*status_it_).status_, result);
}
else if(status == actionlib_msgs::GoalStatus::ACTIVE || status == actionlib_msgs::GoalStatus::PREEMPTING){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::PREEMPTED;
(*status_it_).status_.text = text;
as_->publishResult((*status_it_).status_, result);
}
else
ROS_ERROR_NAMED("actionlib", "To transition to a cancelled state, the goal must be in a pending, recalling, active, or preempting state, it is currently in state: %d",
(*status_it_).status_.status);
}
else
ROS_ERROR_NAMED("actionlib", "Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
void ServerGoalHandle<ActionSpec>::setRejected(const Result& result, const std::string& text){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return;
}
ROS_DEBUG_NAMED("actionlib", "Setting status to rejected on goal, id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
unsigned int status = (*status_it_).status_.status;
if(status == actionlib_msgs::GoalStatus::PENDING || status == actionlib_msgs::GoalStatus::RECALLING){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::REJECTED;
(*status_it_).status_.text = text;
as_->publishResult((*status_it_).status_, result);
}
else
ROS_ERROR_NAMED("actionlib", "To transition to a rejected state, the goal must be in a pending or recalling state, it is currently in state: %d",
(*status_it_).status_.status);
}
else
ROS_ERROR_NAMED("actionlib", "Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
void ServerGoalHandle<ActionSpec>::setAborted(const Result& result, const std::string& text){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return;
}
ROS_DEBUG_NAMED("actionlib", "Setting status to aborted on goal, id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
unsigned int status = (*status_it_).status_.status;
if(status == actionlib_msgs::GoalStatus::PREEMPTING || status == actionlib_msgs::GoalStatus::ACTIVE){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::ABORTED;
(*status_it_).status_.text = text;
as_->publishResult((*status_it_).status_, result);
}
else
ROS_ERROR_NAMED("actionlib", "To transition to an aborted state, the goal must be in a preempting or active state, it is currently in state: %d",
status);
}
else
ROS_ERROR_NAMED("actionlib", "Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
void ServerGoalHandle<ActionSpec>::setSucceeded(const Result& result, const std::string& text){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return;
}
ROS_DEBUG_NAMED("actionlib", "Setting status to succeeded on goal, id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
unsigned int status = (*status_it_).status_.status;
if(status == actionlib_msgs::GoalStatus::PREEMPTING || status == actionlib_msgs::GoalStatus::ACTIVE){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::SUCCEEDED;
(*status_it_).status_.text = text;
as_->publishResult((*status_it_).status_, result);
}
else
ROS_ERROR_NAMED("actionlib", "To transition to a succeeded state, the goal must be in a preempting or active state, it is currently in state: %d",
status);
}
else
ROS_ERROR_NAMED("actionlib", "Attempt to set status on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
void ServerGoalHandle<ActionSpec>::publishFeedback(const Feedback& feedback){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return;
}
ROS_DEBUG_NAMED("actionlib", "Publishing feedback for goal, id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_) {
boost::recursive_mutex::scoped_lock lock(as_->lock_);
as_->publishFeedback((*status_it_).status_, feedback);
}
else
ROS_ERROR_NAMED("actionlib", "Attempt to publish feedback on an uninitialized ServerGoalHandle");
}
template <class ActionSpec>
bool ServerGoalHandle<ActionSpec>::isValid() const{
return goal_ && as_!= NULL;
}
template <class ActionSpec>
boost::shared_ptr<const typename ServerGoalHandle<ActionSpec>::Goal> ServerGoalHandle<ActionSpec>::getGoal() const{
//if we have a goal that is non-null
if(goal_){
//create the deleter for our goal subtype
EnclosureDeleter<const ActionGoal> d(goal_);
return boost::shared_ptr<const Goal>(&(goal_->goal), d);
}
return boost::shared_ptr<const Goal>();
}
template <class ActionSpec>
actionlib_msgs::GoalID ServerGoalHandle<ActionSpec>::getGoalID() const{
if(goal_ && as_!= NULL){
DestructionGuard::ScopedProtector protector(*guard_);
if(protector.isProtected()){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
return (*status_it_).status_.goal_id;
}
else
return actionlib_msgs::GoalID();
}
else{
ROS_ERROR_NAMED("actionlib", "Attempt to get a goal id on an uninitialized ServerGoalHandle or one that has no ActionServer associated with it.");
return actionlib_msgs::GoalID();
}
}
template <class ActionSpec>
actionlib_msgs::GoalStatus ServerGoalHandle<ActionSpec>::getGoalStatus() const{
if(goal_ && as_!= NULL){
DestructionGuard::ScopedProtector protector(*guard_);
if(protector.isProtected()){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
return (*status_it_).status_;
}
else
return actionlib_msgs::GoalStatus();
}
else{
ROS_ERROR_NAMED("actionlib", "Attempt to get goal status on an uninitialized ServerGoalHandle or one that has no ActionServer associated with it.");
return actionlib_msgs::GoalStatus();
}
}
template <class ActionSpec>
ServerGoalHandle<ActionSpec>& ServerGoalHandle<ActionSpec>::operator=(const ServerGoalHandle& gh){
status_it_ = gh.status_it_;
goal_ = gh.goal_;
as_ = gh.as_;
handle_tracker_ = gh.handle_tracker_;
guard_ = gh.guard_;
return *this;
}
template <class ActionSpec>
bool ServerGoalHandle<ActionSpec>::operator==(const ServerGoalHandle& other) const{
if(!goal_ && !other.goal_)
return true;
if(!goal_ || !other.goal_)
return false;
actionlib_msgs::GoalID my_id = getGoalID();
actionlib_msgs::GoalID their_id = other.getGoalID();
return my_id.id == their_id.id;
}
template <class ActionSpec>
bool ServerGoalHandle<ActionSpec>::operator!=(const ServerGoalHandle& other) const{
return !(*this == other);
}
template <class ActionSpec>
ServerGoalHandle<ActionSpec>::ServerGoalHandle(typename std::list<StatusTracker<ActionSpec> >::iterator status_it,
ActionServerBase<ActionSpec>* as, boost::shared_ptr<void> handle_tracker, boost::shared_ptr<DestructionGuard> guard)
: status_it_(status_it), goal_((*status_it).goal_),
as_(as), handle_tracker_(handle_tracker), guard_(guard){}
template <class ActionSpec>
bool ServerGoalHandle<ActionSpec>::setCancelRequested(){
if(as_ == NULL){
ROS_ERROR_NAMED("actionlib", "You are attempting to call methods on an uninitialized goal handle");
return false;
}
//check to see if we can use the action server
DestructionGuard::ScopedProtector protector(*guard_);
if(!protector.isProtected()){
ROS_ERROR_NAMED("actionlib", "The ActionServer associated with this GoalHandle is invalid. Did you delete the ActionServer before the GoalHandle?");
return false;
}
ROS_DEBUG_NAMED("actionlib", "Transisitoning to a cancel requested state on goal id: %s, stamp: %.2f", getGoalID().id.c_str(), getGoalID().stamp.toSec());
if(goal_){
boost::recursive_mutex::scoped_lock lock(as_->lock_);
unsigned int status = (*status_it_).status_.status;
if(status == actionlib_msgs::GoalStatus::PENDING){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::RECALLING;
as_->publishStatus();
return true;
}
if(status == actionlib_msgs::GoalStatus::ACTIVE){
(*status_it_).status_.status = actionlib_msgs::GoalStatus::PREEMPTING;
as_->publishStatus();
return true;
}
}
return false;
}
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/handle_tracker_deleter.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTONLIB_HANDLE_TRACKER_DELETER_H_
#define ACTONLIB_HANDLE_TRACKER_DELETER_H_
#include <actionlib/action_definition.h>
#include <actionlib/server/status_tracker.h>
#include <actionlib/destruction_guard.h>
#include <boost/shared_ptr.hpp>
namespace actionlib {
//we need to forward declare the ActionServerBase class
template <class ActionSpec>
class ActionServerBase;
/**
* @class HandleTrackerDeleter
* @brief A class to help with tracking GoalHandles and removing goals
* from the status list when the last GoalHandle associated with a given
* goal is deleted.
*/
//class to help with tracking status objects
template <class ActionSpec>
class HandleTrackerDeleter {
public:
HandleTrackerDeleter(ActionServerBase<ActionSpec>* as,
typename std::list<StatusTracker<ActionSpec> >::iterator status_it, boost::shared_ptr<DestructionGuard> guard);
void operator()(void* ptr);
private:
ActionServerBase<ActionSpec>* as_;
typename std::list<StatusTracker<ActionSpec> >::iterator status_it_;
boost::shared_ptr<DestructionGuard> guard_;
};
};
#include <actionlib/server/handle_tracker_deleter_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/server/action_server.h | /*********************************************************************
*
* 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTION_LIB_ACTION_SERVER
#define ACTION_LIB_ACTION_SERVER
#include <ros/ros.h>
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <actionlib_msgs/GoalID.h>
#include <actionlib_msgs/GoalStatusArray.h>
#include <actionlib_msgs/GoalStatus.h>
#include <actionlib/enclosure_deleter.h>
#include <actionlib/goal_id_generator.h>
#include <actionlib/action_definition.h>
#include <actionlib/server/status_tracker.h>
#include <actionlib/server/handle_tracker_deleter.h>
#include <actionlib/server/server_goal_handle.h>
#include <actionlib/server/action_server_base.h>
#include <actionlib/destruction_guard.h>
#include <list>
namespace actionlib {
/**
* @class ActionServer
* @brief The ActionServer is a helpful tool for managing goal requests to a
* node. It allows the user to specify callbacks that are invoked when goal
* or cancel requests come over the wire, and passes back GoalHandles that
* can be used to track the state of a given goal request. The ActionServer
* makes no assumptions about the policy used to service these goals, and
* sends status for each goal over the wire until the last GoalHandle
* associated with a goal request is destroyed.
*/
template <class ActionSpec>
class ActionServer : public ActionServerBase<ActionSpec>
{
public:
//for convenience when referring to ServerGoalHandles
typedef ServerGoalHandle<ActionSpec> GoalHandle;
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
/**
* @brief Constructor for an ActionServer
* @param n A NodeHandle to create a namespace under
* @param name The name of the action
* @param goal_cb A goal callback to be called when the ActionServer receives a new goal over the wire
* @param cancel_cb A cancel callback to be called when the ActionServer receives a new cancel request over the wire
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
ActionServer(ros::NodeHandle n, std::string name,
boost::function<void (GoalHandle)> goal_cb,
boost::function<void (GoalHandle)> cancel_cb,
bool auto_start);
/**
* @brief Constructor for an ActionServer
* @param n A NodeHandle to create a namespace under
* @param name The name of the action
* @param goal_cb A goal callback to be called when the ActionServer receives a new goal over the wire
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
ActionServer(ros::NodeHandle n, std::string name,
boost::function<void (GoalHandle)> goal_cb,
bool auto_start);
/**
* @brief DEPRECATED Constructor for an ActionServer
* @param n A NodeHandle to create a namespace under
* @param name The name of the action
* @param goal_cb A goal callback to be called when the ActionServer receives a new goal over the wire
* @param cancel_cb A cancel callback to be called when the ActionServer receives a new cancel request over the wire
*/
ROS_DEPRECATED ActionServer(ros::NodeHandle n, std::string name,
boost::function<void (GoalHandle)> goal_cb,
boost::function<void (GoalHandle)> cancel_cb = boost::function<void (GoalHandle)>());
/**
* @brief Constructor for an ActionServer
* @param n A NodeHandle to create a namespace under
* @param name The name of the action
* @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
*/
ActionServer(ros::NodeHandle n, std::string name,
bool auto_start);
/**
* @brief DEPRECATED Constructor for an ActionServer
* @param n A NodeHandle to create a namespace under
* @param name The name of the action
*/
ROS_DEPRECATED ActionServer(ros::NodeHandle n, std::string name);
/**
* @brief Destructor for the ActionServer
*/
virtual ~ActionServer();
private:
/**
* @brief Initialize all ROS connections and setup timers
*/
virtual void initialize();
/**
* @brief Publishes a result for a given goal
* @param status The status of the goal with which the result is associated
* @param result The result to publish
*/
virtual void publishResult(const actionlib_msgs::GoalStatus& status, const Result& result);
/**
* @brief Publishes feedback for a given goal
* @param status The status of the goal with which the feedback is associated
* @param feedback The feedback to publish
*/
virtual void publishFeedback(const actionlib_msgs::GoalStatus& status, const Feedback& feedback);
/**
* @brief Explicitly publish status
*/
virtual void publishStatus();
/**
* @brief Publish status for all goals on a timer event
*/
void publishStatus(const ros::TimerEvent& e);
ros::NodeHandle node_;
ros::Subscriber goal_sub_, cancel_sub_;
ros::Publisher status_pub_, result_pub_, feedback_pub_;
ros::Timer status_timer_;
};
};
//include the implementation
#include <actionlib/server/action_server_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/action_client.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_ACTION_CLIENT_H_
#define ACTIONLIB_ACTION_CLIENT_H_
#include <boost/thread/condition.hpp>
#include "ros/ros.h"
#include "ros/callback_queue_interface.h"
#include <actionlib/client/client_helpers.h>
#include <actionlib/client/connection_monitor.h>
#include <actionlib/destruction_guard.h>
namespace actionlib
{
/**
* \brief Full interface to an ActionServer
*
* ActionClient provides a complete client side implementation of the ActionInterface protocol.
* It provides callbacks for every client side transition, giving the user full observation into
* the client side state machine.
*/
template <class ActionSpec>
class ActionClient
{
public:
typedef ClientGoalHandle<ActionSpec> GoalHandle;
private:
ACTION_DEFINITION(ActionSpec);
typedef ActionClient<ActionSpec> ActionClientT;
typedef boost::function<void (GoalHandle) > TransitionCallback;
typedef boost::function<void (GoalHandle, const FeedbackConstPtr&) > FeedbackCallback;
typedef boost::function<void (const ActionGoalConstPtr)> SendGoalFunc;
public:
/**
* \brief Simple constructor
*
* Constructs an ActionClient and sets up the necessary ros topics for the ActionInterface
* \param name The action name. Defines the namespace in which the action communicates
* \param queue CallbackQueue from which this action will process messages.
* The default (NULL) is to use the global queue
*/
ActionClient(const std::string& name, ros::CallbackQueueInterface* queue = NULL)
: n_(name), guard_(new DestructionGuard()),
manager_(guard_)
{
initClient(queue);
}
/**
* \brief Constructor with namespacing options
*
* Constructs an ActionClient and sets up the necessary ros topics for the ActionInterface,
* and namespaces them according the a specified NodeHandle
* \param n The node handle on top of which we want to namespace our action
* \param name The action name. Defines the namespace in which the action communicates
* \param queue CallbackQueue from which this action will process messages.
* The default (NULL) is to use the global queue
*/
ActionClient(const ros::NodeHandle& n, const std::string& name, ros::CallbackQueueInterface* queue = NULL)
: n_(n, name), guard_(new DestructionGuard()),
manager_(guard_)
{
initClient(queue);
}
~ActionClient()
{
ROS_DEBUG_NAMED("actionlib", "ActionClient: Waiting for destruction guard to clean up");
guard_->destruct();
ROS_DEBUG_NAMED("actionlib", "ActionClient: destruction guard destruct() done");
}
/**
* \brief Sends a goal to the ActionServer, and also registers callbacks
* \param transition_cb Callback that gets called on every client state transition
* \param feedback_cb Callback that gets called whenever feedback for this goal is received
*/
GoalHandle sendGoal(const Goal& goal,
TransitionCallback transition_cb = TransitionCallback(),
FeedbackCallback feedback_cb = FeedbackCallback())
{
ROS_DEBUG_NAMED("actionlib", "about to start initGoal()");
GoalHandle gh = manager_.initGoal(goal, transition_cb, feedback_cb);
ROS_DEBUG_NAMED("actionlib", "Done with initGoal()");
return gh;
}
/**
* \brief Cancel all goals currently running on the action server
*
* This preempts all goals running on the action server at the point that
* this message is serviced by the ActionServer.
*/
void cancelAllGoals()
{
actionlib_msgs::GoalID cancel_msg;
// CancelAll policy encoded by stamp=0, id=0
cancel_msg.stamp = ros::Time(0,0);
cancel_msg.id = "";
cancel_pub_.publish(cancel_msg);
}
/**
* \brief Cancel all goals that were stamped at and before the specified time
* \param time All goals stamped at or before `time` will be canceled
*/
void cancelGoalsAtAndBeforeTime(const ros::Time& time)
{
actionlib_msgs::GoalID cancel_msg;
cancel_msg.stamp = time;
cancel_msg.id = "";
cancel_pub_.publish(cancel_msg);
}
/**
* \brief Waits for the ActionServer to connect to this client
* Often, it can take a second for the action server & client to negotiate
* a connection, thus, risking the first few goals to be dropped. This call lets
* the user wait until the network connection to the server is negotiated
* NOTE: Using this call in a single threaded ROS application, or any
* application where the action client's callback queue is not being
* serviced, will not work. Without a separate thread servicing the queue, or
* a multi-threaded spinner, there is no way for the client to tell whether
* or not the server is up because it can't receive a status message.
* \param timeout Max time to block before returning. A zero timeout is interpreted as an infinite timeout.
* \return True if the server connected in the allocated time. False on timeout
*/
bool waitForActionServerToStart(const ros::Duration& timeout = ros::Duration(0,0) )
{
if (connection_monitor_)
return connection_monitor_->waitForActionServerToStart(timeout, n_);
else
return false;
}
/**
* @brief Checks if the action client is successfully connected to the action server
* @return True if the server is connected, false otherwise
*/
bool isServerConnected()
{
return connection_monitor_->isServerConnected();
}
private:
ros::NodeHandle n_;
boost::shared_ptr<DestructionGuard> guard_;
GoalManager<ActionSpec> manager_;
ros::Subscriber result_sub_;
ros::Subscriber feedback_sub_;
boost::shared_ptr<ConnectionMonitor> connection_monitor_; // Have to destroy subscribers and publishers before the connection_monitor_, since we call callbacks in the connection_monitor_
ros::Publisher goal_pub_;
ros::Publisher cancel_pub_;
ros::Subscriber status_sub_;
void sendGoalFunc(const ActionGoalConstPtr& action_goal)
{
goal_pub_.publish(action_goal);
}
void sendCancelFunc(const actionlib_msgs::GoalID& cancel_msg)
{
cancel_pub_.publish(cancel_msg);
}
void initClient(ros::CallbackQueueInterface* queue)
{
status_sub_ = queue_subscribe("status", 1, &ActionClientT::statusCb, this, queue);
feedback_sub_ = queue_subscribe("feedback", 1, &ActionClientT::feedbackCb, this, queue);
result_sub_ = queue_subscribe("result", 1, &ActionClientT::resultCb, this, queue);
connection_monitor_.reset(new ConnectionMonitor(feedback_sub_, status_sub_));
// Start publishers and subscribers
goal_pub_ = queue_advertise<ActionGoal>("goal", 10,
boost::bind(&ConnectionMonitor::goalConnectCallback, connection_monitor_, _1),
boost::bind(&ConnectionMonitor::goalDisconnectCallback, connection_monitor_, _1),
queue);
cancel_pub_ = queue_advertise<actionlib_msgs::GoalID>("cancel", 10,
boost::bind(&ConnectionMonitor::cancelConnectCallback, connection_monitor_, _1),
boost::bind(&ConnectionMonitor::cancelDisconnectCallback, connection_monitor_, _1),
queue);
manager_.registerSendGoalFunc(boost::bind(&ActionClientT::sendGoalFunc, this, _1));
manager_.registerCancelFunc(boost::bind(&ActionClientT::sendCancelFunc, this, _1));
}
template <class M>
ros::Publisher queue_advertise(const std::string& topic, uint32_t queue_size,
const ros::SubscriberStatusCallback& connect_cb,
const ros::SubscriberStatusCallback& disconnect_cb,
ros::CallbackQueueInterface* queue)
{
ros::AdvertiseOptions ops;
ops.init<M>(topic, queue_size, connect_cb, disconnect_cb);
ops.tracked_object = ros::VoidPtr();
ops.latch = false;
ops.callback_queue = queue;
return n_.advertise(ops);
}
template<class M, class T>
ros::Subscriber queue_subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(const ros::MessageEvent<M const>&), T* obj, ros::CallbackQueueInterface* queue)
{
ros::SubscribeOptions ops;
ops.callback_queue = queue;
ops.topic = topic;
ops.queue_size = queue_size;
ops.md5sum = ros::message_traits::md5sum<M>();
ops.datatype = ros::message_traits::datatype<M>();
ops.helper = ros::SubscriptionCallbackHelperPtr(
new ros::SubscriptionCallbackHelperT<const ros::MessageEvent<M const>& >(
boost::bind(fp, obj, _1)
)
);
return n_.subscribe(ops);
}
void statusCb(const ros::MessageEvent<actionlib_msgs::GoalStatusArray const>& status_array_event)
{
ROS_DEBUG_NAMED("actionlib", "Getting status over the wire.");
if (connection_monitor_)
connection_monitor_->processStatus(status_array_event.getConstMessage(), status_array_event.getPublisherName());
manager_.updateStatuses(status_array_event.getConstMessage());
}
void feedbackCb(const ros::MessageEvent<ActionFeedback const>& action_feedback)
{
manager_.updateFeedbacks(action_feedback.getConstMessage());
}
void resultCb(const ros::MessageEvent<ActionResult const>& action_result)
{
manager_.updateResults(action_result.getConstMessage());
}
};
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/connection_monitor.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_ACTION_CONNECTION_MONITOR_H_
#define ACTIONLIB_ACTION_CONNECTION_MONITOR_H_
#include <boost/thread/condition.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <ros/ros.h>
#include <actionlib_msgs/GoalStatusArray.h>
#include <set>
#include <map>
#include <actionlib/decl.h>
namespace actionlib
{
class ACTIONLIB_DECL ConnectionMonitor
{
public:
ConnectionMonitor(ros::Subscriber&feedback_sub, ros::Subscriber& result_sub);
void goalConnectCallback(const ros::SingleSubscriberPublisher& pub);
void goalDisconnectCallback(const ros::SingleSubscriberPublisher& pub);
void cancelConnectCallback(const ros::SingleSubscriberPublisher& pub);
void cancelDisconnectCallback(const ros::SingleSubscriberPublisher& pub);
void processStatus(const actionlib_msgs::GoalStatusArrayConstPtr& status, const std::string& caller_id);
bool waitForActionServerToStart(const ros::Duration& timeout = ros::Duration(0,0), const ros::NodeHandle& nh = ros::NodeHandle() );
bool isServerConnected();
private:
// status stuff
std::string status_caller_id_;
bool status_received_;
ros::Time latest_status_time_;
boost::condition check_connection_condition_;
boost::recursive_mutex data_mutex_;
std::map<std::string, size_t> goalSubscribers_;
std::map<std::string, size_t> cancelSubscribers_;
std::string goalSubscribersString();
std::string cancelSubscribersString();
ros::Subscriber& feedback_sub_;
ros::Subscriber& result_sub_;
};
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/client_helpers.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_GOAL_MANAGER_H_
#define ACTIONLIB_GOAL_MANAGER_H_
#include <boost/thread/recursive_mutex.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include "actionlib/action_definition.h"
#include "actionlib/managed_list.h"
#include "actionlib/enclosure_deleter.h"
#include "actionlib/goal_id_generator.h"
#include "actionlib/client/comm_state.h"
#include "actionlib/client/terminal_state.h"
#include "actionlib/destruction_guard.h"
// msgs
#include "actionlib_msgs/GoalID.h"
#include "actionlib_msgs/GoalStatusArray.h"
namespace actionlib
{
template <class ActionSpec>
class ClientGoalHandle;
template <class ActionSpec>
class CommStateMachine;
template <class ActionSpec>
class GoalManager
{
public:
ACTION_DEFINITION(ActionSpec);
typedef GoalManager<ActionSpec> GoalManagerT;
typedef ClientGoalHandle<ActionSpec> GoalHandleT;
typedef boost::function<void (GoalHandleT) > TransitionCallback;
typedef boost::function<void (GoalHandleT, const FeedbackConstPtr&) > FeedbackCallback;
typedef boost::function<void (const ActionGoalConstPtr)> SendGoalFunc;
typedef boost::function<void (const actionlib_msgs::GoalID&)> CancelFunc;
GoalManager(const boost::shared_ptr<DestructionGuard>& guard) : guard_(guard) { }
void registerSendGoalFunc(SendGoalFunc send_goal_func);
void registerCancelFunc(CancelFunc cancel_func);
GoalHandleT initGoal( const Goal& goal,
TransitionCallback transition_cb = TransitionCallback(),
FeedbackCallback feedback_cb = FeedbackCallback() );
void updateStatuses(const actionlib_msgs::GoalStatusArrayConstPtr& status_array);
void updateFeedbacks(const ActionFeedbackConstPtr& action_feedback);
void updateResults(const ActionResultConstPtr& action_result);
friend class ClientGoalHandle<ActionSpec>;
// should be private
typedef ManagedList< boost::shared_ptr<CommStateMachine<ActionSpec> > > ManagedListT;
ManagedListT list_;
private:
SendGoalFunc send_goal_func_ ;
CancelFunc cancel_func_ ;
boost::shared_ptr<DestructionGuard> guard_;
boost::recursive_mutex list_mutex_;
GoalIDGenerator id_generator_;
void listElemDeleter(typename ManagedListT::iterator it);
};
/**
* \brief Client side handle to monitor goal progress
*
* A ClientGoalHandle is a reference counted object that is used to manipulate and monitor the progress
* of an already dispatched goal. Once all the goal handles go out of scope (or are reset), an
* ActionClient stops maintaining state for that goal.
*/
template <class ActionSpec>
class ClientGoalHandle
{
private:
ACTION_DEFINITION(ActionSpec);
public:
/**
* \brief Create an empty goal handle
*
* Constructs a goal handle that doesn't track any goal. Calling any method on an empty goal
* handle other than operator= will trigger an assertion.
*/
ClientGoalHandle();
~ClientGoalHandle();
/**
* \brief Stops goal handle from tracking a goal
*
* Useful if you want to stop tracking the progress of a goal, but it is inconvenient to force
* the goal handle to go out of scope. Has pretty much the same semantics as boost::shared_ptr::reset()
*/
void reset();
/**
* \brief Checks if this goal handle is tracking a goal
*
* Has pretty much the same semantics as boost::shared_ptr::expired()
* \return True if this goal handle is not tracking a goal
*/
inline bool isExpired() const;
/**
* \brief Get the state of this goal's communication state machine from interaction with the server
*
* Possible States are: WAITING_FOR_GOAL_ACK, PENDING, ACTIVE, WAITING_FOR_RESULT,
* WAITING_FOR_CANCEL_ACK, RECALLING, PREEMPTING, DONE
* \return The current goal's communication state with the server
*/
CommState getCommState();
/**
* \brief Get the terminal state information for this goal
*
* Possible States Are: RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, LOST
* This call only makes sense if CommState==DONE. This will send ROS_WARNs if we're not in DONE
* \return The terminal state
*/
TerminalState getTerminalState();
/**
* \brief Get result associated with this goal
*
* \return NULL if no reseult received. Otherwise returns shared_ptr to result.
*/
ResultConstPtr getResult();
/**
* \brief Resends this goal [with the same GoalID] to the ActionServer
*
* Useful if the user thinks that the goal may have gotten lost in transit
*/
void resend();
/**
* \brief Sends a cancel message for this specific goal to the ActionServer
*
* Also transitions the Communication State Machine to WAITING_FOR_CANCEL_ACK
*/
void cancel();
/**
* \brief Check if two goal handles point to the same goal
* \return TRUE if both point to the same goal. Also returns TRUE if both handles are inactive.
*/
bool operator==(const ClientGoalHandle<ActionSpec>& rhs) const;
/**
* \brief !(operator==())
*/
bool operator!=(const ClientGoalHandle<ActionSpec>& rhs) const;
friend class GoalManager<ActionSpec>;
private:
typedef GoalManager<ActionSpec> GoalManagerT;
typedef ManagedList< boost::shared_ptr<CommStateMachine<ActionSpec> > > ManagedListT;
ClientGoalHandle(GoalManagerT* gm, typename ManagedListT::Handle handle, const boost::shared_ptr<DestructionGuard>& guard);
GoalManagerT* gm_;
bool active_;
//typename ManagedListT::iterator it_;
boost::shared_ptr<DestructionGuard> guard_; // Guard must still exist when the list_handle_ is destroyed
typename ManagedListT::Handle list_handle_;
};
template <class ActionSpec>
class CommStateMachine
{
private:
//generates typedefs that we'll use to make our lives easier
ACTION_DEFINITION(ActionSpec);
public:
typedef boost::function<void (const ClientGoalHandle<ActionSpec>&) > TransitionCallback;
typedef boost::function<void (const ClientGoalHandle<ActionSpec>&, const FeedbackConstPtr&) > FeedbackCallback;
typedef ClientGoalHandle<ActionSpec> GoalHandleT;
CommStateMachine(const ActionGoalConstPtr& action_goal,
TransitionCallback transition_callback,
FeedbackCallback feedback_callback);
ActionGoalConstPtr getActionGoal() const;
CommState getCommState() const;
actionlib_msgs::GoalStatus getGoalStatus() const;
ResultConstPtr getResult() const;
// Transitions caused by messages
void updateStatus(GoalHandleT& gh, const actionlib_msgs::GoalStatusArrayConstPtr& status_array);
void updateFeedback(GoalHandleT& gh, const ActionFeedbackConstPtr& feedback);
void updateResult(GoalHandleT& gh, const ActionResultConstPtr& result);
// Forced transitions
void transitionToState(GoalHandleT& gh, const CommState::StateEnum& next_state);
void transitionToState(GoalHandleT& gh, const CommState& next_state);
void processLost(GoalHandleT& gh);
private:
CommStateMachine();
// State
CommState state_;
ActionGoalConstPtr action_goal_;
actionlib_msgs::GoalStatus latest_goal_status_;
ActionResultConstPtr latest_result_;
// Callbacks
TransitionCallback transition_cb_;
FeedbackCallback feedback_cb_;
// **** Implementation ****
//! Change the state, as well as print out ROS_DEBUG info
void setCommState(const CommState& state);
void setCommState(const CommState::StateEnum& state);
const actionlib_msgs::GoalStatus* findGoalStatus(const std::vector<actionlib_msgs::GoalStatus>& status_vec) const;
};
}
#include "actionlib/client/goal_manager_imp.h"
#include "actionlib/client/client_goal_handle_imp.h"
#include "actionlib/client/comm_state_machine_imp.h"
#endif // ACTIONLIB_GOAL_MANAGER_H_
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/simple_goal_state.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_SIMPLE_GOAL_STATE_H_
#define ACTIONLIB_CLIENT_SIMPLE_GOAL_STATE_H_
#include <string>
#include "ros/console.h"
namespace actionlib
{
/**
* \brief Thin wrapper around an enum in order providing a simplified version of the
* communication state, but with less states than CommState
**/
class SimpleGoalState
{
public:
//! \brief Defines the various states the SimpleGoalState can be in
enum StateEnum
{
PENDING,
ACTIVE,
DONE
} ;
SimpleGoalState(const StateEnum& state) : state_(state) { }
inline bool operator==(const SimpleGoalState& rhs) const
{
return (state_ == rhs.state_) ;
}
inline bool operator==(const SimpleGoalState::StateEnum& rhs) const
{
return (state_ == rhs);
}
inline bool operator!=(const SimpleGoalState::StateEnum& rhs) const
{
return !(*this == rhs);
}
inline bool operator!=(const SimpleGoalState& rhs) const
{
return !(*this == rhs);
}
std::string toString() const
{
switch(state_)
{
case PENDING:
return "PENDING";
case ACTIVE:
return "ACTIVE";
case DONE:
return "DONE";
default:
ROS_ERROR_NAMED("actionlib", "BUG: Unhandled SimpleGoalState: %u", state_);
break;
}
return "BUG-UNKNOWN";
}
StateEnum state_;
private:
SimpleGoalState();
} ;
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/simple_client_goal_state.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_SIMPLE_CLIENT_GOAL_STATE_H_
#define ACTIONLIB_CLIENT_SIMPLE_CLIENT_GOAL_STATE_H_
namespace actionlib
{
class SimpleClientGoalState
{
public:
//! \brief Defines the various states the goal can be in
enum StateEnum
{
PENDING,
ACTIVE,
RECALLED,
REJECTED,
PREEMPTED,
ABORTED,
SUCCEEDED,
LOST
};
StateEnum state_;
std::string text_;
SimpleClientGoalState(const StateEnum& state, const std::string& text = std::string("")) : state_(state), text_(text) { }
inline bool operator==(const SimpleClientGoalState& rhs) const
{
return (state_ == rhs.state_) ;
}
inline bool operator==(const SimpleClientGoalState::StateEnum& rhs) const
{
return (state_ == rhs);
}
inline bool operator!=(const SimpleClientGoalState::StateEnum& rhs) const
{
return !(*this == rhs);
}
inline bool operator!=(const SimpleClientGoalState& rhs) const
{
return !(*this == rhs);
}
/**
* \brief Determine if goal is done executing (ie. reached a terminal state)
* \return True if in RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, or LOST. False otherwise
*/
inline bool isDone() const
{
switch(state_)
{
case RECALLED:
case REJECTED:
case PREEMPTED:
case ABORTED:
case SUCCEEDED:
case LOST:
return true;
default:
return false;
}
}
std::string getText() const
{
return text_;
}
//! \brief Convert the state to a string. Useful when printing debugging information
std::string toString() const
{
switch(state_)
{
case PENDING:
return "PENDING";
case ACTIVE:
return "ACTIVE";
case RECALLED:
return "RECALLED";
case REJECTED:
return "REJECTED";
case PREEMPTED:
return "PREEMPTED";
case ABORTED:
return "ABORTED";
case SUCCEEDED:
return "SUCCEEDED";
case LOST:
return "LOST";
default:
ROS_ERROR_NAMED("actionlib", "BUG: Unhandled SimpleGoalState: %u", state_);
break;
}
return "BUG-UNKNOWN";
}
};
}
#endif // ACTIONLIB_CLIENT_SIMPLE_CLIENT_GOAL_STATE_H_
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/service_client.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_SERVICE_CLIENT_H_
#define ACTIONLIB_CLIENT_SERVICE_CLIENT_H_
#include <actionlib/action_definition.h>
#include <actionlib/client/simple_action_client.h>
namespace actionlib {
class ServiceClientImp {
public:
ServiceClientImp(){}
virtual bool call(const void* goal, std::string goal_md5sum, void* result, std::string result_md5sum) = 0;
virtual bool waitForServer(const ros::Duration& timeout) = 0;
virtual bool isServerConnected() = 0;
virtual ~ServiceClientImp(){}
};
class ServiceClient {
public:
ServiceClient(boost::shared_ptr<ServiceClientImp> client) : client_(client) {}
template <class Goal, class Result>
bool call(const Goal& goal, Result& result);
bool waitForServer(const ros::Duration& timeout = ros::Duration(0,0));
bool isServerConnected();
private:
boost::shared_ptr<ServiceClientImp> client_;
};
template <class ActionSpec>
ServiceClient serviceClient(ros::NodeHandle n, std::string name);
template <class ActionSpec>
class ServiceClientImpT : public ServiceClientImp
{
public:
ACTION_DEFINITION(ActionSpec);
typedef ClientGoalHandle<ActionSpec> GoalHandleT;
typedef SimpleActionClient<ActionSpec> SimpleActionClientT;
ServiceClientImpT(ros::NodeHandle n, std::string name);
bool call(const void* goal, std::string goal_md5sum, void* result, std::string result_md5sum);
bool waitForServer(const ros::Duration& timeout);
bool isServerConnected();
private:
boost::scoped_ptr<SimpleActionClientT> ac_;
};
};
//include the implementation
#include <actionlib/client/service_client_imp.h>
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/simple_action_client.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_SIMPLE_ACTION_CLIENT_H_
#define ACTIONLIB_SIMPLE_ACTION_CLIENT_H_
#include <boost/thread/condition.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/scoped_ptr.hpp>
#include "ros/ros.h"
#include "ros/callback_queue.h"
#include "actionlib/client/action_client.h"
#include "actionlib/client/simple_goal_state.h"
#include "actionlib/client/simple_client_goal_state.h"
#include "actionlib/client/terminal_state.h"
#ifndef DEPRECATED
#if defined(__GNUC__)
#define DEPRECATED __attribute__((deprecated))
#else
#define DEPRECATED
#endif
#endif
namespace actionlib
{
/**
* \brief A Simple client implementation of the ActionInterface which supports only one goal at a time
*
* The SimpleActionClient wraps the exisitng ActionClient, and exposes a limited set of easy-to-use hooks
* for the user. Note that the concept of GoalHandles has been completely hidden from the user, and that
* they must query the SimplyActionClient directly in order to monitor a goal.
*/
template <class ActionSpec>
class SimpleActionClient
{
private:
ACTION_DEFINITION(ActionSpec);
typedef ClientGoalHandle<ActionSpec> GoalHandleT;
typedef SimpleActionClient<ActionSpec> SimpleActionClientT;
public:
typedef boost::function<void (const SimpleClientGoalState& state, const ResultConstPtr& result) > SimpleDoneCallback;
typedef boost::function<void () > SimpleActiveCallback;
typedef boost::function<void (const FeedbackConstPtr& feedback) > SimpleFeedbackCallback;
/**
* \brief Simple constructor
*
* Constructs a SingleGoalActionClient and sets up the necessary ros topics for the ActionInterface
* \param name The action name. Defines the namespace in which the action communicates
* \param spin_thread If true, spins up a thread to service this action's subscriptions. If false,
* then the user has to call ros::spin() themselves. Defaults to True
*/
SimpleActionClient(const std::string& name, bool spin_thread = true) : cur_simple_state_(SimpleGoalState::PENDING)
{
initSimpleClient(nh_, name, spin_thread);
}
/**
* \brief Constructor with namespacing options
*
* Constructs a SingleGoalActionClient and sets up the necessary ros topics for
* the ActionInterface, and namespaces them according the a specified NodeHandle
* \param n The node handle on top of which we want to namespace our action
* \param name The action name. Defines the namespace in which the action communicates
* \param spin_thread If true, spins up a thread to service this action's subscriptions. If false,
* then the user has to call ros::spin() themselves. Defaults to True
*/
SimpleActionClient(ros::NodeHandle& n, const std::string& name, bool spin_thread = true) : cur_simple_state_(SimpleGoalState::PENDING)
{
initSimpleClient(n, name, spin_thread);
}
~SimpleActionClient();
/**
* \brief Waits for the ActionServer to connect to this client
*
* Often, it can take a second for the action server & client to negotiate
* a connection, thus, risking the first few goals to be dropped. This call lets
* the user wait until the network connection to the server is negotiated.
* NOTE: Using this call in a single threaded ROS application, or any
* application where the action client's callback queue is not being
* serviced, will not work. Without a separate thread servicing the queue, or
* a multi-threaded spinner, there is no way for the client to tell whether
* or not the server is up because it can't receive a status message.
* \param timeout Max time to block before returning. A zero timeout is interpreted as an infinite timeout.
* \return True if the server connected in the allocated time. False on timeout
*/
bool waitForServer(const ros::Duration& timeout = ros::Duration(0,0) ) { return ac_->waitForActionServerToStart(timeout); }
/**
* @brief Checks if the action client is successfully connected to the action server
* @return True if the server is connected, false otherwise
*/
bool isServerConnected()
{
return ac_->isServerConnected();
}
/**
* \brief Sends a goal to the ActionServer, and also registers callbacks
*
* If a previous goal is already active when this is called. We simply forget
* about that goal and start tracking the new goal. No cancel requests are made.
* \param done_cb Callback that gets called on transitions to Done
* \param active_cb Callback that gets called on transitions to Active
* \param feedback_cb Callback that gets called whenever feedback for this goal is received
*/
void sendGoal(const Goal& goal,
SimpleDoneCallback done_cb = SimpleDoneCallback(),
SimpleActiveCallback active_cb = SimpleActiveCallback(),
SimpleFeedbackCallback feedback_cb = SimpleFeedbackCallback());
/**
* \brief Sends a goal to the ActionServer, and waits until the goal completes or a timeout is exceeded
*
* If the goal doesn't complete by the execute_timeout, then a preempt message is sent. This call
* then waits up to the preempt_timeout for the goal to then finish.
*
* \param goal The goal to be sent to the ActionServer
* \param execute_timeout Time to wait until a preempt is sent. 0 implies wait forever
* \param preempt_timeout Time to wait after a preempt is sent. 0 implies wait forever
* \return The state of the goal when this call is completed
*/
SimpleClientGoalState sendGoalAndWait(const Goal& goal,
const ros::Duration& execute_timeout = ros::Duration(0,0),
const ros::Duration& preempt_timeout = ros::Duration(0,0));
/**
* \brief Blocks until this goal finishes
* \param timeout Max time to block before returning. A zero timeout is interpreted as an infinite timeout.
* \return True if the goal finished. False if the goal didn't finish within the allocated timeout
*/
bool waitForResult(const ros::Duration& timeout = ros::Duration(0,0) );
/**
* \brief Get the Result of the current goal
* \return shared pointer to the result. Note that this pointer will NEVER be NULL
*/
ResultConstPtr getResult();
/**
* \brief Get the state information for this goal
*
* Possible States Are: PENDING, ACTIVE, RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, LOST.
* \return The goal's state. Returns LOST if this SimpleActionClient isn't tracking a goal.
*/
SimpleClientGoalState getState();
/**
* \brief Cancel all goals currently running on the action server
*
* This preempts all goals running on the action server at the point that
* this message is serviced by the ActionServer.
*/
void cancelAllGoals();
/**
* \brief Cancel all goals that were stamped at and before the specified time
* \param time All goals stamped at or before `time` will be canceled
*/
void cancelGoalsAtAndBeforeTime(const ros::Time& time);
/**
* \brief Cancel the goal that we are currently pursuing
*/
void cancelGoal();
/**
* \brief Stops tracking the state of the current goal. Unregisters this goal's callbacks
*
* This is useful if we want to make sure we stop calling our callbacks before sending a new goal.
* Note that this does not cancel the goal, it simply stops looking for status info about this goal.
*/
void stopTrackingGoal();
private:
typedef ActionClient<ActionSpec> ActionClientT;
ros::NodeHandle nh_;
GoalHandleT gh_;
SimpleGoalState cur_simple_state_;
// Signalling Stuff
boost::condition done_condition_;
boost::mutex done_mutex_;
// User Callbacks
SimpleDoneCallback done_cb_;
SimpleActiveCallback active_cb_;
SimpleFeedbackCallback feedback_cb_;
// Spin Thread Stuff
boost::mutex terminate_mutex_;
bool need_to_terminate_;
boost::thread* spin_thread_;
ros::CallbackQueue callback_queue;
boost::scoped_ptr<ActionClientT> ac_; // Action client depends on callback_queue, so it must be destroyed before callback_queue
// ***** Private Funcs *****
void initSimpleClient(ros::NodeHandle& n, const std::string& name, bool spin_thread);
void handleTransition(GoalHandleT gh);
void handleFeedback(GoalHandleT gh, const FeedbackConstPtr& feedback);
void setSimpleState(const SimpleGoalState::StateEnum& next_state);
void setSimpleState(const SimpleGoalState& next_state);
void spinThread();
};
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::initSimpleClient(ros::NodeHandle& n, const std::string& name, bool spin_thread)
{
if (spin_thread)
{
ROS_DEBUG_NAMED("actionlib", "Spinning up a thread for the SimpleActionClient");
need_to_terminate_ = false;
spin_thread_ = new boost::thread(boost::bind(&SimpleActionClient<ActionSpec>::spinThread, this));
ac_.reset(new ActionClientT(n, name, &callback_queue));
}
else
{
spin_thread_ = NULL;
ac_.reset(new ActionClientT(n, name));
}
}
template<class ActionSpec>
SimpleActionClient<ActionSpec>::~SimpleActionClient()
{
if (spin_thread_)
{
{
boost::mutex::scoped_lock terminate_lock(terminate_mutex_);
need_to_terminate_ = true;
}
spin_thread_->join();
delete spin_thread_;
}
gh_.reset();
ac_.reset();
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::spinThread()
{
while (nh_.ok())
{
{
boost::mutex::scoped_lock terminate_lock(terminate_mutex_);
if (need_to_terminate_)
break;
}
callback_queue.callAvailable(ros::WallDuration(0.1f));
}
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::setSimpleState(const SimpleGoalState::StateEnum& next_state)
{
setSimpleState( SimpleGoalState(next_state) );
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::setSimpleState(const SimpleGoalState& next_state)
{
ROS_DEBUG_NAMED("actionlib", "Transitioning SimpleState from [%s] to [%s]",
cur_simple_state_.toString().c_str(),
next_state.toString().c_str());
cur_simple_state_ = next_state;
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::sendGoal(const Goal& goal,
SimpleDoneCallback done_cb,
SimpleActiveCallback active_cb,
SimpleFeedbackCallback feedback_cb)
{
// Reset the old GoalHandle, so that our callbacks won't get called anymore
gh_.reset();
// Store all the callbacks
done_cb_ = done_cb;
active_cb_ = active_cb;
feedback_cb_ = feedback_cb;
cur_simple_state_ = SimpleGoalState::PENDING;
// Send the goal to the ActionServer
gh_ = ac_->sendGoal(goal, boost::bind(&SimpleActionClientT::handleTransition, this, _1),
boost::bind(&SimpleActionClientT::handleFeedback, this, _1, _2));
}
template<class ActionSpec>
SimpleClientGoalState SimpleActionClient<ActionSpec>::getState()
{
if (gh_.isExpired())
{
ROS_ERROR_NAMED("actionlib", "Trying to getState() when no goal is running. You are incorrectly using SimpleActionClient");
return SimpleClientGoalState(SimpleClientGoalState::LOST);
}
CommState comm_state_ = gh_.getCommState();
switch( comm_state_.state_)
{
case CommState::WAITING_FOR_GOAL_ACK:
case CommState::PENDING:
case CommState::RECALLING:
return SimpleClientGoalState(SimpleClientGoalState::PENDING);
case CommState::ACTIVE:
case CommState::PREEMPTING:
return SimpleClientGoalState(SimpleClientGoalState::ACTIVE);
case CommState::DONE:
{
switch(gh_.getTerminalState().state_)
{
case TerminalState::RECALLED:
return SimpleClientGoalState(SimpleClientGoalState::RECALLED, gh_.getTerminalState().text_);
case TerminalState::REJECTED:
return SimpleClientGoalState(SimpleClientGoalState::REJECTED, gh_.getTerminalState().text_);
case TerminalState::PREEMPTED:
return SimpleClientGoalState(SimpleClientGoalState::PREEMPTED, gh_.getTerminalState().text_);
case TerminalState::ABORTED:
return SimpleClientGoalState(SimpleClientGoalState::ABORTED, gh_.getTerminalState().text_);
case TerminalState::SUCCEEDED:
return SimpleClientGoalState(SimpleClientGoalState::SUCCEEDED, gh_.getTerminalState().text_);
case TerminalState::LOST:
return SimpleClientGoalState(SimpleClientGoalState::LOST, gh_.getTerminalState().text_);
default:
ROS_ERROR_NAMED("actionlib", "Unknown terminal state [%u]. This is a bug in SimpleActionClient", gh_.getTerminalState().state_);
return SimpleClientGoalState(SimpleClientGoalState::LOST, gh_.getTerminalState().text_);
}
}
case CommState::WAITING_FOR_RESULT:
case CommState::WAITING_FOR_CANCEL_ACK:
{
switch (cur_simple_state_.state_)
{
case SimpleGoalState::PENDING:
return SimpleClientGoalState(SimpleClientGoalState::PENDING);
case SimpleGoalState::ACTIVE:
return SimpleClientGoalState(SimpleClientGoalState::ACTIVE);
case SimpleGoalState::DONE:
ROS_ERROR_NAMED("actionlib", "In WAITING_FOR_RESULT or WAITING_FOR_CANCEL_ACK, yet we are in SimpleGoalState DONE. This is a bug in SimpleActionClient");
return SimpleClientGoalState(SimpleClientGoalState::LOST);
default:
ROS_ERROR_NAMED("actionlib", "Got a SimpleGoalState of [%u]. This is a bug in SimpleActionClient", cur_simple_state_.state_);
}
}
default:
break;
}
ROS_ERROR_NAMED("actionlib", "Error trying to interpret CommState - %u", comm_state_.state_);
return SimpleClientGoalState(SimpleClientGoalState::LOST);
}
template<class ActionSpec>
typename SimpleActionClient<ActionSpec>::ResultConstPtr SimpleActionClient<ActionSpec>::getResult()
{
if (gh_.isExpired())
ROS_ERROR_NAMED("actionlib", "Trying to getResult() when no goal is running. You are incorrectly using SimpleActionClient");
if (gh_.getResult())
return gh_.getResult();
return ResultConstPtr(new Result);
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::cancelAllGoals()
{
ac_->cancelAllGoals();
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::cancelGoalsAtAndBeforeTime(const ros::Time& time)
{
ac_->cancelGoalsAtAndBeforeTime(time);
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::cancelGoal()
{
if (gh_.isExpired())
ROS_ERROR_NAMED("actionlib", "Trying to cancelGoal() when no goal is running. You are incorrectly using SimpleActionClient");
gh_.cancel();
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::stopTrackingGoal()
{
if (gh_.isExpired())
ROS_ERROR_NAMED("actionlib", "Trying to stopTrackingGoal() when no goal is running. You are incorrectly using SimpleActionClient");
gh_.reset();
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::handleFeedback(GoalHandleT gh, const FeedbackConstPtr& feedback)
{
if (gh_ != gh)
ROS_ERROR_NAMED("actionlib", "Got a callback on a goalHandle that we're not tracking. \
This is an internal SimpleActionClient/ActionClient bug. \
This could also be a GoalID collision");
if (feedback_cb_)
feedback_cb_(feedback);
}
template<class ActionSpec>
void SimpleActionClient<ActionSpec>::handleTransition(GoalHandleT gh)
{
CommState comm_state_ = gh.getCommState();
switch (comm_state_.state_)
{
case CommState::WAITING_FOR_GOAL_ACK:
ROS_ERROR_NAMED("actionlib", "BUG: Shouldn't ever get a transition callback for WAITING_FOR_GOAL_ACK");
break;
case CommState::PENDING:
ROS_ERROR_COND( cur_simple_state_ != SimpleGoalState::PENDING,
"BUG: Got a transition to CommState [%s] when our in SimpleGoalState [%s]",
comm_state_.toString().c_str(), cur_simple_state_.toString().c_str());
break;
case CommState::ACTIVE:
switch (cur_simple_state_.state_)
{
case SimpleGoalState::PENDING:
setSimpleState(SimpleGoalState::ACTIVE);
if (active_cb_)
active_cb_();
break;
case SimpleGoalState::ACTIVE:
break;
case SimpleGoalState::DONE:
ROS_ERROR_NAMED("actionlib", "BUG: Got a transition to CommState [%s] when in SimpleGoalState [%s]",
comm_state_.toString().c_str(), cur_simple_state_.toString().c_str());
break;
default:
ROS_FATAL("Unknown SimpleGoalState %u", cur_simple_state_.state_);
break;
}
break;
case CommState::WAITING_FOR_RESULT:
break;
case CommState::WAITING_FOR_CANCEL_ACK:
break;
case CommState::RECALLING:
ROS_ERROR_COND( cur_simple_state_ != SimpleGoalState::PENDING,
"BUG: Got a transition to CommState [%s] when our in SimpleGoalState [%s]",
comm_state_.toString().c_str(), cur_simple_state_.toString().c_str());
break;
case CommState::PREEMPTING:
switch (cur_simple_state_.state_)
{
case SimpleGoalState::PENDING:
setSimpleState(SimpleGoalState::ACTIVE);
if (active_cb_)
active_cb_();
break;
case SimpleGoalState::ACTIVE:
break;
case SimpleGoalState::DONE:
ROS_ERROR_NAMED("actionlib", "BUG: Got a transition to CommState [%s] when in SimpleGoalState [%s]",
comm_state_.toString().c_str(), cur_simple_state_.toString().c_str());
break;
default:
ROS_FATAL("Unknown SimpleGoalState %u", cur_simple_state_.state_);
break;
}
break;
case CommState::DONE:
switch (cur_simple_state_.state_)
{
case SimpleGoalState::PENDING:
case SimpleGoalState::ACTIVE:
done_mutex_.lock();
setSimpleState(SimpleGoalState::DONE);
done_mutex_.unlock();
if (done_cb_)
done_cb_(getState(), gh.getResult());
done_condition_.notify_all();
break;
case SimpleGoalState::DONE:
ROS_ERROR_NAMED("actionlib", "BUG: Got a second transition to DONE");
break;
default:
ROS_FATAL("Unknown SimpleGoalState %u", cur_simple_state_.state_);
break;
}
break;
default:
ROS_ERROR_NAMED("actionlib", "Unknown CommState received [%u]", comm_state_.state_);
break;
}
}
template<class ActionSpec>
bool SimpleActionClient<ActionSpec>::waitForResult(const ros::Duration& timeout )
{
if (gh_.isExpired())
{
ROS_ERROR_NAMED("actionlib", "Trying to waitForGoalToFinish() when no goal is running. You are incorrectly using SimpleActionClient");
return false;
}
if (timeout < ros::Duration(0,0))
ROS_WARN_NAMED("actionlib", "Timeouts can't be negative. Timeout is [%.2fs]", timeout.toSec());
ros::Time timeout_time = ros::Time::now() + timeout;
boost::mutex::scoped_lock lock(done_mutex_);
// Hardcode how often we check for node.ok()
ros::Duration loop_period = ros::Duration().fromSec(.1);
while (nh_.ok())
{
// Determine how long we should wait
ros::Duration time_left = timeout_time - ros::Time::now();
// Check if we're past the timeout time
if (timeout > ros::Duration(0,0) && time_left <= ros::Duration(0,0) )
{
break;
}
if (cur_simple_state_ == SimpleGoalState::DONE)
{
break;
}
// Truncate the time left
if (time_left > loop_period || timeout == ros::Duration())
time_left = loop_period;
done_condition_.timed_wait(lock, boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));
}
return (cur_simple_state_ == SimpleGoalState::DONE);
}
template<class ActionSpec>
SimpleClientGoalState SimpleActionClient<ActionSpec>::sendGoalAndWait(const Goal& goal,
const ros::Duration& execute_timeout,
const ros::Duration& preempt_timeout)
{
sendGoal(goal);
// See if the goal finishes in time
if (waitForResult(execute_timeout))
{
ROS_DEBUG_NAMED("actionlib", "Goal finished within specified execute_timeout [%.2f]", execute_timeout.toSec());
return getState();
}
ROS_DEBUG_NAMED("actionlib", "Goal didn't finish within specified execute_timeout [%.2f]", execute_timeout.toSec());
// It didn't finish in time, so we need to preempt it
cancelGoal();
// Now wait again and see if it finishes
if (waitForResult(preempt_timeout))
ROS_DEBUG_NAMED("actionlib", "Preempt finished within specified preempt_timeout [%.2f]", preempt_timeout.toSec());
else
ROS_DEBUG_NAMED("actionlib", "Preempt didn't finish specified preempt_timeout [%.2f]", preempt_timeout.toSec());
return getState();
}
}
#undef DEPRECATED
#endif // ACTIONLIB_SINGLE_GOAL_ACTION_CLIENT_H_
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/terminal_state.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_TERMINAL_STATE_H_
#define ACTIONLIB_CLIENT_TERMINAL_STATE_H_
namespace actionlib
{
class TerminalState
{
public:
enum StateEnum
{
RECALLED,
REJECTED,
PREEMPTED,
ABORTED,
SUCCEEDED,
LOST
} ;
TerminalState(const StateEnum& state, const std::string& text = std::string("")) : state_(state), text_(text) { }
inline bool operator==(const TerminalState& rhs) const
{
return (state_ == rhs.state_) ;
}
inline bool operator==(const TerminalState::StateEnum& rhs) const
{
return (state_ == rhs);
}
inline bool operator!=(const TerminalState::StateEnum& rhs) const
{
return !(*this == rhs);
}
inline bool operator!=(const TerminalState& rhs) const
{
return !(*this == rhs);
}
std::string getText() const
{
return text_;
}
std::string toString() const
{
switch(state_)
{
case RECALLED:
return "RECALLED";
case REJECTED:
return "REJECTED";
case PREEMPTED:
return "PREEMPTED";
case ABORTED:
return "ABORTED";
case SUCCEEDED:
return "SUCCEEDED";
case LOST:
return "LOST";
default:
ROS_ERROR_NAMED("actionlib", "BUG: Unhandled TerminalState: %u", state_);
break;
}
return "BUG-UNKNOWN";
}
StateEnum state_;
std::string text_;
private:
TerminalState();
} ;
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/goal_manager_imp.h | /*********************************************************************
* 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.
*********************************************************************/
/* This file has the template implementation for GoalHandle. It should be included with the
* class definition.
*/
namespace actionlib
{
template<class ActionSpec>
void GoalManager<ActionSpec>::registerSendGoalFunc(SendGoalFunc send_goal_func)
{
send_goal_func_ = send_goal_func;
}
template<class ActionSpec>
void GoalManager<ActionSpec>::registerCancelFunc(CancelFunc cancel_func)
{
cancel_func_ = cancel_func;
}
template<class ActionSpec>
ClientGoalHandle<ActionSpec> GoalManager<ActionSpec>::initGoal(const Goal& goal,
TransitionCallback transition_cb,
FeedbackCallback feedback_cb )
{
ActionGoalPtr action_goal(new ActionGoal);
action_goal->header.stamp = ros::Time::now();
action_goal->goal_id = id_generator_.generateID();
action_goal->goal = goal;
if (send_goal_func_)
send_goal_func_(action_goal);
else
ROS_WARN_NAMED("actionlib", "Possible coding error: send_goal_func_ set to NULL. Not going to send goal");
typedef CommStateMachine<ActionSpec> CommStateMachineT;
boost::shared_ptr<CommStateMachineT> comm_state_machine(new CommStateMachineT(action_goal, transition_cb, feedback_cb));
boost::recursive_mutex::scoped_lock lock(list_mutex_);
typename ManagedListT::Handle list_handle = list_.add(comm_state_machine, boost::bind(&GoalManagerT::listElemDeleter, this, _1), guard_);
return GoalHandleT(this, list_handle, guard_);
}
template<class ActionSpec>
void GoalManager<ActionSpec>::listElemDeleter(typename ManagedListT::iterator it)
{
assert(guard_);
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Not going to try delete the CommStateMachine associated with this goal");
return;
}
ROS_DEBUG_NAMED("actionlib", "About to erase CommStateMachine");
boost::recursive_mutex::scoped_lock lock(list_mutex_);
list_.erase(it);
ROS_DEBUG_NAMED("actionlib", "Done erasing CommStateMachine");
}
template<class ActionSpec>
void GoalManager<ActionSpec>::updateStatuses(const actionlib_msgs::GoalStatusArrayConstPtr& status_array)
{
boost::recursive_mutex::scoped_lock lock(list_mutex_);
typename ManagedListT::iterator it = list_.begin();
while (it != list_.end())
{
GoalHandleT gh(this, it.createHandle(), guard_);
(*it)->updateStatus(gh, status_array);
++it;
}
}
template<class ActionSpec>
void GoalManager<ActionSpec>::updateFeedbacks(const ActionFeedbackConstPtr& action_feedback)
{
boost::recursive_mutex::scoped_lock lock(list_mutex_);
typename ManagedListT::iterator it = list_.begin();
while (it != list_.end())
{
GoalHandleT gh(this, it.createHandle(), guard_);
(*it)->updateFeedback(gh, action_feedback);
++it;
}
}
template<class ActionSpec>
void GoalManager<ActionSpec>::updateResults(const ActionResultConstPtr& action_result)
{
boost::recursive_mutex::scoped_lock lock(list_mutex_);
typename ManagedListT::iterator it = list_.begin();
while (it != list_.end())
{
GoalHandleT gh(this, it.createHandle(), guard_);
(*it)->updateResult(gh, action_result);
++it;
}
}
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/comm_state_machine_imp.h | /*********************************************************************
* 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.
*********************************************************************/
/* This file has the template implementation for CommStateMachine. It should be included with the
* class definition.
*/
namespace actionlib
{
template <class ActionSpec>
CommStateMachine<ActionSpec>::CommStateMachine(const ActionGoalConstPtr& action_goal,
TransitionCallback transition_cb,
FeedbackCallback feedback_cb) : state_(CommState::WAITING_FOR_GOAL_ACK)
{
assert(action_goal);
action_goal_ = action_goal;
transition_cb_ = transition_cb;
feedback_cb_ = feedback_cb;
//transitionToState( CommState::WAITING_FOR_GOAL_ACK );
}
template <class ActionSpec>
typename CommStateMachine<ActionSpec>::ActionGoalConstPtr CommStateMachine<ActionSpec>::getActionGoal() const
{
return action_goal_;
}
template <class ActionSpec>
CommState CommStateMachine<ActionSpec>::getCommState() const
{
return state_;
}
template <class ActionSpec>
actionlib_msgs::GoalStatus CommStateMachine<ActionSpec>::getGoalStatus() const
{
return latest_goal_status_;
}
template <class ActionSpec>
typename CommStateMachine<ActionSpec>::ResultConstPtr CommStateMachine<ActionSpec>::getResult() const
{
ResultConstPtr result;
if (latest_result_)
{
EnclosureDeleter<const ActionResult> d(latest_result_);
result = ResultConstPtr(&(latest_result_->result), d);
}
return result;
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::setCommState(const CommState::StateEnum& state)
{
setCommState(CommState(state));
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::setCommState(const CommState& state)
{
ROS_DEBUG_NAMED("actionlib", "Transitioning CommState from %s to %s", state_.toString().c_str(), state.toString().c_str());
state_ = state;
}
template <class ActionSpec>
const actionlib_msgs::GoalStatus* CommStateMachine<ActionSpec>::findGoalStatus(const std::vector<actionlib_msgs::GoalStatus>& status_vec) const
{
for (unsigned int i=0; i<status_vec.size(); i++)
if (status_vec[i].goal_id.id == action_goal_->goal_id.id)
return &status_vec[i];
return NULL;
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::updateFeedback(GoalHandleT& gh, const ActionFeedbackConstPtr& action_feedback)
{
// Check if this feedback is for us
if (action_goal_->goal_id.id != action_feedback->status.goal_id.id)
return;
if (feedback_cb_)
{
EnclosureDeleter<const ActionFeedback> d(action_feedback);
FeedbackConstPtr feedback(&(action_feedback->feedback), d);
feedback_cb_(gh, feedback);
}
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::updateResult(GoalHandleT& gh, const ActionResultConstPtr& action_result)
{
// Check if this feedback is for us
if (action_goal_->goal_id.id != action_result->status.goal_id.id)
return;
latest_goal_status_ = action_result->status;
latest_result_ = action_result;
switch (state_.state_)
{
case CommState::WAITING_FOR_GOAL_ACK:
case CommState::PENDING:
case CommState::ACTIVE:
case CommState::WAITING_FOR_RESULT:
case CommState::WAITING_FOR_CANCEL_ACK:
case CommState::RECALLING:
case CommState::PREEMPTING:
{
// A little bit of hackery to call all the right state transitions before processing result
actionlib_msgs::GoalStatusArrayPtr status_array(new actionlib_msgs::GoalStatusArray());
status_array->status_list.push_back(action_result->status);
updateStatus(gh, status_array);
transitionToState(gh, CommState::DONE);
break;
}
case CommState::DONE:
ROS_ERROR_NAMED("actionlib", "Got a result when we were already in the DONE state"); break;
default:
ROS_ERROR_NAMED("actionlib", "In a funny comm state: %u", state_.state_); break;
}
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::updateStatus(GoalHandleT& gh, const actionlib_msgs::GoalStatusArrayConstPtr& status_array)
{
const actionlib_msgs::GoalStatus* goal_status = findGoalStatus(status_array->status_list);
// It's possible to receive old GoalStatus messages over the wire, even after receiving Result with a terminal state.
// Thus, we want to ignore all status that we get after we're done, because it is irrelevant. (See trac #2721)
if (state_ == CommState::DONE)
return;
if (goal_status)
latest_goal_status_ = *goal_status;
else
{
if (state_ != CommState::WAITING_FOR_GOAL_ACK &&
state_ != CommState::WAITING_FOR_RESULT &&
state_ != CommState::DONE)
{
processLost(gh);
}
return;
}
switch (state_.state_)
{
case CommState::WAITING_FOR_GOAL_ACK:
{
if (goal_status)
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
transitionToState(gh, CommState::PENDING);
break;
case actionlib_msgs::GoalStatus::ACTIVE:
transitionToState(gh, CommState::ACTIVE);
break;
case actionlib_msgs::GoalStatus::PREEMPTED:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::PREEMPTING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::SUCCEEDED:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::ABORTED:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::REJECTED:
transitionToState(gh, CommState::PENDING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::RECALLED:
transitionToState(gh, CommState::PENDING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::PREEMPTING:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::PREEMPTING);
break;
case actionlib_msgs::GoalStatus::RECALLING:
transitionToState(gh, CommState::PENDING);
transitionToState(gh, CommState::RECALLING);
break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown status from the ActionServer. status = %u", goal_status->status);
break;
}
}
break;
}
case CommState::PENDING:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
break;
case actionlib_msgs::GoalStatus::ACTIVE:
transitionToState(gh, CommState::ACTIVE);
break;
case actionlib_msgs::GoalStatus::PREEMPTED:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::PREEMPTING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::SUCCEEDED:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::ABORTED:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::REJECTED:
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::RECALLED:
transitionToState(gh, CommState::RECALLING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::PREEMPTING:
transitionToState(gh, CommState::ACTIVE);
transitionToState(gh, CommState::PREEMPTING);
break;
case actionlib_msgs::GoalStatus::RECALLING:
transitionToState(gh, CommState::RECALLING);
break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown goal status from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
case CommState::ACTIVE:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
ROS_ERROR_NAMED("actionlib", "Invalid transition from ACTIVE to PENDING"); break;
case actionlib_msgs::GoalStatus::ACTIVE:
break;
case actionlib_msgs::GoalStatus::REJECTED:
ROS_ERROR_NAMED("actionlib", "Invalid transition from ACTIVE to REJECTED"); break;
case actionlib_msgs::GoalStatus::RECALLING:
ROS_ERROR_NAMED("actionlib", "Invalid transition from ACTIVE to RECALLING"); break;
case actionlib_msgs::GoalStatus::RECALLED:
ROS_ERROR_NAMED("actionlib", "Invalid transition from ACTIVE to RECALLED"); break;
case actionlib_msgs::GoalStatus::PREEMPTED:
transitionToState(gh, CommState::PREEMPTING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::SUCCEEDED:
case actionlib_msgs::GoalStatus::ABORTED:
transitionToState(gh, CommState::WAITING_FOR_RESULT); break;
case actionlib_msgs::GoalStatus::PREEMPTING:
transitionToState(gh, CommState::PREEMPTING); break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown goal status from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
case CommState::WAITING_FOR_RESULT:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING :
ROS_ERROR_NAMED("actionlib", "Invalid Transition from WAITING_FOR_RESUT to PENDING"); break;
case actionlib_msgs::GoalStatus::PREEMPTING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from WAITING_FOR_RESUT to PREEMPTING"); break;
case actionlib_msgs::GoalStatus::RECALLING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from WAITING_FOR_RESUT to RECALLING"); break;
case actionlib_msgs::GoalStatus::ACTIVE:
case actionlib_msgs::GoalStatus::PREEMPTED:
case actionlib_msgs::GoalStatus::SUCCEEDED:
case actionlib_msgs::GoalStatus::ABORTED:
case actionlib_msgs::GoalStatus::REJECTED:
case actionlib_msgs::GoalStatus::RECALLED:
break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown state from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
case CommState::WAITING_FOR_CANCEL_ACK:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
break;
case actionlib_msgs::GoalStatus::ACTIVE:
break;
case actionlib_msgs::GoalStatus::SUCCEEDED:
case actionlib_msgs::GoalStatus::ABORTED:
case actionlib_msgs::GoalStatus::PREEMPTED:
transitionToState(gh, CommState::PREEMPTING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::RECALLED:
transitionToState(gh, CommState::RECALLING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::REJECTED:
transitionToState(gh, CommState::WAITING_FOR_RESULT); break;
case actionlib_msgs::GoalStatus::PREEMPTING:
transitionToState(gh, CommState::PREEMPTING); break;
case actionlib_msgs::GoalStatus::RECALLING:
transitionToState(gh, CommState::RECALLING); break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown state from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
case CommState::RECALLING:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from RECALLING to PENDING"); break;
case actionlib_msgs::GoalStatus::ACTIVE:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from RECALLING to ACTIVE"); break;
case actionlib_msgs::GoalStatus::SUCCEEDED:
case actionlib_msgs::GoalStatus::ABORTED:
case actionlib_msgs::GoalStatus::PREEMPTED:
transitionToState(gh, CommState::PREEMPTING);
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::RECALLED:
transitionToState(gh, CommState::WAITING_FOR_RESULT);
break;
case actionlib_msgs::GoalStatus::REJECTED:
transitionToState(gh, CommState::WAITING_FOR_RESULT); break;
case actionlib_msgs::GoalStatus::PREEMPTING:
transitionToState(gh, CommState::PREEMPTING); break;
case actionlib_msgs::GoalStatus::RECALLING:
break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown state from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
case CommState::PREEMPTING:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from PREEMPTING to PENDING"); break;
case actionlib_msgs::GoalStatus::ACTIVE:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from PREEMPTING to ACTIVE"); break;
case actionlib_msgs::GoalStatus::REJECTED:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from PREEMPTING to REJECTED"); break;
case actionlib_msgs::GoalStatus::RECALLING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from PREEMPTING to RECALLING"); break;
case actionlib_msgs::GoalStatus::RECALLED:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from PREEMPTING to RECALLED"); break;
break;
case actionlib_msgs::GoalStatus::PREEMPTED:
case actionlib_msgs::GoalStatus::SUCCEEDED:
case actionlib_msgs::GoalStatus::ABORTED:
transitionToState(gh, CommState::WAITING_FOR_RESULT); break;
case actionlib_msgs::GoalStatus::PREEMPTING:
break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown state from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
case CommState::DONE:
{
switch (goal_status->status)
{
case actionlib_msgs::GoalStatus::PENDING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from DONE to PENDING"); break;
case actionlib_msgs::GoalStatus::ACTIVE:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from DONE to ACTIVE"); break;
case actionlib_msgs::GoalStatus::RECALLING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from DONE to RECALLING"); break;
case actionlib_msgs::GoalStatus::PREEMPTING:
ROS_ERROR_NAMED("actionlib", "Invalid Transition from DONE to PREEMPTING"); break;
case actionlib_msgs::GoalStatus::PREEMPTED:
case actionlib_msgs::GoalStatus::SUCCEEDED:
case actionlib_msgs::GoalStatus::ABORTED:
case actionlib_msgs::GoalStatus::RECALLED:
case actionlib_msgs::GoalStatus::REJECTED:
break;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Got an unknown state from the ActionServer. status = %u", goal_status->status);
break;
}
break;
}
default:
ROS_ERROR_NAMED("actionlib", "In a funny comm state: %u", state_.state_);
break;
}
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::processLost(GoalHandleT& gh)
{
ROS_WARN_NAMED("actionlib", "Transitioning goal to LOST");
latest_goal_status_.status = actionlib_msgs::GoalStatus::LOST;
transitionToState(gh, CommState::DONE);
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::transitionToState(GoalHandleT& gh, const CommState::StateEnum& next_state)
{
transitionToState(gh, CommState(next_state));
}
template <class ActionSpec>
void CommStateMachine<ActionSpec>::transitionToState(GoalHandleT& gh, const CommState& next_state)
{
ROS_DEBUG_NAMED("actionlib", "Trying to transition to %s", next_state.toString().c_str());
setCommState(next_state);
if (transition_cb_)
transition_cb_(gh);
}
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/comm_state.h | /*********************************************************************
* 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.
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_COMM_STATE_H_
#define ACTIONLIB_CLIENT_COMM_STATE_H_
#include <string>
#include "ros/console.h"
namespace actionlib
{
/**
* \brief Thin wrapper around an enum in order to help interpret the state of the communication state machine
**/
class CommState
{
public:
//! \brief Defines the various states the Communication State Machine can be in
enum StateEnum
{
WAITING_FOR_GOAL_ACK = 0,
PENDING = 1,
ACTIVE = 2,
WAITING_FOR_RESULT = 3,
WAITING_FOR_CANCEL_ACK = 4,
RECALLING = 5,
PREEMPTING = 6,
DONE = 7
} ;
CommState(const StateEnum& state) : state_(state) { }
inline bool operator==(const CommState& rhs) const
{
return (state_ == rhs.state_) ;
}
inline bool operator==(const CommState::StateEnum& rhs) const
{
return (state_ == rhs);
}
inline bool operator!=(const CommState::StateEnum& rhs) const
{
return !(*this == rhs);
}
inline bool operator!=(const CommState& rhs) const
{
return !(*this == rhs);
}
std::string toString() const
{
switch(state_)
{
case WAITING_FOR_GOAL_ACK:
return "WAITING_FOR_GOAL_ACK";
case PENDING:
return "PENDING";
case ACTIVE:
return "ACTIVE";
case WAITING_FOR_RESULT:
return "WAITING_FOR_RESULT";
case WAITING_FOR_CANCEL_ACK:
return "WAITING_FOR_CANCEL_ACK";
case RECALLING:
return "RECALLING";
case PREEMPTING:
return "PREEMPTING";
case DONE:
return "DONE";
default:
ROS_ERROR_NAMED("actionlib", "BUG: Unhandled CommState: %u", state_);
break;
}
return "BUG-UNKNOWN";
}
StateEnum state_;
private:
CommState();
} ;
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/service_client_imp.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, 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, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ACTIONLIB_CLIENT_SERVICE_CLIENT_IMP_H_
#define ACTIONLIB_CLIENT_SERVICE_CLIENT_IMP_H_
namespace actionlib {
template <class ActionSpec>
ServiceClientImpT<ActionSpec>::ServiceClientImpT(ros::NodeHandle n, std::string name){
ac_.reset(new SimpleActionClientT(n, name, true));
}
template <class ActionSpec>
bool ServiceClientImpT<ActionSpec>::waitForServer(const ros::Duration& timeout){
return ac_->waitForServer(timeout);
}
template <class ActionSpec>
bool ServiceClientImpT<ActionSpec>::isServerConnected(){
return ac_->isServerConnected();
}
template <class ActionSpec>
bool ServiceClientImpT<ActionSpec>::call(const void* goal, std::string goal_md5sum,
void* result, std::string result_md5sum)
{
//ok... we need to static cast the goal message and result message
const Goal* goal_c = static_cast<const Goal*>(goal);
Result* result_c = static_cast<Result*>(result);
//now we need to check that the md5sums are correct
namespace mt = ros::message_traits;
if(strcmp(mt::md5sum(*goal_c), goal_md5sum.c_str()) || strcmp(mt::md5sum(*result_c), result_md5sum.c_str()))
{
ROS_ERROR_NAMED("actionlib", "Incorrect md5Sums for goal and result types");
return false;
}
if(!ac_->isServerConnected()){
ROS_ERROR_NAMED("actionlib", "Attempting to make a service call when the server isn't actually connected to the client.");
return false;
}
ac_->sendGoalAndWait(*goal_c);
if(ac_->getState() == SimpleClientGoalState::SUCCEEDED){
(*result_c) = *(ac_->getResult());
return true;
}
return false;
}
//****** ServiceClient *******************
template <class Goal, class Result>
bool ServiceClient::call(const Goal& goal, Result& result){
namespace mt = ros::message_traits;
return client_->call(&goal, mt::md5sum(goal), &result, mt::md5sum(result));
}
bool ServiceClient::waitForServer(const ros::Duration& timeout){
return client_->waitForServer(timeout);
}
bool ServiceClient::isServerConnected(){
return client_->isServerConnected();
}
//****** actionlib::serviceClient *******************
template <class ActionSpec>
ServiceClient serviceClient(ros::NodeHandle n, std::string name){
boost::shared_ptr<ServiceClientImp> client_ptr(new ServiceClientImpT<ActionSpec>(n, name));
return ServiceClient(client_ptr);
}
};
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/include/actionlib/client/client_goal_handle_imp.h | /*********************************************************************
* 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.
*********************************************************************/
/* This file has the template implementation for ClientGoalHandle. It should be included with the
* class definition.
*/
namespace actionlib
{
template<class ActionSpec>
ClientGoalHandle<ActionSpec>::ClientGoalHandle()
{
gm_ = NULL;
active_ = false;
}
template<class ActionSpec>
ClientGoalHandle<ActionSpec>::~ClientGoalHandle()
{
reset();
}
template<class ActionSpec>
ClientGoalHandle<ActionSpec>::ClientGoalHandle(GoalManagerT* gm, typename ManagedListT::Handle handle,
const boost::shared_ptr<DestructionGuard>& guard)
{
gm_ = gm;
active_ = true;
list_handle_ = handle;
guard_ = guard;
}
template<class ActionSpec>
void ClientGoalHandle<ActionSpec>::reset()
{
if (active_)
{
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this reset() call");
return;
}
boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
list_handle_.reset();
active_ = false;
gm_ = NULL;
}
}
template<class ActionSpec>
bool ClientGoalHandle<ActionSpec>::isExpired() const
{
return !active_;
}
template<class ActionSpec>
CommState ClientGoalHandle<ActionSpec>::getCommState()
{
if (!active_)
{
ROS_ERROR_NAMED("actionlib", "Trying to getCommState on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
return CommState(CommState::DONE);
}
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this getCommState() call");
return CommState(CommState::DONE);
}
assert(gm_);
boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
return list_handle_.getElem()->getCommState();
}
template<class ActionSpec>
TerminalState ClientGoalHandle<ActionSpec>::getTerminalState()
{
if (!active_)
{
ROS_ERROR_NAMED("actionlib", "Trying to getTerminalState on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
return TerminalState(TerminalState::LOST);
}
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this getTerminalState() call");
return TerminalState(TerminalState::LOST);
}
assert(gm_);
boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
CommState comm_state_ = list_handle_.getElem()->getCommState();
if (comm_state_ != CommState::DONE)
ROS_WARN_NAMED("actionlib", "Asking for the terminal state when we're in [%s]", comm_state_.toString().c_str());
actionlib_msgs::GoalStatus goal_status = list_handle_.getElem()->getGoalStatus();
switch (goal_status.status)
{
case actionlib_msgs::GoalStatus::PENDING:
case actionlib_msgs::GoalStatus::ACTIVE:
case actionlib_msgs::GoalStatus::PREEMPTING:
case actionlib_msgs::GoalStatus::RECALLING:
ROS_ERROR_NAMED("actionlib", "Asking for terminal state, but latest goal status is %u", goal_status.status); return TerminalState(TerminalState::LOST, goal_status.text);
case actionlib_msgs::GoalStatus::PREEMPTED: return TerminalState(TerminalState::PREEMPTED, goal_status.text);
case actionlib_msgs::GoalStatus::SUCCEEDED: return TerminalState(TerminalState::SUCCEEDED, goal_status.text);
case actionlib_msgs::GoalStatus::ABORTED: return TerminalState(TerminalState::ABORTED, goal_status.text);
case actionlib_msgs::GoalStatus::REJECTED: return TerminalState(TerminalState::REJECTED, goal_status.text);
case actionlib_msgs::GoalStatus::RECALLED: return TerminalState(TerminalState::RECALLED, goal_status.text);
case actionlib_msgs::GoalStatus::LOST: return TerminalState(TerminalState::LOST, goal_status.text);
default:
ROS_ERROR_NAMED("actionlib", "Unknown goal status: %u", goal_status.status); break;
}
ROS_ERROR_NAMED("actionlib", "Bug in determining terminal state");
return TerminalState(TerminalState::LOST, goal_status.text);
}
template<class ActionSpec>
typename ClientGoalHandle<ActionSpec>::ResultConstPtr ClientGoalHandle<ActionSpec>::getResult()
{
if (!active_)
ROS_ERROR_NAMED("actionlib", "Trying to getResult on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
assert(gm_);
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this getResult() call");
return typename ClientGoalHandle<ActionSpec>::ResultConstPtr() ;
}
boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
return list_handle_.getElem()->getResult();
}
template<class ActionSpec>
void ClientGoalHandle<ActionSpec>::resend()
{
if (!active_)
ROS_ERROR_NAMED("actionlib", "Trying to resend() on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this resend() call");
return;
}
assert(gm_);
boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
ActionGoalConstPtr action_goal = list_handle_.getElem()->getActionGoal();
if (!action_goal)
ROS_ERROR_NAMED("actionlib", "BUG: Got a NULL action_goal");
if (gm_->send_goal_func_)
gm_->send_goal_func_(action_goal);
}
template<class ActionSpec>
void ClientGoalHandle<ActionSpec>::cancel()
{
if (!active_)
{
ROS_ERROR_NAMED("actionlib", "Trying to cancel() on an inactive ClientGoalHandle. You are incorrectly using a ClientGoalHandle");
return;
}
assert(gm_);
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this call");
return;
}
boost::recursive_mutex::scoped_lock lock(gm_->list_mutex_);
switch(list_handle_.getElem()->getCommState().state_)
{
case CommState::WAITING_FOR_GOAL_ACK:
case CommState::PENDING:
case CommState::ACTIVE:
case CommState::WAITING_FOR_CANCEL_ACK:
break; // Continue standard processing
case CommState::WAITING_FOR_RESULT:
case CommState::RECALLING:
case CommState::PREEMPTING:
case CommState::DONE:
ROS_DEBUG_NAMED("actionlib", "Got a cancel() request while in state [%s], so ignoring it", list_handle_.getElem()->getCommState().toString().c_str());
return;
default:
ROS_ERROR_NAMED("actionlib", "BUG: Unhandled CommState: %u", list_handle_.getElem()->getCommState().state_);
return;
}
ActionGoalConstPtr action_goal = list_handle_.getElem()->getActionGoal();
actionlib_msgs::GoalID cancel_msg;
cancel_msg.stamp = ros::Time(0,0);
cancel_msg.id = list_handle_.getElem()->getActionGoal()->goal_id.id;
if (gm_->cancel_func_)
gm_->cancel_func_(cancel_msg);
list_handle_.getElem()->transitionToState(*this, CommState::WAITING_FOR_CANCEL_ACK);
}
template<class ActionSpec>
bool ClientGoalHandle<ActionSpec>::operator==(const ClientGoalHandle<ActionSpec>& rhs) const
{
// Check if both are inactive
if (!active_ && !rhs.active_)
return true;
// Check if one or the other is inactive
if (!active_ || !rhs.active_)
return false;
DestructionGuard::ScopedProtector protector(*guard_);
if (!protector.isProtected())
{
ROS_ERROR_NAMED("actionlib", "This action client associated with the goal handle has already been destructed. Ignoring this operator==() call");
return false;
}
return (list_handle_ == rhs.list_handle_) ;
}
template<class ActionSpec>
bool ClientGoalHandle<ActionSpec>::operator!=(const ClientGoalHandle<ActionSpec>& rhs) const
{
return !(*this==rhs);
}
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/docs/cancel_policy.svg | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="958.31525"
height="513.98163"
id="svg6606"
sodipodi:version="0.32"
inkscape:version="0.47pre4 r22446"
version="1.0"
sodipodi:docname="cancel_policy.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/u/eitan/wiki/actions/preempt_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs6608">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 300 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="800 : 300 : 1"
inkscape:persp3d-origin="400 : 200 : 1"
id="perspective6614" />
<inkscape:perspective
id="perspective3926"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="461.0301"
inkscape:cy="185.75044"
inkscape:current-layer="layer1"
inkscape:document-units="px"
showgrid="false"
inkscape:window-width="1379"
inkscape:window-height="954"
inkscape:window-x="632"
inkscape:window-y="530"
inkscape:window-maximized="0" />
<metadata
id="metadata6611">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(-7.6477224,-14.457794)">
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect6616"
width="248.48979"
height="248.48981"
x="127.67825"
y="173.08934"
rx="0.15264323"
ry="0.075367458"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 251.92315,172.96096 0,248.74657"
id="path7127"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 127.42491,297.33425 248.99647,0"
id="path7129"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-size:18;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="293.49945"
y="161.35841"
id="text7140"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7142"
x="293.49945"
y="161.35841"
style="font-size:18">filled</tspan></text>
<text
xml:space="preserve"
style="font-size:18;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="156.12367"
y="161.00139"
id="text7144"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7146"
x="156.12367"
y="161.00139"
style="font-size:18">empty</tspan></text>
<text
xml:space="preserve"
style="font-size:18;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="-272.84833"
y="117.6222"
id="text7148"
transform="matrix(0,-1,1,0,0,0)"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7150"
x="-272.84833"
y="117.6222"
style="font-size:18">empty</tspan></text>
<text
xml:space="preserve"
style="font-size:18;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="-385.19232"
y="121.51474"
id="text7152"
transform="matrix(0,-1,1,0,0,0)"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7154"
x="-385.19232"
y="121.51474"
style="font-size:18">filled</tspan></text>
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="249.24095"
y="131.58717"
id="text7156"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7158"
x="249.24095"
y="131.58717"
style="font-size:20px;text-align:center;text-anchor:middle">stamp</tspan></text>
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="80.276649"
y="304.75568"
id="text7160"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7162"
x="80.276649"
y="304.75568"
style="font-size:20px;text-align:center;text-anchor:middle">ID</tspan></text>
<text
xml:space="preserve"
style="font-size:14;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="189.57484"
y="230.75166"
id="text7164"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7166"
x="192.12172"
y="230.75166"
style="font-size:14;text-align:center;text-anchor:middle">cancel all </tspan><tspan
sodipodi:role="line"
x="189.57484"
y="250.75166"
style="font-size:14;text-align:center;text-anchor:middle"
id="tspan7168">goals</tspan></text>
<text
xml:space="preserve"
style="font-size:14;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="316.88861"
y="224.50166"
id="text7170"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
x="319.43549"
y="224.50166"
style="font-size:14;text-align:center;text-anchor:middle"
id="tspan7174">cancel all </tspan><tspan
sodipodi:role="line"
x="319.43549"
y="244.50166"
style="font-size:14;text-align:center;text-anchor:middle"
id="tspan7178">goals before </tspan><tspan
sodipodi:role="line"
x="316.88861"
y="264.50165"
style="font-size:14;font-style:italic;text-align:center;text-anchor:middle"
id="tspan7196">stamp</tspan></text>
<text
xml:space="preserve"
style="font-size:14;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="189.00014"
y="353.0141"
id="text7180"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
x="189.00014"
y="353.0141"
style="font-size:14;text-align:center;text-anchor:middle"
id="tspan7190">cancel goal</tspan><tspan
sodipodi:role="line"
x="189.00014"
y="373.0141"
style="font-size:14;font-style:italic;text-align:center;text-anchor:middle"
id="tspan3095">Goal ID</tspan></text>
<text
xml:space="preserve"
style="font-size:14px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="314.71918"
y="324.76947"
id="text7198"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
x="314.71918"
y="324.76947"
style="font-size:14px;text-align:center;text-anchor:middle"
id="tspan7202">cancel goal</tspan><tspan
sodipodi:role="line"
x="314.71918"
y="342.26947"
style="font-size:14px;font-style:italic;text-align:center;text-anchor:middle"
id="tspan3896">Goal ID</tspan><tspan
sodipodi:role="line"
x="314.71918"
y="359.76947"
style="font-size:14px;text-align:center;text-anchor:middle"
id="tspan3910">+</tspan><tspan
sodipodi:role="line"
x="314.71918"
y="377.26947"
style="font-size:14px;text-align:center;text-anchor:middle"
id="tspan3894">cancel all</tspan><tspan
sodipodi:role="line"
x="314.71918"
y="394.76947"
style="font-size:14px;font-style:italic;text-align:center;text-anchor:middle"
id="tspan3886"><tspan
id="tspan3914"
style="font-size:14px;font-style:normal;text-align:center;text-anchor:middle">goals before</tspan></tspan><tspan
sodipodi:role="line"
x="314.71918"
y="412.26947"
style="font-size:14px;font-style:italic;text-align:center;text-anchor:middle"
id="tspan3916">stamp</tspan></text>
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="39.160015"
y="96.725761"
id="text7210"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/cancel_policy.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212"
x="39.160015"
y="96.725761"
style="font-size:20px;fill:#336699;fill-opacity:1">Cancel Request Policy</tspan></text>
</g>
</svg>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/docs/server_states_detailed.svg | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1000"
height="1000"
id="svg7483"
sodipodi:version="0.32"
inkscape:version="0.47pre4 r22446"
version="1.0"
sodipodi:docname="server_states_detailed.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/u/eitan/wiki/actions/goal_status_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs7485">
<linearGradient
id="linearGradient3935">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937" />
<stop
id="stop3943"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible">
<path
id="path3785"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(0.8,0,0,0.8,10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible">
<path
id="path3179"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 300 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="800 : 300 : 1"
inkscape:persp3d-origin="400 : 200 : 1"
id="perspective7491" />
<inkscape:perspective
id="perspective3656"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3681"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3703"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3916"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3935"
id="radialGradient3941"
cx="297.5"
cy="516.5"
fx="297.5"
fy="516.5"
r="31.5"
gradientTransform="matrix(1.1311475,0,0,0.80129336,-75.92544,-892.49035)"
gradientUnits="userSpaceOnUse" />
<inkscape:perspective
id="perspective3973"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8"
style="overflow:visible">
<path
id="path3179-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-4" />
<stop
id="stop3943-1"
offset="0.15384616"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-5" />
</linearGradient>
<inkscape:perspective
id="perspective5629"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5654"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5679"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5707"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5707-3"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5760"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5760-6"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5809"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5838"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3935-2"
id="radialGradient3941-9"
cx="297.5"
cy="516.5"
fx="297.5"
fy="516.5"
r="31.5"
gradientTransform="matrix(1.1311475,0,0,0.80129336,-159.92544,-563.49035)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3935-2">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-47" />
<stop
id="stop3943-8"
offset="0.21153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-3" />
</linearGradient>
<inkscape:perspective
id="perspective6271"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.7377049,0,0,1.4832452,-5.3762528,-872.2186)"
gradientUnits="userSpaceOnUse"
id="radialGradient5848-0"
xlink:href="#linearGradient3935-2-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-2-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-47-3" />
<stop
id="stop3943-8-6"
offset="0.57692307"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-3-4" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3935"
id="radialGradient6316"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-75.92544,-669.65349)"
cx="297.5"
cy="516.5"
fx="297.5"
fy="516.5"
r="31.5" />
<inkscape:perspective
id="perspective6326"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.3278688,0,0,0.32392712,117.04997,-281.43072)"
gradientUnits="userSpaceOnUse"
id="radialGradient5848-1"
xlink:href="#linearGradient3935-2-2"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-2-2">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-47-0" />
<stop
id="stop3943-8-0"
offset="0.57692307"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-3-9" />
</linearGradient>
<inkscape:perspective
id="perspective6369"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6369-0"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6400"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6437"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2979"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3024"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3049"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3935-6"
id="radialGradient6316-5"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-114.92544,-338.15349)"
cx="297.5"
cy="516.5"
fx="297.5"
fy="516.5"
r="31.5" />
<linearGradient
id="linearGradient3935-6">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9" />
<stop
id="stop3943-87"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,130.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059"
xlink:href="#linearGradient3935-6"
inkscape:collect="always" />
<inkscape:perspective
id="perspective4082"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4295"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0"
style="overflow:visible">
<path
id="path3179-0-7"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective4551"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4576"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4601"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4623"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4840"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4865"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3935-9"
id="radialGradient6316-53"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-47.92544,-528.65349)"
cx="297.5"
cy="516.5"
fx="297.5"
fy="516.5"
r="31.5" />
<linearGradient
id="linearGradient3935-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-8" />
<stop
id="stop3943-6"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-6" />
</linearGradient>
<inkscape:perspective
id="perspective3390"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3935-9-6">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-8-4" />
<stop
id="stop3943-6-0"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-6-0" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-4"
style="overflow:visible">
<path
id="path3179-0-7-6"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3401"
style="overflow:visible">
<path
id="path3403"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-2"
style="overflow:visible">
<path
id="path3179-0-6"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3407"
style="overflow:visible">
<path
id="path3409"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3411"
style="overflow:visible">
<path
id="path3413"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3415"
style="overflow:visible">
<path
id="path3417"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3419"
style="overflow:visible">
<path
id="path3421"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3423"
style="overflow:visible">
<path
id="path3425"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-6" />
<stop
id="stop3943-87-9"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-8" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3432"
style="overflow:visible">
<path
id="path3434"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3436"
style="overflow:visible">
<path
id="path3438"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3440"
style="overflow:visible">
<path
id="path3442"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-28">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-2" />
<stop
id="stop3943-9"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-9" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-6"
style="overflow:visible">
<path
id="path3179-02"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3452">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3454" />
<stop
id="stop3456"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3458" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3460"
style="overflow:visible">
<path
id="path3462"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective3807"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3807-7"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3807-4"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5165"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5630"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5661"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5692"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5946"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5971"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5996"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6461"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6483"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6508"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3935-60"
id="radialGradient6316-51"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-63.92544,-528.65349)"
cx="297.5"
cy="516.5"
fx="297.5"
fy="516.5"
r="31.5" />
<linearGradient
id="linearGradient3935-60">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-40" />
<stop
id="stop3943-4"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-8" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-76.425447,-557.51915)"
gradientUnits="userSpaceOnUse"
id="radialGradient6518"
xlink:href="#linearGradient3935-60"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6549"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-64.425447,-416.51915)"
gradientUnits="userSpaceOnUse"
id="radialGradient6518-6"
xlink:href="#linearGradient3935-60-1"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-60-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-40-6" />
<stop
id="stop3943-4-6"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-8-0" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,131.35691,-556.34759)"
gradientUnits="userSpaceOnUse"
id="radialGradient6559"
xlink:href="#linearGradient3935-60-1"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6590"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,129.35691,-415.34759)"
gradientUnits="userSpaceOnUse"
id="radialGradient6559-6"
xlink:href="#linearGradient3935-60-1-3"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-60-1-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-40-6-6" />
<stop
id="stop3943-4-6-1"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-8-0-8" />
</linearGradient>
<inkscape:perspective
id="perspective6631"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,129.35691,-415.34759)"
gradientUnits="userSpaceOnUse"
id="radialGradient6559-0"
xlink:href="#linearGradient3935-60-1-7"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-60-1-7">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-40-6-0" />
<stop
id="stop3943-4-6-8"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-8-0-5" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,213.62395,-646.15016)"
gradientUnits="userSpaceOnUse"
id="radialGradient6641"
xlink:href="#linearGradient3935-60-1-7"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6672"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,211.62395,-505.15016)"
gradientUnits="userSpaceOnUse"
id="radialGradient6641-7"
xlink:href="#linearGradient3935-60-1-7-3"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-60-1-7-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-40-6-0-7" />
<stop
id="stop3943-4-6-8-5"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-8-0-5-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,214.67421,-681.3842)"
gradientUnits="userSpaceOnUse"
id="radialGradient6682"
xlink:href="#linearGradient3935-60-1-7-3"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6885"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3095"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3120"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3150"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3150-9"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3200"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3228"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3259"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3287"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3339"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3374"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3413"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3442"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3470"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3495"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3520"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3548"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3578"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3603"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3648"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3676"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3738"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3763"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3794"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6224"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-0"
style="overflow:visible">
<path
id="path3179-0-7-4"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective6492"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-4"
xlink:href="#linearGradient3935-6-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-3" />
<stop
id="stop3943-87-2"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-254.42544,-191.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502"
xlink:href="#linearGradient3935-6-9"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-1"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-8"
xlink:href="#linearGradient3935-6-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-1" />
<stop
id="stop3943-87-7"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-7" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-191.42544,-126.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-9"
xlink:href="#linearGradient3935-6-4"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-8"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-7"
xlink:href="#linearGradient3935-6-3"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-7" />
<stop
id="stop3943-87-1"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-9" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-68.425439,-122.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-4"
xlink:href="#linearGradient3935-6-3"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-6"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-6"
xlink:href="#linearGradient3935-6-54"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-54">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-77" />
<stop
id="stop3943-87-25"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-6" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-201.42544,-239.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-96"
xlink:href="#linearGradient3935-6-54"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-11"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-1"
xlink:href="#linearGradient3935-6-1"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9" />
<stop
id="stop3943-87-3"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-100.42544,-241.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-2"
xlink:href="#linearGradient3935-6-1"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-5"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-0"
xlink:href="#linearGradient3935-6-16"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65" />
<stop
id="stop3943-87-97"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,42.57456,-119.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-968"
xlink:href="#linearGradient3935-6-16"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-7"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-63"
xlink:href="#linearGradient3935-6-32"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-32">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-4" />
<stop
id="stop3943-87-78"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-5" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-145.42544,-6.6535455)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-3"
xlink:href="#linearGradient3935-6-32"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-0"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-10"
xlink:href="#linearGradient3935-6-7"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-7">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-17" />
<stop
id="stop3943-87-0"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-3" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-17.425439,-2.6535455)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-98"
xlink:href="#linearGradient3935-6-7"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6492-74"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,128.32456,-669.65351)"
gradientUnits="userSpaceOnUse"
id="radialGradient3059-2"
xlink:href="#linearGradient3935-6-75"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5" />
<stop
id="stop3943-87-71"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,1.1593181,144.57456,-482.41027)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-7"
xlink:href="#linearGradient3935-6-75"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6701"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,1.1593181,246.57456,-482.41027)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-7-3"
xlink:href="#linearGradient3935-6-75-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8" />
<stop
id="stop3943-87-71-9"
offset="0.76923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.819672,0,0,1.1593181,-116.2615,-408.91032)"
gradientUnits="userSpaceOnUse"
id="radialGradient6711"
xlink:href="#linearGradient3935-6-75-4"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6742"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.819672,0,0,1.1593181,-14.261498,-408.91032)"
gradientUnits="userSpaceOnUse"
id="radialGradient6711-4"
xlink:href="#linearGradient3935-6-75-4-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8-9" />
<stop
id="stop3943-87-71-9-4"
offset="0.76923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2-8" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.3934425,0,0,1.1593181,19.54178,-339.91032)"
gradientUnits="userSpaceOnUse"
id="radialGradient6752"
xlink:href="#linearGradient3935-6-75-4-5"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6783"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1.5745607,-241.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-2-6"
xlink:href="#linearGradient3935-6-1-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-4" />
<stop
id="stop3943-87-3-6"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-6" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.76719577,266.57456,-197.3791)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793"
xlink:href="#linearGradient3935-6-1-0"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6783-9"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1.5745607,-241.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-2-0"
xlink:href="#linearGradient3935-6-1-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42" />
<stop
id="stop3943-87-3-8"
offset="0.80769229"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.5573769,0,0,0.39212228,-267.22871,-65.653566)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-7"
xlink:href="#linearGradient3935-6-1-4"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6845"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-7"
style="overflow:visible">
<path
id="path3179-0-3"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker6851"
style="overflow:visible">
<path
id="path6853"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective3305"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-100.42544,-241.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-2-7"
xlink:href="#linearGradient3935-6-1-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-8" />
<stop
id="stop3943-87-3-60"
offset="0.57692307"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,-22.425439,-176.65357)"
gradientUnits="userSpaceOnUse"
id="radialGradient3317"
xlink:href="#linearGradient3935-6-1-8"
inkscape:collect="always" />
<inkscape:perspective
id="perspective3313"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,964.37339,-328.77515)"
gradientUnits="userSpaceOnUse"
id="radialGradient3317-2"
xlink:href="#linearGradient3935-6-1-8-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-8-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-8-3" />
<stop
id="stop3943-87-3-60-9"
offset="0.57692307"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-4-0" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-8"
style="overflow:visible">
<path
id="path3179-0-8"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3324"
style="overflow:visible">
<path
id="path3326"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,912.37339,-274.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-4-5"
xlink:href="#linearGradient3935-6-3-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-3-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-7-9" />
<stop
id="stop3943-87-1-6"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-9-3" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1031.3734,-278.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-9-8"
xlink:href="#linearGradient3935-6-4-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-4-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-1-6" />
<stop
id="stop3943-87-7-1"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-7-1" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,761.37339,-372.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-5"
xlink:href="#linearGradient3935-6-9-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-9-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-3-8" />
<stop
id="stop3943-87-2-4"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-4-8" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-1"
style="overflow:visible">
<path
id="path3179-0-7-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.76719577,970.3734,-130.50068)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-3"
xlink:href="#linearGradient3935-6-1-0-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-0-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-4-4" />
<stop
id="stop3943-87-3-6-4"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-6-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,1.0570253,1037.3734,-386.69762)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-7-4"
xlink:href="#linearGradient3935-6-75-7"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-7">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-6" />
<stop
id="stop3943-87-71-3"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-1" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1029.3734,-159.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-968-7"
xlink:href="#linearGradient3935-6-16-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-9" />
<stop
id="stop3943-87-97-6"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-2" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3460-1"
style="overflow:visible">
<path
id="path3462-7"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.3934425,0,0,0.7671958,1116.3406,-345.50067)"
gradientUnits="userSpaceOnUse"
id="radialGradient6752-8"
xlink:href="#linearGradient3935-6-75-4-5-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4-5-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8-9-7" />
<stop
id="stop3943-87-71-9-4-4"
offset="0.76923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2-8-1" />
</linearGradient>
<linearGradient
id="linearGradient3935-6-7-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-17-9" />
<stop
id="stop3943-87-0-7"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-3-5" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3372"
style="overflow:visible">
<path
id="path3374"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.5520732,0,0,0.79594504,782.14798,-255.34966)"
gradientUnits="userSpaceOnUse"
id="radialGradient6711-3"
xlink:href="#linearGradient3935-6-75-4-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8-8" />
<stop
id="stop3943-87-71-9-3"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2-1" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3381"
style="overflow:visible">
<path
id="path3383"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,902.37339,-158.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-3-8"
xlink:href="#linearGradient3935-6-32-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-32-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-4-6" />
<stop
id="stop3943-87-78-4"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-5-3" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.73770485,0,0,0.56261023,1198.4226,-297.8322)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-7-3"
xlink:href="#linearGradient3935-6-1-4-3"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8" />
<stop
id="stop3943-87-3-8-6"
offset="0.5"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1028.3734,-383.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-2-4"
xlink:href="#linearGradient3935-6-1-88"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-88">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-89" />
<stop
id="stop3943-87-3-7"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-7" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,909.37339,-384.77513)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-96-6"
xlink:href="#linearGradient3935-6-54-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-54-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-77-3" />
<stop
id="stop3943-87-25-0"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-6-3" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3405"
style="overflow:visible">
<path
id="path3407"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3409"
style="overflow:visible">
<path
id="path3411"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3413"
style="overflow:visible">
<path
id="path3415"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3417"
style="overflow:visible">
<path
id="path3419"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3421"
style="overflow:visible">
<path
id="path3423"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3425"
style="overflow:visible">
<path
id="path3427"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3429"
style="overflow:visible">
<path
id="path3431"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3433"
style="overflow:visible">
<path
id="path3435"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3437"
style="overflow:visible">
<path
id="path3439"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3441"
style="overflow:visible">
<path
id="path3443"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3445"
style="overflow:visible">
<path
id="path3447"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5239"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.73770485,0,0,0.56261023,1198.4226,-297.8322)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-7-3-6"
xlink:href="#linearGradient3935-6-1-4-3-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8-4" />
<stop
id="stop3943-87-3-8-6-1"
offset="0.5"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.73770485,0,0,0.56261023,970.62378,-283.71062)"
gradientUnits="userSpaceOnUse"
id="radialGradient5251"
xlink:href="#linearGradient3935-6-1-4-3-9"
inkscape:collect="always" />
<inkscape:perspective
id="perspective5286"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.73770485,0,0,0.56261023,968.62378,-287.71062)"
gradientUnits="userSpaceOnUse"
id="radialGradient5251-4"
xlink:href="#linearGradient3935-6-1-4-3-9-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3-9-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8-4-1" />
<stop
id="stop3943-87-3-8-6-1-6"
offset="0.26923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0-4-5" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.44262292,0,0,0.56261023,1059.4106,-320.71064)"
gradientUnits="userSpaceOnUse"
id="radialGradient5296"
xlink:href="#linearGradient3935-6-1-4-3-9-8"
inkscape:collect="always" />
<inkscape:perspective
id="perspective5331"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5353"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5375"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5397"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5422"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5447"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5472"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5494"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5516"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5541"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-4"
style="overflow:visible">
<path
id="path3179-0-9"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5547"
style="overflow:visible">
<path
id="path5549"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.73770485,0,0,0.56261023,971.77122,-910.68219)"
gradientUnits="userSpaceOnUse"
id="radialGradient5251-44"
xlink:href="#linearGradient3935-6-1-4-3-9-81"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3-9-81">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8-4-3" />
<stop
id="stop3943-87-3-8-6-1-66"
offset="0.5"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0-4-7" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3445-7"
style="overflow:visible">
<path
id="path3447-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.44262292,0,0,0.56261023,1060.558,-947.68229)"
gradientUnits="userSpaceOnUse"
id="radialGradient5296-1"
xlink:href="#linearGradient3935-6-1-4-3-9-8-1"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3-9-8-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8-4-1-8" />
<stop
id="stop3943-87-3-8-6-1-6-3"
offset="0.26923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0-4-5-2" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,965.52083,-955.74679)"
gradientUnits="userSpaceOnUse"
id="radialGradient3317-2-3"
xlink:href="#linearGradient3935-6-1-8-9-6"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-8-9-6">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-8-3-3" />
<stop
id="stop3943-87-3-60-9-6"
offset="0.57692307"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-4-0-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,913.52084,-901.74669)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-4-5-5"
xlink:href="#linearGradient3935-6-3-0-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-3-0-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-7-9-1" />
<stop
id="stop3943-87-1-6-5"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-9-3-0" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1032.5208,-905.74669)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-9-8-6"
xlink:href="#linearGradient3935-6-4-5-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-4-5-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-1-6-3" />
<stop
id="stop3943-87-7-1-7"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-7-1-5" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,768.52083,-900.74669)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-5-5"
xlink:href="#linearGradient3935-6-9-9-3"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-9-9-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-3-8-9" />
<stop
id="stop3943-87-2-4-5"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-4-8-4" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-41"
style="overflow:visible">
<path
id="path3179-0-7-2"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.76719577,1093.5208,-807.47229)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-3-1"
xlink:href="#linearGradient3935-6-1-0-0-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-0-0-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-4-4-5" />
<stop
id="stop3943-87-3-6-4-2"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-6-4-2" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,1.0570253,1038.5208,-1013.6692)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-7-4-3"
xlink:href="#linearGradient3935-6-75-7-7"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-7-7">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-6-6" />
<stop
id="stop3943-87-71-3-8"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-1-4" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1030.5208,-786.74669)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-968-7-1"
xlink:href="#linearGradient3935-6-16-5-6"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-5-6">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-9-0" />
<stop
id="stop3943-87-97-6-6"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-2-1" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.73770485,0,0,0.56261023,1199.5701,-924.80379)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-7-3-1"
xlink:href="#linearGradient3935-6-1-4-3-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8-1" />
<stop
id="stop3943-87-3-8-6-0"
offset="0.5"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0-5" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker3460-7"
style="overflow:visible">
<path
id="path3462-70"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.3934425,0,0,1.1593181,1131.488,-1175.0035)"
gradientUnits="userSpaceOnUse"
id="radialGradient6752-8-2"
xlink:href="#linearGradient3935-6-75-4-5-5-1"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4-5-5-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8-9-7-1" />
<stop
id="stop3943-87-71-9-4-4-9"
offset="0.76923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2-8-1-7" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5612"
style="overflow:visible">
<path
id="path5614"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.5520732,0,0,0.98883014,785.29542,-977.94649)"
gradientUnits="userSpaceOnUse"
id="radialGradient6711-3-5"
xlink:href="#linearGradient3935-6-75-4-8-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4-8-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8-8-0" />
<stop
id="stop3943-87-71-9-3-8"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2-1-1" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5621"
style="overflow:visible">
<path
id="path5623"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,903.52084,-785.74669)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-3-8-7"
xlink:href="#linearGradient3935-6-32-9-2"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-32-9-2">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-4-6-5" />
<stop
id="stop3943-87-78-4-0"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-5-3-0" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,1029.5208,-1010.7467)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-2-4-1"
xlink:href="#linearGradient3935-6-1-88-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-88-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-89-6" />
<stop
id="stop3943-87-3-7-3"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-7-7" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,910.52084,-1011.7467)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-96-6-6"
xlink:href="#linearGradient3935-6-54-4-1"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-54-4-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-77-3-8" />
<stop
id="stop3943-87-25-0-7"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-6-3-7" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5640"
style="overflow:visible">
<path
id="path5642"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5644"
style="overflow:visible">
<path
id="path5646"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5648"
style="overflow:visible">
<path
id="path5650"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5652"
style="overflow:visible">
<path
id="path5654"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5656"
style="overflow:visible">
<path
id="path5658"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5660"
style="overflow:visible">
<path
id="path5662"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5664"
style="overflow:visible">
<path
id="path5666"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5668"
style="overflow:visible">
<path
id="path5670"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5672"
style="overflow:visible">
<path
id="path5674"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5676"
style="overflow:visible">
<path
id="path5678"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5680"
style="overflow:visible">
<path
id="path5682"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective3672"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3700"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3700-6"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5459"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.76719577,266.57456,-197.3791)"
gradientUnits="userSpaceOnUse"
id="radialGradient6793-2"
xlink:href="#linearGradient3935-6-1-0-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-0-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-4-1" />
<stop
id="stop3943-87-3-6-7"
offset="0.46153846"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-6-7" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.76719577,1154.5404,159.79455)"
gradientUnits="userSpaceOnUse"
id="radialGradient5472"
xlink:href="#linearGradient3935-6-1-0-8"
inkscape:collect="always" />
<inkscape:perspective
id="perspective5509"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,1.1593181,144.57456,-482.41027)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-7-5"
xlink:href="#linearGradient3935-6-75-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-1" />
<stop
id="stop3943-87-71-6"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-0" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,1.1593181,919.02362,-42.150864)"
gradientUnits="userSpaceOnUse"
id="radialGradient5523"
xlink:href="#linearGradient3935-6-75-0"
inkscape:collect="always" />
<inkscape:perspective
id="perspective3704"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3736"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.44262292,0,0,0.56261023,1059.4106,-320.71064)"
gradientUnits="userSpaceOnUse"
id="radialGradient5296-11"
xlink:href="#linearGradient3935-6-1-4-3-9-8-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-1-4-3-9-8-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-9-42-8-4-1-0" />
<stop
id="stop3943-87-3-8-6-1-6-7"
offset="0.26923078"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-67-9-0-4-5-0" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(0.44262292,0,0,0.56261023,1007.4106,-344.71066)"
gradientUnits="userSpaceOnUse"
id="radialGradient3746"
xlink:href="#linearGradient3935-6-1-4-3-9-8-0"
inkscape:collect="always" />
<inkscape:perspective
id="perspective5171"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5202"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.5520732,0,0,0.79594504,782.14798,-255.34966)"
gradientUnits="userSpaceOnUse"
id="radialGradient6711-3-9"
xlink:href="#linearGradient3935-6-75-4-8-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-75-4-8-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-5-8-8-1" />
<stop
id="stop3943-87-71-9-3-5"
offset="0.67307693"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-37-2-1-6" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.5520732,0,0,0.45496912,676.34918,-67.113946)"
gradientUnits="userSpaceOnUse"
id="radialGradient5212"
xlink:href="#linearGradient3935-6-75-4-8-8"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="529.72623"
inkscape:cy="735.71988"
inkscape:current-layer="layer1"
inkscape:document-units="px"
showgrid="false"
inkscape:window-width="2312"
inkscape:window-height="1124"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="0" />
<metadata
id="metadata7488">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(17.909055,678.12233)"
style="display:inline">
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="5.8828163"
y="-605.80103"
id="text7210"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212"
x="5.8828163"
y="-605.80103"
style="font-size:20px;fill:#336699;fill-opacity:1"
rotate="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0">Server State Transitions</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-9"
width="123"
height="48"
x="199.09094"
y="-426.62231"
ry="20"
rx="20"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="m 260.59094,-491.12231 0,64.5"
id="path3720"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:connection-end="#rect2862-9" />
<rect
style="fill:url(#radialGradient3941);fill-opacity:1;stroke:none"
id="rect3933"
width="69"
height="47"
x="226.09094"
y="-502.12231"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947"
y="-510.02612"
x="260.48157"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-510.02612"
x="260.48157"
id="tspan3949"
sodipodi:role="line">PENDING</tspan></text>
<text
id="text3953"
y="-397.52612"
x="260.48157"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-397.52612"
x="260.48157"
id="tspan3955"
sodipodi:role="line">RECALLING</tspan></text>
<path
inkscape:connector-type="polyline"
id="path3957"
d="m 260.59094,-491.12231 0,64.5"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
inkscape:connection-start="#rect2862"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:connection-end="#rect2862-9" />
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862"
width="123"
height="48"
x="199.09094"
y="-539.12231"
ry="20"
rx="20"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-478.62231"
x="226.09094"
height="23"
width="69"
id="rect3959"
style="fill:url(#radialGradient6316);fill-opacity:1;stroke:none"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961"
y="-462.57007"
x="260.40051"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#ae0000;fill-opacity:1"
y="-462.57007"
x="260.40051"
id="tspan3963"
sodipodi:role="line">CancelRequest</tspan></text>
<rect
rx="20"
ry="20"
y="-539.12231"
x="406.34094"
height="48"
width="123"
id="rect3945-1"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-1"
y="-510.02612"
x="468.24084"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-510.02612"
x="468.24084"
id="tspan3949-0"
sodipodi:role="line">ACTIVE</tspan></text>
<rect
rx="20"
ry="20"
y="-426.62231"
x="405.34094"
height="48"
width="123"
id="rect3951-9"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3953-5"
y="-397.52612"
x="466.73157"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-397.52612"
x="466.73157"
id="tspan3955-6"
sodipodi:role="line">PREEMPTING</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-mid:none;marker-end:url(#Arrow1Lend-8)"
d="m 467.62761,-491.12231 -0.57333,64.5"
id="path4867"
inkscape:connector-type="polyline"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:connection-end="#rect3951-9"
inkscape:connection-start="#rect3945-1" />
<rect
y="-478.62231"
x="432.34094"
height="23"
width="69"
id="rect3959-8"
style="fill:url(#radialGradient3059);fill-opacity:1;stroke:none"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-2"
y="-462.57007"
x="466.65051"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#ae0000;fill-opacity:1"
y="-462.57007"
x="466.65051"
id="tspan3963-5"
sodipodi:role="line">CancelRequest</tspan></text>
<text
id="text3961-0"
y="-523.64868"
x="324.72961"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#336699;fill-opacity:1"
y="-523.64868"
x="324.72961"
id="tspan3963-7"
sodipodi:role="line">setAccepted</tspan></text>
<text
id="text3961-0-0"
y="-388.32251"
x="324.72961"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#336699;fill-opacity:1"
y="-388.32251"
x="324.72961"
id="tspan3963-7-1"
sodipodi:role="line">setAccepted</tspan></text>
<text
id="text3961-0-0-9"
y="-522.4856"
x="575.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-522.4856"
x="575.31067"
id="tspan3963-7-1-0"
sodipodi:role="line">setSucceeded</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-507.4856"
x="575.31067"
sodipodi:role="line"
id="tspan6359" /><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-492.4856"
x="575.31067"
sodipodi:role="line"
id="tspan5828" /></text>
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-9-9"
width="123"
height="48"
x="12.590946"
y="-482.87231"
ry="20"
rx="20"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="73.032837"
y="-454.57013"
id="text2461-0-5"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2463-6-9"
x="73.032837"
y="-454.57013"
style="font-size:14px;text-align:center;text-anchor:middle">REJECTED</tspan></text>
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-9-9-0"
width="123"
height="48"
x="198.59094"
y="-314.12231"
ry="20"
rx="20"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="259.81409"
y="-285.02612"
id="text2461-0-5-9"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan2463-6-9-2"
x="259.81409"
y="-285.02612"
style="font-size:14px;text-align:center;text-anchor:middle">RECALLED</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0-0)"
d="m 260.48428,-378.62231 -0.28667,64.5"
id="path6244"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-9"
inkscape:connection-end="#rect2862-9-9-0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-366.48795"
x="225.59094"
height="23"
width="69"
id="rect3959-1"
style="fill:url(#radialGradient6518);fill-opacity:1;stroke:none"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1"
y="-350.64868"
x="260.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-350.64868"
x="260.31067"
sodipodi:role="line"
id="tspan5828-6">setCanceled</tspan></text>
<text
id="text3961-0-0-9-1-1"
y="-496.64868"
x="154.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-496.64868"
x="154.31067"
sodipodi:role="line"
id="tspan5828-6-0">setRejected</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4321"
width="130"
height="98.597984"
x="607.59094"
y="-355.12231"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 616.59094,-331.58644 112.00001,0"
id="path4072"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1"
y="-337.11279"
x="618.58704"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-337.11279"
x="618.58704"
id="tspan3963-3"
sodipodi:role="line">Client Triggered</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 616.59094,-306.51467 112.00001,0"
id="path4072-0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-0"
y="-312.04102"
x="618.46985"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#336699;fill-opacity:1"
y="-312.04102"
x="618.46985"
id="tspan3963-3-6"
sodipodi:role="line">Server Triggered</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 261.09094,-565.12233 0,26"
id="path4337"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9"
y="-570.64868"
x="221.49133"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-570.64868"
x="221.49133"
id="tspan3963-9"
sodipodi:role="line">Receive Goal</tspan></text>
<rect
rx="20"
ry="20"
y="-539.12231"
x="623.59094"
height="48"
width="123"
id="rect3945-1-0"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
rx="20"
ry="20"
y="-426.62231"
x="626.59094"
height="48"
width="123"
id="rect3945-1-7"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
rx="20"
ry="20"
y="-314.12231"
x="405.59094"
height="48"
width="123"
id="rect3945-1-06"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 466.89428,-378.62231 0.14333,64.5"
id="path3839"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect3945-1-06"
inkscape:connection-start="#rect3951-9"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="M 512.54814,-426.18272 639.38375,-491.5619"
id="path4933"
inkscape:connector-type="polyline"
sodipodi:nodetypes="cc"
inkscape:connection-start="#rect3951-9"
inkscape:connection-end="#rect3945-1-0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 513.84076,-491.62638 128.25037,65.50813"
id="path4935"
inkscape:connector-type="polyline"
sodipodi:nodetypes="cc"
inkscape:connection-start="#rect3945-1"
inkscape:connection-end="#rect3945-1-7"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 528.34094,-402.62231 98.25,0"
id="path4931"
inkscape:connector-type="polyline"
sodipodi:nodetypes="cc"
inkscape:connection-start="#rect3951-9"
inkscape:connection-end="#rect3945-1-7"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 529.34094,-515.12231 94.25,0"
id="path4937"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect3945-1"
inkscape:connection-end="#rect3945-1-0"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-365.31638"
x="433.37329"
height="23"
width="69"
id="rect3959-1-1"
style="fill:url(#radialGradient6559);fill-opacity:1;stroke:none"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-0"
y="-350.64868"
x="467.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-350.64868"
x="467.31067"
id="tspan3963-7-1-0-6"
sodipodi:role="line">setCancelled</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-335.64868"
x="467.31067"
sodipodi:role="line"
id="tspan6359-4" /><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-320.64868"
x="467.31067"
sodipodi:role="line"
id="tspan5828-4" /></text>
<rect
y="-455.11893"
x="515.64032"
height="23"
width="69"
id="rect3959-1-1-1"
style="fill:url(#radialGradient6641);fill-opacity:1;stroke:none"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-4"
y="-440.64871"
x="559.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-440.64871"
x="559.31067"
id="tspan3963-7-1-0-5"
sodipodi:role="line">setSucceeded</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-425.64871"
x="559.31067"
sodipodi:role="line"
id="tspan6359-8" /><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-410.64871"
x="559.31067"
sodipodi:role="line"
id="tspan5828-5" /></text>
<text
id="text3961-0-0-9-4-9"
y="-387.15942"
x="573.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-387.15942"
x="573.31067"
id="tspan3963-7-1-0-5-6"
sodipodi:role="line">setAborted</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-372.15942"
x="573.31067"
sodipodi:role="line"
id="tspan6359-8-1" /><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-357.15942"
x="573.31067"
sodipodi:role="line"
id="tspan5828-5-8" /></text>
<rect
y="-490.35297"
x="516.69061"
height="23"
width="69"
id="rect3959-1-1-1-6"
style="fill:url(#radialGradient6682);fill-opacity:1;stroke:none"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-4-9-5"
y="-473.64868"
x="559.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-473.64868"
x="559.31067"
sodipodi:role="line"
id="tspan5828-5-8-6">setAborted</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 322.09094,-515.12231 84.25,0"
id="path5720"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862"
inkscape:connection-end="#rect3945-1"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3953-5-2"
y="-285.01929"
x="466.81409"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-285.01929"
x="466.81409"
id="tspan3955-6-1"
sodipodi:role="line">PREEMPTED</tspan></text>
<text
id="text3953-5-2-6"
y="-510.02612"
x="685.03967"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-510.02612"
x="685.03967"
id="tspan3955-6-1-4"
sodipodi:role="line">SUCCEEDED</tspan></text>
<text
id="text3953-5-2-6-3"
y="-397.52612"
x="688.44641"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-397.52612"
x="688.44641"
id="tspan3955-6-1-4-7"
sodipodi:role="line">ABORTED</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 322.09094,-402.62231 83.25,0"
id="path6013"
inkscape:connector-type="polyline"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:connection-end="#rect3951-9"
inkscape:connection-start="#rect2862-9" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 203.94203,-419.70811 -73.20217,-22.07841"
id="path6233"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-9"
inkscape:connection-end="#rect2862-9-9"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 203.94203,-498.03652 -73.20217,22.07841"
id="path6235"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862"
inkscape:connection-end="#rect2862-9-9"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-9-9-0-6"
width="98.958374"
height="23.95837"
x="619.56421"
y="-292.92194"
ry="9.9826536"
rx="11.721677"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-7"
y="-278.33929"
x="633.19794"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="-278.33929"
x="633.19794"
id="tspan3963-3-9"
sodipodi:role="line">Terminal State</tspan></text>
<text
id="text3961-0-0-9-1-1-5"
y="-412.51886"
x="154.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/u/eitan/wiki/actions/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-412.51886"
x="154.31067"
sodipodi:role="line"
id="tspan5828-6-0-4">setRejected</tspan></text>
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="2.8702393"
y="-181.68385"
id="text7210-9"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6"
x="2.8702393"
y="-181.68385"
style="font-size:20px;fill:#336699;fill-opacity:1">Client State Transitions</tspan></text>
<text
id="text3947-3"
y="-92.026138"
x="78.063599"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-92.026138"
x="78.063599"
id="tspan3949-09"
sodipodi:role="line">WAITING FOR</tspan><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-74.526138"
x="78.063599"
sodipodi:role="line"
id="tspan3140">GOAL ACK</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2"
width="123"
height="48"
x="16.590942"
y="-112.37233"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-2"
y="29.848862"
x="202.98157"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="29.848862"
x="202.98157"
sodipodi:role="line"
id="tspan3140-2">PENDING</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-0"
width="123"
height="48"
x="141.59094"
y="0.75267029"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-0"
y="29.848862"
x="435.49084"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="29.848862"
x="435.49084"
sodipodi:role="line"
id="tspan3140-3">ACTIVE</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-8"
width="123"
height="48"
x="373.59094"
y="0.75267029"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-2-0"
y="142.97386"
x="318.98157"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="142.97386"
x="318.98157"
sodipodi:role="line"
id="tspan3140-2-1">PREEMPTING</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-0-7"
width="123"
height="48"
x="257.59094"
y="113.87767"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-1"
y="134.22386"
x="78.063599"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="134.22386"
x="78.063599"
id="tspan3949-09-9"
sodipodi:role="line">WAITING FOR</tspan><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="151.72386"
x="78.063599"
sodipodi:role="line"
id="tspan3140-0">CANCEL ACK</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-5"
width="123"
height="48"
x="16.590942"
y="113.87767"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-2-0-2"
y="263.97388"
x="318.98157"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="263.97388"
x="318.98157"
sodipodi:role="line"
id="tspan3140-2-1-2">RECALLING</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-0-7-0"
width="123"
height="48"
x="257.59094"
y="234.87767"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-0-4"
y="255.22386"
x="556.0636"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="255.22386"
x="556.0636"
sodipodi:role="line"
id="tspan3140-3-9">WAITING FOR</tspan><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="272.72388"
x="556.0636"
sodipodi:role="line"
id="tspan3307">RESULT</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-8-1"
width="123"
height="48"
x="494.59094"
y="234.87767"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="M 104.61028,-64.37233 176.57161,0.75267029"
id="path3309"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2"
inkscape:connection-end="#rect2862-2-0"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="M 134.132,-70.614221 379.04988,6.9945611"
id="path3313"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8"
inkscape:connection-start="#rect2862-2"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 264.59094,24.75267 109,0"
id="path3315"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0"
inkscape:connection-end="#rect2862-2-8"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 176.57161,48.75267 -71.96133,65.125"
id="path3317"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-5"
inkscape:connection-start="#rect2862-2-0"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 139.59094,137.87767 118,0"
id="path3319"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-5"
inkscape:connection-end="#rect2862-2-0-7"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 124.6285,161.243 147.92489,74.26934"
id="path3321"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-0-7-0"
inkscape:connection-start="#rect2862-2-5"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 380.59094,258.87767 114,0"
id="path3323"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8-1"
inkscape:connection-start="#rect2862-2-0-7-0"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 365.10536,161.37026 144.97116,74.01482"
id="path3325"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-7"
inkscape:connection-end="#rect2862-2-8-1"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 447.49457,48.75267 96.19274,186.125"
id="path3327"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8-1"
inkscape:connection-start="#rect2862-2-8"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="M 379.04988,42.510779 134.132,120.11956"
id="path3329"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-8"
inkscape:connection-end="#rect2862-2-5"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-8-1-3"
width="123"
height="48"
x="592.59094"
y="114.12769"
ry="20"
rx="20"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-0-4-2"
y="143.22388"
x="653.85852"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="143.22388"
x="653.85852"
sodipodi:role="line"
id="tspan3307-0">DONE</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 575.56921,234.87767 59.04347,-72.74998"
id="path3364"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8-1-3"
inkscape:connection-start="#rect2862-2-8-1"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5"
y="-146.6487"
x="47.563599"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-146.6487"
x="47.563599"
id="tspan3963-9-0"
sodipodi:role="line">Send Goal</tspan></text>
<rect
y="-48.62233"
x="100.59094"
height="23"
width="69"
id="rect3959-8-7"
style="fill:url(#radialGradient6502-96);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8"
y="-33.811783"
x="137.31067"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-33.811783"
x="137.31067"
sodipodi:role="line"
id="tspan3432">[PENDING]</tspan></text>
<rect
y="-50.62233"
x="201.59094"
height="23"
width="69"
id="rect3959-8-44"
style="fill:url(#radialGradient6502-2);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-9"
y="-36.854752"
x="240.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-36.854752"
x="240.09387"
sodipodi:role="line"
id="tspan3432-1">[ACTIVE]</tspan></text>
<rect
y="125.37767"
x="148.59094"
height="23"
width="95"
id="rect3959-8-44-2"
style="fill:url(#radialGradient6793-7);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8"
y="141.64525"
x="195.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="141.64525"
x="195.09387"
sodipodi:role="line"
id="tspan3432-5">[PREEMPTING]</tspan></text>
<rect
y="184.37767"
x="156.59094"
height="23"
width="69"
id="rect3959-8-09"
style="fill:url(#radialGradient6502-3);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-3"
y="200.14525"
x="194.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="200.14525"
x="194.09387"
sodipodi:role="line"
id="tspan3432-5-4">[RECALLING]</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 78.090942,-64.37233 0,178.25"
id="path3568"
inkscape:connector-type="polyline"
sodipodi:nodetypes="cc"
inkscape:connection-end="#rect2862-2-5"
inkscape:connection-start="#rect2862-2"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="155.87767"
x="369.59094"
height="68"
width="111"
id="rect3959-8-8-2"
style="fill:url(#radialGradient6711);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-2"
y="177.14525"
x="428.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="177.14525"
x="428.09387"
sodipodi:role="line"
id="tspan3432-6">[PREEMPTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="192.14525"
x="428.09387"
sodipodi:role="line"
id="tspan6212">[ABORTED[</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="207.14525"
x="428.09387"
sodipodi:role="line"
id="tspan6214">[SUCCEEDED]</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 319.09094,234.87767 0,-73"
id="path3638"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-7-0"
inkscape:connection-end="#rect2862-2-0-7"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="188.37767"
x="284.59094"
height="23"
width="69"
id="rect3959-8-6"
style="fill:url(#radialGradient6502-98);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9"
y="204.14525"
x="319.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="204.14525"
x="319.09387"
sodipodi:role="line"
id="tspan3432-5-3">[PREEMPTING]</tspan></text>
<rect
y="224.87767"
x="391.59094"
height="68"
width="85"
id="rect3959-8-8-2-4"
style="fill:url(#radialGradient6752);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-0"
y="247.14525"
x="432.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="247.14525"
x="432.09387"
sodipodi:role="line"
id="tspan3432-5-3-9">[PREEMPTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="262.14526"
x="432.09387"
sodipodi:role="line"
id="tspan3708">[RECALLED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="277.14526"
x="432.09387"
sodipodi:role="line"
id="tspan3710">[REJECTED]</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 410.481,48.75267 -66.78011,65.125"
id="path3728"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-8"
inkscape:connection-end="#rect2862-2-0-7"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="71.37767"
x="344.59094"
height="23"
width="69"
id="rect3959-8-5"
style="fill:url(#radialGradient6502-968);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-6"
y="85.645248"
x="382.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="85.645248"
x="382.09387"
sodipodi:role="line"
id="tspan3432-5-42">[PREEMPTING]</tspan></text>
<rect
y="82.37767"
x="446.59094"
height="68"
width="69"
id="rect3959-8-8"
style="fill:url(#radialGradient6502-7);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-0-4"
y="107.23509"
x="486.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="107.23509"
x="486.09387"
sodipodi:role="line"
id="tspan3432-5-3-9-2">[PREEMPTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="122.23509"
x="486.09387"
sodipodi:role="line"
id="tspan3708-4">[ABORTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="137.23509"
x="486.09387"
sodipodi:role="line"
id="tspan3710-5">[SUCCEEDED]</tspan></text>
<rect
y="176.37767"
x="568.59094"
height="45"
width="69"
id="rect3959-8-44-3"
style="fill:url(#radialGradient6793);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-0-3"
y="194.23509"
x="605.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="194.23509"
x="605.09387"
sodipodi:role="line"
id="tspan3710-0">Receive</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="209.23509"
x="605.09387"
sodipodi:role="line"
id="tspan3822">Result Msg</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 78.090942,-139.12233 0,26"
id="path4337-0"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-0.62232971"
x="47.590942"
height="23"
width="69"
id="rect3959-8-9"
style="fill:url(#radialGradient6502);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9"
y="15.351303"
x="42.39563"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="15.351303"
x="42.39563"
id="tspan3963-9-0-9"
sodipodi:role="line">Cancel Goal</tspan></text>
<rect
y="64.37767"
x="110.59094"
height="23"
width="69"
id="rect3959-8-4"
style="fill:url(#radialGradient6502-9);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9-6"
y="80.351303"
x="110.39563"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="80.351303"
x="110.39563"
id="tspan3963-9-0-9-0"
sodipodi:role="line">Cancel Goal</tspan></text>
<rect
y="68.37767"
x="233.59094"
height="23"
width="69"
id="rect3959-8-0"
style="fill:url(#radialGradient6502-4);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9-6-6"
y="82.351303"
x="228.39563"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="82.351303"
x="228.39563"
id="tspan3963-9-0-9-0-8"
sodipodi:role="line">Cancel Goal</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4321-2"
width="130"
height="98.597984"
x="585.09094"
y="-33.421326"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 594.09094,-9.88547 112.00002,0"
id="path4072-2"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-2"
y="-15.411804"
x="596.08704"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-15.411804"
x="596.08704"
id="tspan3963-3-63"
sodipodi:role="line">Client Triggered</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 594.09094,15.1863 112.00002,0"
id="path4072-0-7"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-0-7"
y="9.6599731"
x="595.96985"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#336699;fill-opacity:1"
y="9.6599731"
x="595.96985"
id="tspan3963-3-6-8"
sodipodi:role="line">Server Triggered</tspan></text>
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-9-9-0-6-5"
width="98.958374"
height="23.95837"
x="597.06421"
y="28.779053"
ry="9.9826536"
rx="11.721677"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-7-3"
y="43.361694"
x="610.69794"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="43.361694"
x="610.69794"
id="tspan3963-3-9-9"
sodipodi:role="line">Terminal State</tspan></text>
<rect
y="14.37767"
x="279.59094"
height="23"
width="69"
id="rect3959-8-44-6"
style="fill:url(#radialGradient3317);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-9-7"
y="28.145248"
x="314.09387"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="28.145248"
x="314.09387"
sodipodi:role="line"
id="tspan3432-1-6">[ACTIVE]</tspan></text>
<text
id="text3947-3-25"
y="-242.14771"
x="1305.8624"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-242.14771"
x="1305.8624"
id="tspan3949-09-4"
sodipodi:role="line">WAITING FOR</tspan><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-224.64771"
x="1305.8624"
sodipodi:role="line"
id="tspan3140-05">GOAL ACK</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-9"
width="123"
height="48"
x="1244.3898"
y="-262.4939"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-2-4"
y="-120.08524"
x="1189.7804"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-120.08524"
x="1189.7804"
sodipodi:role="line"
id="tspan3140-2-6">PENDING</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-0-9"
width="123"
height="48"
x="1128.3898"
y="-149.18143"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-0-2"
y="-120.08524"
x="1422.2897"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-120.08524"
x="1422.2897"
sodipodi:role="line"
id="tspan3140-3-2">ACTIVE</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-8-4"
width="123"
height="48"
x="1360.3898"
y="-149.18143"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-2-0-7"
y="106.53979"
x="1421.7804"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="106.53979"
x="1421.7804"
sodipodi:role="line"
id="tspan3140-2-1-7">PREEMPTING</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-0-7-5"
width="123"
height="48"
x="1360.3898"
y="77.443604"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-1-4"
y="-15.522736"
x="1305.8624"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="-15.522736"
x="1305.8624"
id="tspan3949-09-9-8"
sodipodi:role="line">WAITING FOR</tspan><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="1.9772644"
x="1305.8624"
sodipodi:role="line"
id="tspan3140-0-1">CANCEL ACK</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-5-2"
width="123"
height="48"
x="1244.3898"
y="-35.868927"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-2-0-2-8"
y="106.53979"
x="1189.7804"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="106.53979"
x="1189.7804"
sodipodi:role="line"
id="tspan3140-2-1-2-9">RECALLING</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-0-7-0-3"
width="123"
height="48"
x="1128.3898"
y="77.443604"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-0-4-6"
y="211.10229"
x="1305.8624"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="211.10229"
x="1305.8624"
sodipodi:role="line"
id="tspan3140-3-9-8">WAITING FOR</tspan><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="228.60229"
x="1305.8624"
sodipodi:role="line"
id="tspan3307-02">RESULT</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-8-1-1"
width="123"
height="48"
x="1244.3898"
y="190.7561"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1281.3205,-214.4939 -66.8615,65.31247"
id="path3309-0"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-9"
inkscape:connection-end="#rect2862-2-0-9"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1330.459,-214.4939 66.8615,65.31247"
id="path3313-5"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8-4"
inkscape:connection-start="#rect2862-2-9"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1251.3898,-125.18143 109,0"
id="path3315-1"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-9"
inkscape:connection-end="#rect2862-2-8-4"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1214.459,-101.18143 66.8615,65.312503"
id="path3317-1"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-5-2"
inkscape:connection-start="#rect2862-2-0-9"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1330.459,12.131073 66.8616,65.312531"
id="path3319-0"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-5-2"
inkscape:connection-end="#rect2862-2-0-7-5"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="M 1281.3206,12.131073 1214.459,77.443604"
id="path3321-8"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-0-7-0-3"
inkscape:connection-start="#rect2862-2-5-2"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1214.459,125.4436 66.8615,65.3125"
id="path3323-5"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8-1-1"
inkscape:connection-start="#rect2862-2-0-7-0-3"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1397.3205,125.4436 -66.8615,65.3125"
id="path3325-0"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-7-5"
inkscape:connection-end="#rect2862-2-8-1-1"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1448.7,-99.18143 c 158.0592,198.71355 75.7596,244.87229 -83.6205,301.93753"
id="path3327-6"
inkscape:connector-type="polyline"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:connection-end="#rect2862-2-8-1-1"
inkscape:connection-start="#rect2862-2-8-4"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1397.3205,-101.18143 -66.8615,65.312503"
id="path3329-4"
inkscape:connector-type="polyline"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:connection-end="#rect2862-2-5-2"
inkscape:connection-start="#rect2862-2-8-4" />
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-8-1-3-6"
width="123"
height="48"
x="1243.3251"
y="298.84293"
ry="20"
rx="20"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3947-3-0-4-2-2"
y="326.18909"
x="1304.5927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:14px;text-align:center;text-anchor:middle"
y="326.18909"
x="1304.5927"
sodipodi:role="line"
id="tspan3307-0-5">DONE</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1305.6534,238.7561 -0.5919,60.08683"
id="path3364-8"
inkscape:connector-type="polyline"
inkscape:connection-end="#rect2862-2-8-1-3-6"
inkscape:connection-start="#rect2862-2-8-1-1"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-6"
y="-296.77026"
x="1273.3624"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-296.77026"
x="1273.3624"
id="tspan3963-9-0-2"
sodipodi:role="line">Send Goal</tspan></text>
<rect
y="-193.7439"
x="1211.3898"
height="23"
width="69"
id="rect3959-8-7-8"
style="fill:url(#radialGradient6502-96-6);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-4"
y="-178.93335"
x="1248.1095"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-178.93335"
x="1248.1095"
sodipodi:role="line"
id="tspan3432-7">[PENDING]</tspan></text>
<rect
y="-192.7439"
x="1330.3898"
height="23"
width="69"
id="rect3959-8-44-24"
style="fill:url(#radialGradient6502-2-4);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-9-0"
y="-178.97632"
x="1368.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-178.97632"
x="1368.8927"
sodipodi:role="line"
id="tspan3432-1-62">[ACTIVE]</tspan></text>
<rect
y="32.256073"
x="1204.3898"
height="23"
width="69"
id="rect3959-8-09-1"
style="fill:url(#radialGradient6502-3-8);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-3-3"
y="48.023651"
x="1241.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="48.023651"
x="1241.8927"
sodipodi:role="line"
id="tspan3432-5-4-1">[RECALLING]</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1242.8898,-237.4939 c -197.6203,11.74161 -232.4249,172.53812 0,226.624973"
id="path3568-1"
inkscape:connector-type="polyline"
sodipodi:nodetypes="cc"
inkscape:connection-end="#rect2862-2-5-2"
inkscape:connection-start="#rect2862-2-9"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="132.41293"
x="1196.5515"
height="46.686291"
width="94.676468"
id="rect3959-8-8-2-0"
style="fill:url(#radialGradient6711-3);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-2-3"
y="139.02365"
x="1246.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="139.02365"
x="1246.8927"
sodipodi:role="line"
id="tspan3432-6-4" /><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="154.02365"
x="1246.8927"
sodipodi:role="line"
id="tspan6212-0">[RECALLED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="169.02365"
x="1246.8927"
sodipodi:role="line"
id="tspan6214-3">[REJECTED]</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1251.3898,101.4436 109,0"
id="path3638-9"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-7-0-3"
inkscape:connection-end="#rect2862-2-0-7-5"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-9"
y="97.023651"
x="1300.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="97.023651"
x="1300.8927"
sodipodi:role="line"
id="tspan3432-5-3-6">[PREEMPTING]</tspan></text>
<rect
y="28.256073"
x="1488.3898"
height="45"
width="85"
id="rect3959-8-8-2-4-9"
style="fill:url(#radialGradient6752-8);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-0-33"
y="47.023682"
x="1530.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="47.023682"
x="1530.8927"
sodipodi:role="line"
id="tspan3432-5-3-9-8">[ABORTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="62.023682"
x="1530.8927"
sodipodi:role="line"
id="tspan3710-56">[SUCCEEDED]</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3460)"
d="m 1421.8898,-101.18143 0,178.625034"
id="path3728-6"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-8-4"
inkscape:connection-end="#rect2862-2-0-7-5"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-23.743927"
x="1395.3898"
height="33"
width="45"
id="rect3959-8-44-2-9"
style="fill:url(#radialGradient6793-7-3);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-90"
y="-3.4763489"
x="1427.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-3.4763489"
x="1427.8927"
sodipodi:role="line"
id="tspan3432-5-8">[PREEMPTING]</tspan></text>
<rect
y="31.256073"
x="1331.3898"
height="23"
width="69"
id="rect3959-8-5-4"
style="fill:url(#radialGradient6502-968-7);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-6-0"
y="45.523651"
x="1368.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="45.523651"
x="1368.8927"
sodipodi:role="line"
id="tspan3432-5-42-0">[PREEMPTING]</tspan></text>
<rect
y="128.25607"
x="1339.3898"
height="62"
width="69"
id="rect3959-8-8-4"
style="fill:url(#radialGradient6502-7-4);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-0-4-6"
y="146.11349"
x="1370.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="146.11349"
x="1370.8927"
sodipodi:role="line"
id="tspan3432-5-3-9-2-2">[PREEMPTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="161.11349"
x="1370.8927"
sodipodi:role="line"
id="tspan3708-4-6">[ABORTED]</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="176.11349"
x="1370.8927"
sodipodi:role="line"
id="tspan3710-5-7">[SUCCEEDED]</tspan></text>
<rect
y="243.25607"
x="1272.3898"
height="45"
width="69"
id="rect3959-8-44-3-5"
style="fill:url(#radialGradient6793-3);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-9-0-3-6"
y="261.11349"
x="1308.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="261.11349"
x="1308.8927"
sodipodi:role="line"
id="tspan3710-0-9">Receive</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="276.11349"
x="1308.8927"
sodipodi:role="line"
id="tspan3822-8">Result Msg</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 1303.8898,-289.24391 0,26"
id="path4337-0-7"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-181.74393"
x="1063.3898"
height="23"
width="69"
id="rect3959-8-9-2"
style="fill:url(#radialGradient6502-5);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9-8"
y="-167.77029"
x="1056.1945"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-167.77029"
x="1056.1945"
id="tspan3963-9-0-9-2"
sodipodi:role="line">Cancel Goal</tspan></text>
<rect
y="-87.743927"
x="1333.3898"
height="23"
width="69"
id="rect3959-8-4-9"
style="fill:url(#radialGradient6502-9-8);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9-6-9"
y="-71.770294"
x="1333.1945"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-71.770294"
x="1333.1945"
id="tspan3963-9-0-9-0-6"
sodipodi:role="line">Cancel Goal</tspan></text>
<rect
y="-83.743927"
x="1214.3898"
height="23"
width="69"
id="rect3959-8-0-0"
style="fill:url(#radialGradient6502-4-5);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9-6-6-2"
y="-69.770294"
x="1215.1945"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-69.770294"
x="1215.1945"
id="tspan3963-9-0-9-0-8-7"
sodipodi:role="line">Cancel Goal</tspan></text>
<rect
y="-137.74393"
x="1266.3898"
height="23"
width="69"
id="rect3959-8-44-6-9"
style="fill:url(#radialGradient3317-2);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-9-7-1"
y="-123.97635"
x="1300.8927"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="-123.97635"
x="1300.8927"
sodipodi:role="line"
id="tspan3432-1-6-0">[ACTIVE]</tspan></text>
<rect
y="-46.62233"
x="1177.5909"
height="33"
width="27"
id="rect3959-8-44-2-9-5-0"
style="fill:url(#radialGradient5296);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker3445)"
d="m 1207.7988,576.9409 0,178.62503"
id="path4973"
transform="translate(-17.909055,-678.12233)"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-9"
inkscape:connection-end="#rect2862-2-0-7-0-3"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="-9.6223297"
x="1167.5909"
height="33"
width="45"
id="rect3959-8-44-2-9-5"
style="fill:url(#radialGradient5251);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-8-90-6"
y="12.645248"
x="1188.0939"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="12.645248"
x="1188.0939"
sodipodi:role="line"
id="tspan3432-5-8-7">[RECALLING]</tspan></text>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4321-2-6"
width="130"
height="98.597984"
x="1458.8898"
y="-307.54291"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 1467.8898,-284.00705 112,0"
id="path4072-2-1"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-2-3"
y="-289.53339"
x="1469.8859"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="-289.53339"
x="1469.8859"
id="tspan3963-3-63-2"
sodipodi:role="line">Client Triggered</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 1467.8898,-258.93528 112,0"
id="path4072-0-7-1"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-0-7-5"
y="-264.46161"
x="1469.7687"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#336699;fill-opacity:1"
y="-264.46161"
x="1469.7687"
id="tspan3963-3-6-8-9"
sodipodi:role="line">Server Triggered</tspan></text>
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-9-9-0-6-5-9"
width="98.958374"
height="23.95837"
x="1470.863"
y="-245.34253"
ry="9.9826536"
rx="11.721677"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-7-3-1"
y="-230.75989"
x="1484.4968"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="-230.75989"
x="1484.4968"
id="tspan3963-3-9-9-4"
sodipodi:role="line">Terminal State</tspan></text>
<rect
y="-70.62233"
x="1125.5909"
height="33"
width="27"
id="rect3959-8-44-2-9-5-0-8"
style="fill:url(#radialGradient3746);fill-opacity:1;stroke:none;display:inline"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5680)"
d="m 1187.9557,576.9409 c -73.3534,117.02294 -146.3685,263.90026 72.6215,317.02436"
id="path3726"
transform="translate(-17.909055,-678.12233)"
inkscape:connector-type="polyline"
inkscape:connection-start="#rect2862-2-0-9"
inkscape:connection-end="#rect2862-2-8-1-3-6"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
y="154.53453"
x="1090.7527"
height="26.686291"
width="94.676468"
id="rect3959-8-8-2-0-4"
style="fill:url(#radialGradient5212);fill-opacity:1;stroke:none;display:inline"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-2-3-9"
y="155.73509"
x="1136.0939"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="155.73509"
x="1136.0939"
sodipodi:role="line"
id="tspan3432-6-4-7" /><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="170.73509"
x="1136.0939"
sodipodi:role="line"
id="tspan6214-3-7">[REJECTED]</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Overlay"
style="display:none">
<rect
transform="translate(17.909055,678.12233)"
style="fill:#578fc2;fill-opacity:0.51739131;stroke:none;display:inline"
id="rect5321"
width="547"
height="105.27208"
x="1053.8549"
y="261.21451"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#d2d046;fill-opacity:0.51739131;stroke:none;display:inline"
id="rect5321-8"
width="253"
height="579"
x="-1307.3409"
y="-317.87231"
transform="matrix(-1,0,0,1,17.909055,678.12233)"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#4aaf36;fill-opacity:0.51739131;stroke:none;display:inline"
id="rect5321-8-3"
width="294.22034"
height="460.15399"
x="-1601.4363"
y="-198.87233"
transform="matrix(-1,0,0,1,17.909055,678.12233)"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#d2d046;fill-opacity:0.51739131;stroke:none;display:inline"
id="rect5321-8-5"
width="294"
height="119"
x="-1601.3864"
y="-317.62231"
transform="matrix(-1,0,0,1,17.909055,678.12233)"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
transform="translate(17.909055,678.12233)"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="1071.5929"
y="-286.66629"
id="text7210-9-0-2"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6-9-8"
x="1071.5929"
y="-286.66629"
style="font-size:20px;font-weight:bold;fill:#336699;fill-opacity:1">PENDING</tspan></text>
<text
transform="translate(17.909055,678.12233)"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="1518.5194"
y="290.24478"
id="text7210-9-0-2-7-0"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6-9-8-6-6"
x="1518.5194"
y="290.24478"
style="font-size:20px;font-weight:bold;fill:#336699;fill-opacity:1">DONE</tspan></text>
<text
transform="translate(17.909055,678.12233)"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="1504.7531"
y="-168.84207"
id="text7210-9-0-2-7"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6-9-8-6"
x="1504.7531"
y="-168.84207"
style="font-size:20px;font-weight:bold;fill:#336699;fill-opacity:1">ACTIVE</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Simple Title"
style="display:none">
<text
transform="translate(17.909055,678.12233)"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="1028.6692"
y="-331.80542"
id="text7210-9-0"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/simple_client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6-9"
x="1028.6692"
y="-331.80542"
style="font-size:20px;fill:#336699;fill-opacity:1">Simple Client State Transitions</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Title"
style="display:inline">
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
x="1046.5782"
y="346.31693"
id="text7210-9-0-8"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/home/vpradeep/work/wg/home/ros_overlays/lowlevel/common/actionlib/docs/client_state_transitions.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6-9-9"
x="1046.5782"
y="346.31693"
style="font-size:20px;fill:#336699;fill-opacity:1">Client State Transitions</tspan></text>
</g>
</svg>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/docs/action_interface.svg | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg4236"
version="1.1"
inkscape:version="0.47pre4 r22446"
sodipodi:docname="action_interface.svg">
<defs
id="defs4238">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective4244" />
<inkscape:perspective
id="perspective4254"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0"
style="overflow:visible">
<path
id="path3179-0-7"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective4826"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4861"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5070"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-2"
style="overflow:visible">
<path
id="path3179-0-7-4"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5098"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5123"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-23"
style="overflow:visible">
<path
id="path3179-0-7-3"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5151"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5176"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-8"
style="overflow:visible">
<path
id="path3179-0-7-49"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5210"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8-0-87"
style="overflow:visible">
<path
id="path3179-0-7-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5244"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8"
style="overflow:visible">
<path
id="path3179-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5250"
style="overflow:visible">
<path
id="path5252"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5307"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5360"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="301.07391"
inkscape:cy="445.86279"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1369"
inkscape:window-height="1146"
inkscape:window-x="777"
inkscape:window-y="174"
inkscape:window-maximized="0" />
<metadata
id="metadata4241">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="43.095909"
y="465.42322"
id="text7210-9"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-6"
x="43.095909"
y="465.42322"
style="font-size:20px;fill:#336699;fill-opacity:1">Action Interface</tspan></text>
<rect
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.99999994;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:7.99999952, 0.99999994;stroke-dashoffset:0"
id="rect5342"
width="163.64471"
height="124.24876"
x="190.91882"
y="523.7196"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2"
width="123"
height="191.69038"
x="68.938438"
y="489.99878"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
ry="10.000001"
rx="10" />
<text
id="text3947-3"
y="581.30444"
x="131.14157"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:20;font-weight:normal;text-align:center;text-anchor:middle"
y="581.30444"
x="131.14157"
sodipodi:role="line"
id="tspan3140">Action</tspan><tspan
style="font-size:20;font-weight:normal;text-align:center;text-anchor:middle"
y="603.80444"
x="131.14157"
sodipodi:role="line"
id="tspan4816">Client</tspan></text>
<rect
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2862-2-1"
width="123"
height="186.39091"
x="341.6524"
y="492.6485"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
ry="10"
rx="10" />
<text
id="text3947-3-8"
y="581.30444"
x="402.56793"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:20;font-weight:normal;text-align:center;text-anchor:middle"
y="581.30444"
x="402.56793"
sodipodi:role="line"
id="tspan3140-7">Action</tspan><tspan
style="font-size:20;font-weight:normal;text-align:center;text-anchor:middle"
y="603.80444"
x="402.56793"
sodipodi:role="line"
id="tspan4816-0">Server</tspan></text>
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 192.92755,542.13362 149.00016,0"
id="path4851"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9"
y="538.55011"
x="254.16183"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="538.55011"
x="254.16183"
id="tspan3963-9-0-9"
sodipodi:role="line">goal</tspan></text>
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 192.92755,560.97552 149.00016,0"
id="path4851-6"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-9-5-9-6"
y="558.95844"
x="247.52902"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="558.95844"
x="247.52902"
id="tspan3963-9-0-9-9"
sodipodi:role="line">cancel</tspan></text>
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 342.21437,593.81746 -149.00016,0"
id="path4851-4"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8"
y="588.12976"
x="266.72433"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="588.12976"
x="266.72433"
sodipodi:role="line"
id="tspan3432">status</tspan></text>
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 342.21437,612.65937 -149.00016,0"
id="path4851-4-2"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-1"
y="608.20886"
x="266.35519"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="608.20886"
x="266.35519"
sodipodi:role="line"
id="tspan3432-6">result</tspan></text>
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8-0)"
d="m 342.21437,631.50127 -149.00016,0"
id="path4851-4-2-2"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-0-0-9-1-1-8-1-1"
y="626.98315"
x="266.63937"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="626.98315"
x="266.63937"
sodipodi:role="line"
id="tspan3432-6-9">feedback</tspan></text>
<rect
style="fill:none;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4321-2"
width="108.57143"
height="63.597984"
x="498.76578"
y="610.43738"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 507.76577,633.97325 89,0"
id="path4072-2"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-2"
y="628.4469"
x="509.76184"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#ae0000;fill-opacity:1"
y="628.4469"
x="509.76184"
id="tspan3963-3-63"
sodipodi:role="line">From Client</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-8)"
d="m 507.76577,659.04502 89,0"
id="path4072-0-7"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-0-7"
y="653.51868"
x="509.64465"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;fill:#336699;fill-opacity:1"
y="653.51868"
x="509.64465"
id="tspan3963-3-6-8"
sodipodi:role="line">From Server </tspan></text>
<text
id="text3961-9-5-9-1"
y="507.15988"
x="224.85497"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/action_interface.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:16px;font-weight:normal;fill:#000000;fill-opacity:1"
y="507.15988"
x="224.85497"
id="tspan3963-9-0-9-1"
sodipodi:role="line">ROS Topics</tspan></text>
</g>
</svg>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/docs/simple_goal_reception.svg | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="837.63727"
height="403.33795"
id="svg3664"
version="1.1"
inkscape:version="0.47pre4 r22446"
sodipodi:docname="simple_goal_reception.svg"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_reception.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3666">
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible">
<path
id="path8348"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(0.8,0,0,0.8,10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible">
<path
id="path4816"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective3672" />
<inkscape:perspective
id="perspective4459"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4484"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4510"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4535"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4560"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4588"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4616"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4641"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4666"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4691"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective4773"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5266"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5297"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5297-0"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5403"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-1"
style="overflow:visible">
<path
id="path4816-2"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective5458"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5489"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5511"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6539"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-8"
style="overflow:visible">
<path
id="path3179-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker6545"
style="overflow:visible">
<path
id="path6547"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective2919"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-9"
style="overflow:visible">
<path
id="path4816-6"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective2947"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective2999"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective5892"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.1311475,0,0,0.39212228,42.57456,-119.65355)"
gradientUnits="userSpaceOnUse"
id="radialGradient6502-968"
xlink:href="#linearGradient3935-6-16"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65" />
<stop
id="stop3943-87-97"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-289.93089,-84.026174)"
gradientUnits="userSpaceOnUse"
id="radialGradient5902"
xlink:href="#linearGradient3935-6-16"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6735"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-289.93089,-84.026174)"
gradientUnits="userSpaceOnUse"
id="radialGradient5902-5"
xlink:href="#linearGradient3935-6-16-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-7" />
<stop
id="stop3943-87-97-1"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-7" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.5292739,0,0,0.39212228,-94.766955,-86.026177)"
gradientUnits="userSpaceOnUse"
id="radialGradient6745"
xlink:href="#linearGradient3935-6-16-8"
inkscape:collect="always" />
<inkscape:perspective
id="perspective6776"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6819"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6841"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6907"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective6947"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-289.93089,-84.026174)"
gradientUnits="userSpaceOnUse"
id="radialGradient5902-8"
xlink:href="#linearGradient3935-6-16-1"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-6" />
<stop
id="stop3943-87-97-4"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-1" />
</linearGradient>
<inkscape:perspective
id="perspective7050"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7078"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-6"
style="overflow:visible">
<path
id="path4816-67"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7113"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-2"
style="overflow:visible">
<path
id="path4816-22"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7153"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-289.93089,-84.026174)"
gradientUnits="userSpaceOnUse"
id="radialGradient5902-2"
xlink:href="#linearGradient3935-6-16-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5" />
<stop
id="stop3943-87-97-41"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-264.50231,253.4024)"
gradientUnits="userSpaceOnUse"
id="radialGradient7163"
xlink:href="#linearGradient3935-6-16-4"
inkscape:collect="always" />
<inkscape:perspective
id="perspective7153-0"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-289.93089,-84.026174)"
gradientUnits="userSpaceOnUse"
id="radialGradient5902-52"
xlink:href="#linearGradient3935-6-16-5"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1" />
<stop
id="stop3943-87-97-5"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-260.93088,401.97382)"
gradientUnits="userSpaceOnUse"
id="radialGradient7163-5"
xlink:href="#linearGradient3935-6-16-5"
inkscape:collect="always" />
<inkscape:perspective
id="perspective7215"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3935-6-16-5-7">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-8" />
<stop
id="stop3943-87-97-5-0"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-5" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-28"
style="overflow:visible">
<path
id="path4816-5"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-4-2">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-5" />
<stop
id="stop3943-87-97-41-7"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-9" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7231"
style="overflow:visible">
<path
id="path7233"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7374"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7415"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7451"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7476"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7504"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3935-6-16-5-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-9" />
<stop
id="stop3943-87-97-5-9"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-9" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-98"
style="overflow:visible">
<path
id="path4816-63"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-4-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-6" />
<stop
id="stop3943-87-97-41-6"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-8" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7520"
style="overflow:visible">
<path
id="path7522"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7679"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7701"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7723"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7754"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7833"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7867"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7889"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.58696565,-371.35944,-119.37708)"
gradientUnits="userSpaceOnUse"
id="radialGradient7163-8-1"
xlink:href="#linearGradient3935-6-16-4-8-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-4-8-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-6-8" />
<stop
id="stop3943-87-97-41-6-0"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-8-1" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-0"
style="overflow:visible">
<path
id="path4816-4"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7951"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7990"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3935-6-16-4-8-8-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-6-8-7" />
<stop
id="stop3943-87-97-41-6-0-5"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-8-1-6" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-86"
style="overflow:visible">
<path
id="path4816-633"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective8114"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective8148"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-5"
style="overflow:visible">
<path
id="path4816-56"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-5-87">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-1" />
<stop
id="stop3943-87-97-5-92"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-56" />
</linearGradient>
<inkscape:perspective
id="perspective8220"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective8245"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective8270"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective8270-7"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective8301"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective8326"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective9253"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-279.50231,782.6881)"
gradientUnits="userSpaceOnUse"
id="radialGradient7163-5-6-2"
xlink:href="#linearGradient3935-6-16-5-87-0"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-5-87-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-1-1" />
<stop
id="stop3943-87-97-5-92-1"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-56-6" />
</linearGradient>
<inkscape:perspective
id="perspective9294"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective9325"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.39212228,-279.50231,782.6881)"
gradientUnits="userSpaceOnUse"
id="radialGradient7163-5-6-1"
xlink:href="#linearGradient3935-6-16-5-87-9"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-5-87-9">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-1-8" />
<stop
id="stop3943-87-97-5-92-4"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-56-9" />
</linearGradient>
<inkscape:perspective
id="perspective9580"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective10039"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
id="linearGradient3935-6-16-5-87-9-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-1-8-9" />
<stop
id="stop3943-87-97-5-92-4-7"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-56-9-7" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-5-0"
style="overflow:visible">
<path
id="path4816-56-0"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-5-87-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-1-15" />
<stop
id="stop3943-87-97-5-92-3"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-56-7" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-50"
style="overflow:visible">
<path
id="path4816-62"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective10305"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective10333"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective10361"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective10389"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective11525"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-50-3"
style="overflow:visible">
<path
id="path4816-62-7"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker11531"
style="overflow:visible">
<path
id="path11533"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-5-7"
style="overflow:visible">
<path
id="path4816-56-8"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-5-87-9-6">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-1-1-8-6" />
<stop
id="stop3943-87-97-5-92-4-9"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-11-56-9-3" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker11542"
style="overflow:visible">
<path
id="path11544"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-4-8-8-31">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-6-8-76" />
<stop
id="stop3943-87-97-41-6-0-52"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-8-1-5" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-3"
style="overflow:visible">
<path
id="path4816-1"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective11752"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective11777"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-5-4"
style="overflow:visible">
<path
id="path4816-56-1"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7238"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-50-39"
style="overflow:visible">
<path
id="path4816-62-4"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7238-6"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-50-9"
style="overflow:visible">
<path
id="path4816-62-9"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7238-4"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-50-5"
style="overflow:visible">
<path
id="path4816-62-2"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7292"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7314"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7339"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7361"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7383"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7405"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective7430"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-50-4"
style="overflow:visible">
<path
id="path4816-62-3"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7436"
style="overflow:visible">
<path
id="path7438"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7440"
style="overflow:visible">
<path
id="path7442"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-5-5"
style="overflow:visible">
<path
id="path4816-56-84"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7446"
style="overflow:visible">
<path
id="path7448"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7450"
style="overflow:visible">
<path
id="path7452"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker7454"
style="overflow:visible">
<path
id="path7456"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<linearGradient
id="linearGradient3935-6-16-4-8-8-6">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-6-8-77" />
<stop
id="stop3943-87-97-41-6-0-1"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-8-1-55" />
</linearGradient>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-64"
style="overflow:visible">
<path
id="path4816-11"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<inkscape:perspective
id="perspective7783"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.4121779,0,0,0.58696565,-371.35944,-119.37708)"
gradientUnits="userSpaceOnUse"
id="radialGradient7163-8-1-3"
xlink:href="#linearGradient3935-6-16-4-8-8-8"
inkscape:collect="always" />
<linearGradient
id="linearGradient3935-6-16-4-8-8-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3937-9-65-5-6-8-2" />
<stop
id="stop3943-87-97-41-6-0-13"
offset="0.75"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3939-2-673-6-8-1-53" />
</linearGradient>
<radialGradient
r="31.5"
fy="516.5"
fx="297.5"
cy="516.5"
cx="297.5"
gradientTransform="matrix(1.7985947,0,0,0.59914336,-400.46131,580.63276)"
gradientUnits="userSpaceOnUse"
id="radialGradient7796"
xlink:href="#linearGradient3935-6-16-4-8-8-8"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="430.60989"
inkscape:cy="-343.71233"
inkscape:document-units="px"
inkscape:current-layer="g5528"
showgrid="false"
inkscape:window-width="1691"
inkscape:window-height="1326"
inkscape:window-x="816"
inkscape:window-y="193"
inkscape:window-maximized="0" />
<metadata
id="metadata3669">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-2.2142674,-5.6810379)">
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="3.7952533"
y="20.87635"
id="text7210"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212"
x="3.7952533"
y="20.87635"
style="font-size:20px;fill:#336699;fill-opacity:1"
rotate="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0">Simple Action Server - Goal Reception</tspan></text>
<g
id="g5528"
transform="translate(-3.4777606,0)">
<path
id="rect3676-3-6-6"
d="m 94.443047,84.012124 0,84.985826 228.069423,0 0,-84.985826 -228.069423,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1" />
<rect
style="fill:none;stroke:#000000;stroke-width:1.0760181;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4321"
width="136.34639"
height="61.379108"
x="706.44489"
y="28.977543"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
id="rect3676-3-6"
d="m 97.300187,236.848 0,69.27154 228.069423,0 0,-69.27154 -228.069423,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1" />
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570"
width="100.71428"
height="31.428583"
x="101.47776"
y="250.67303"
rx="6.5394874"
ry="13.497082" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="151.30074"
y="270.24963"
id="text3953-4-98-1"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5"
x="151.30074"
y="270.24963"
style="font-size:14px;text-align:center;text-anchor:middle">Pending Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="168.33784"
y="154.98029"
id="text3961-0-0-9-1-1-8-8-6-6-6-0"><tspan
id="tspan3432-5-42-51-0-4"
sodipodi:role="line"
x="168.33784"
y="154.98029"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[PENDING]</tspan></text>
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-8"
width="100.71428"
height="30.714298"
x="221.90712"
y="251.03018"
rx="6.5394874"
ry="13.497082" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="272.52402"
y="271.60657"
id="text3953-4-7-7-7"><tspan
sodipodi:role="line"
id="tspan3955-8-0-5-9"
x="272.52402"
y="271.60657"
style="font-size:14px;text-align:center;text-anchor:middle">Current Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="272.26718"
y="154.98029"
id="text3961-0-0-9-1-1-8-8-6-7-86-9"><tspan
id="tspan3432-5-42-5-6-1"
sodipodi:role="line"
x="272.26718"
y="154.98029"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[ACTIVE]</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-7-92-8"
width="40.217854"
height="32.392994"
x="252.15533"
y="108.66571"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-5-40-9"
y="131.42325"
x="266.11191"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="131.42325"
x="266.11191"
id="tspan4500-0-22-1-6"
sodipodi:role="line">A</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-8-2-3"
width="40.217854"
height="32.392994"
x="97.654572"
y="108.66571"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-9-1-4"
y="131.41446"
x="111.46171"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="131.41446"
x="111.46171"
id="tspan4500-01-1-3"
sodipodi:role="line">C</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ae0000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="80.806709"
y="57.017849"
id="text3961-9-8-8-6"><tspan
sodipodi:role="line"
id="tspan3963-9-5-3-7"
x="80.806709"
y="57.017849"
style="font-size:12px;fill:#ae0000;fill-opacity:1">Receive Goal C</tspan></text>
<path
id="path4808-3-8-7"
d="m 90.332266,126.21933 c -60.03293,7.51629 -54.454239,138.20136 7.589443,142.85716"
style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.99999976, 7.99999952;stroke-dashoffset:0;marker-end:url(#Arrow1Lend)"
sodipodi:nodetypes="cc" />
<rect
y="166.57651"
x="5.692028"
height="34.42857"
width="86.142853"
id="rect3959-8-5-8-4-6"
style="fill:url(#radialGradient7163-8-1);fill-opacity:1;stroke:none"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-0-8-5-9-9"
y="178.60135"
x="49.877033"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="178.60135"
x="49.877033"
sodipodi:role="line"
id="tspan3016-6-3-6">Push C into</tspan><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="193.60135"
x="49.877033"
sodipodi:role="line"
id="tspan3020-4-7-3">Pending Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="274.01501"
y="81.938751"
id="text3953-4-98-1-4"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1"
x="274.01501"
y="81.938751"
style="font-size:14px;text-align:center;text-anchor:middle">Action Server</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="172.87221"
y="319.79593"
id="text3953-4-98-1-4-8-3-6"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9"
x="172.87221"
y="319.79593"
style="font-size:14px;text-align:center;text-anchor:middle">Simple Action Server</tspan></text>
<path
id="rect3676-3-6-9"
d="m 220.01526,356.70521 0,44.2715 104.49799,0 0,-44.2715 -104.49799,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229476;stroke-opacity:1" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="272.02841"
y="385.08163"
id="text3953-4-98-1-4-8-3-6-5"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-3"
x="272.02841"
y="385.08163"
style="font-size:14px;text-align:center;text-anchor:middle">User Code</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-mid:none;marker-end:url(#Arrow1Lend-5)"
d="m 272.26426,352.7908 0,-62.14287"
id="path8343" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 4;stroke-dashoffset:0;marker-end:url(#Arrow1Lend-5)"
d="m 120.76347,65.076494 0,35.714276"
id="path9596" />
<rect
ry="10.258395"
rx="5.8400917"
y="28.851467"
x="7.7175951"
height="379.75558"
width="344.77667"
id="rect5479-0-1"
style="fill:none;stroke:#000000;stroke-width:0.82386822;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.29547289, 3.29547289;stroke-dashoffset:0" />
<text
id="text5475-3-5"
y="50.194057"
x="289.46695"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
style="font-size:18px"
y="50.194057"
x="289.46695"
id="tspan5477-7-3"
sodipodi:role="line">step 1</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-9-4-2-76"
width="40.217854"
height="32.392994"
x="147.08311"
y="108.66571"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-7-7-9-8"
y="131.42325"
x="160.77167"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="131.42325"
x="160.77167"
id="tspan4500-0-9-8-9-4"
sodipodi:role="line">B</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 165.90633,243.36218 1.22284,-82.25204"
id="path10409"
sodipodi:nodetypes="cc" />
<path
id="rect3676-3-6-6-7"
d="m 403.44306,84.012124 0,84.985826 248.06942,0 0,-84.985826 -248.06942,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1" />
<path
id="rect3676-3-6-0"
d="m 426.30019,236.848 0,69.27154 228.06942,0 0,-69.27154 -228.06942,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1" />
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-1"
width="100.71428"
height="31.428583"
x="430.47775"
y="250.67303"
rx="6.5394874"
ry="13.497082" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="480.30072"
y="270.24963"
id="text3953-4-98-1-2"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-4"
x="480.30072"
y="270.24963"
style="font-size:14px;text-align:center;text-anchor:middle">Pending Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="533.33783"
y="154.98029"
id="text3961-0-0-9-1-1-8-8-6-6-6-0-6"><tspan
id="tspan3432-5-42-51-0-4-8"
sodipodi:role="line"
x="533.33783"
y="154.98029"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[RECALLED]</tspan></text>
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-8-3"
width="100.71428"
height="30.714298"
x="550.4071"
y="251.03018"
rx="6.5394874"
ry="13.497082" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="601.02399"
y="271.60657"
id="text3953-4-7-7-7-3"><tspan
sodipodi:role="line"
id="tspan3955-8-0-5-9-0"
x="601.02399"
y="271.60657"
style="font-size:14px;text-align:center;text-anchor:middle">Current Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="600.76715"
y="154.98029"
id="text3961-0-0-9-1-1-8-8-6-7-86-9-2"><tspan
id="tspan3432-5-42-5-6-1-6"
sodipodi:role="line"
x="600.76715"
y="154.98029"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[ACTIVE]</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-7-92-8-3"
width="40.217854"
height="32.392994"
x="580.65533"
y="108.66571"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-5-40-9-1"
y="131.42325"
x="594.61188"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="131.42325"
x="594.61188"
id="tspan4500-0-22-1-6-3"
sodipodi:role="line">A</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-8-2-3-1"
width="40.217854"
height="32.392994"
x="428.65457"
y="108.66571"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-9-1-4-4"
y="131.41446"
x="442.4617"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="131.41446"
x="442.4617"
id="tspan4500-01-1-3-2"
sodipodi:role="line">C</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="603.01501"
y="79.938751"
id="text3953-4-98-1-4-6"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-3"
x="603.01501"
y="79.938751"
style="font-size:14px;text-align:center;text-anchor:middle">Action Server</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="501.87219"
y="319.79593"
id="text3953-4-98-1-4-8-3-6-3"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-1"
x="501.87219"
y="319.79593"
style="font-size:14px;text-align:center;text-anchor:middle">Simple Action Server</tspan></text>
<rect
ry="10.25953"
rx="5.2600446"
y="28.830498"
x="370.98233"
height="379.08322"
width="310.5329"
id="rect5479-0-1-1"
style="fill:none;stroke:#000000;stroke-width:0.78192776;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.12771117, 3.12771117;stroke-dashoffset:0" />
<text
id="text5475-3-5-3"
y="50.194057"
x="618.46692"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
style="font-size:18px"
y="50.194057"
x="618.46692"
id="tspan5477-7-3-5"
sodipodi:role="line">step 2</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-9-4-2-76-6"
width="40.217854"
height="32.392994"
x="512.08313"
y="108.66571"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-7-7-9-8-6"
y="131.42325"
x="525.77167"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="131.42325"
x="525.77167"
id="tspan4500-0-9-8-9-4-1"
sodipodi:role="line">B</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/client_states_detailed.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="449.33783"
y="154.98029"
id="text3961-0-0-9-1-1-8-8-6-6-6-0-6-4"><tspan
id="tspan3432-5-42-51-0-4-8-9"
sodipodi:role="line"
x="449.33783"
y="154.98029"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[PENDING]</tspan></text>
<path
id="rect3676-3-6-9-1"
d="m 548.51524,356.70521 0,44.2715 104.49799,0 0,-44.2715 -104.49799,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229476;stroke-opacity:1" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="600.52838"
y="385.08163"
id="text3953-4-98-1-4-8-3-6-5-4"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-3-5"
x="600.52838"
y="385.08163"
style="font-size:14px;text-align:center;text-anchor:middle">User Code</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-mid:none;marker-end:url(#Arrow1Lend-5)"
d="m 600.76424,352.7908 0,-62.14287"
id="path8343-6" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 271.24953,243.36218 1.22284,-82.25204"
id="path10409-9"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 449.90633,243.36218 1.22284,-82.25204"
id="path10409-5"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 599.74951,243.36218 1.22284,-82.25204"
id="path10409-0"
sodipodi:nodetypes="cc" />
<text
id="text3961-1-7-5"
y="50.210068"
x="738.4389"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="50.210068"
x="738.4389"
id="tspan3963-3-9-6"
sodipodi:role="line">Goal Object</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948931;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-8-2-3-1-3"
width="20.771046"
height="16.643425"
x="711.02051"
y="39.129566"
ry="13.497081"
rx="6.5394878" />
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000009, 1.00000002;stroke-dashoffset:0"
id="rect9570-1-3"
width="19.792318"
height="15.163901"
x="711.50989"
y="65.223419"
rx="6.5394874"
ry="13.497082" />
<text
id="text3961-1-7-5-0"
y="75.564156"
x="738.4389"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/wg/arc/vpradeep/ros-64/pkgs-trunk/common/actionlib/docs/server_states_detailed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="75.564156"
x="738.4389"
id="tspan3963-3-9-6-0"
sodipodi:role="line">Goal Object Pointer</tspan></text>
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="7.2730136"
y="529.44775"
id="text7210-1"
inkscape:transform-center-x="78.867159"
inkscape:transform-center-y="-21.946782"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan7212-5"
x="7.2730136"
y="529.44775"
style="font-size:20px;fill:#336699;fill-opacity:1"
rotate="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0">Simple Action Server - Goal Acceptance</tspan></text>
<path
id="rect3676-3-6-6-5"
d="m 94.443047,592.58356 0,84.98582 228.069423,0 0,-84.98582 -228.069423,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:none;stroke:#000000;stroke-width:1.0760181;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect4321-9"
width="136.34639"
height="61.379108"
x="706.44489"
y="537.54895"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
id="rect3676-3-6-8"
d="m 97.300187,745.41943 0,69.27154 228.069423,0 0,-69.27154 -228.069423,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-7"
width="100.71428"
height="31.428583"
x="101.47776"
y="759.24445"
rx="6.5394874"
ry="13.497082"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="151.30074"
y="778.82104"
id="text3953-4-98-1-8"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-48"
x="151.30074"
y="778.82104"
style="font-size:14px;text-align:center;text-anchor:middle">Pending Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="168.33784"
y="663.5517"
id="text3961-0-0-9-1-1-8-8-6-6-6-0-2"><tspan
id="tspan3432-5-42-51-0-4-87"
sodipodi:role="line"
x="168.33784"
y="663.5517"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[PENDING]</tspan></text>
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-8-1"
width="100.71428"
height="30.714298"
x="221.90712"
y="759.60156"
rx="6.5394874"
ry="13.497082"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="272.52402"
y="780.17798"
id="text3953-4-7-7-7-1"><tspan
sodipodi:role="line"
id="tspan3955-8-0-5-9-2"
x="272.52402"
y="780.17798"
style="font-size:14px;text-align:center;text-anchor:middle">Current Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="272.26718"
y="663.5517"
id="text3961-0-0-9-1-1-8-8-6-7-86-9-6"><tspan
id="tspan3432-5-42-5-6-1-69"
sodipodi:role="line"
x="272.26718"
y="663.5517"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[ACTIVE]</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-7-92-8-6"
width="40.217854"
height="32.392994"
x="252.15533"
y="617.23712"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-5-40-9-0"
y="639.99463"
x="266.11191"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
y="639.99463"
x="266.11191"
id="tspan4500-0-22-1-6-5"
sodipodi:role="line">A</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="274.01501"
y="590.51019"
id="text3953-4-98-1-4-2"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9"
x="274.01501"
y="590.51019"
style="font-size:14px;text-align:center;text-anchor:middle">Action Server</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="172.87221"
y="828.36731"
id="text3953-4-98-1-4-8-3-6-31"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-7"
x="172.87221"
y="828.36731"
style="font-size:14px;text-align:center;text-anchor:middle">Simple Action Server</tspan></text>
<path
id="rect3676-3-6-9-0"
d="m 220.01526,865.27664 0,44.2715 104.49799,0 0,-44.2715 -104.49799,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229476;stroke-opacity:1"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="272.02841"
y="893.65302"
id="text3953-4-98-1-4-8-3-6-5-9"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-3-3"
x="272.02841"
y="893.65302"
style="font-size:14px;text-align:center;text-anchor:middle">User Code</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-mid:none;marker-end:url(#Arrow1Lend-5)"
d="m 272.26426,861.36223 0,-62.14287"
id="path8343-0"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 4;stroke-dashoffset:0;marker-end:url(#Arrow1Lend-5)"
d="M 216.47776,893.64793 C -29.839522,899.21845 10.454068,790.15021 91.477757,781.50506"
id="path9596-2"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
ry="10.258395"
rx="5.8400917"
y="537.42291"
x="7.7175951"
height="379.75558"
width="344.77667"
id="rect5479-0-1-4"
style="fill:none;stroke:#000000;stroke-width:0.82386822;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.29547289, 3.29547289;stroke-dashoffset:0"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text5475-3-5-8"
y="558.7655"
x="289.46695"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:18px"
y="558.7655"
x="289.46695"
id="tspan5477-7-3-57"
sodipodi:role="line">step 1</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-9-4-2-76-2"
width="40.217854"
height="32.392994"
x="147.08311"
y="617.23712"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-7-7-9-8-1"
y="639.99463"
x="160.77167"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
y="639.99463"
x="160.77167"
id="tspan4500-0-9-8-9-4-4"
sodipodi:role="line">B</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 165.90633,751.93361 1.22284,-82.25204"
id="path10409-1"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
id="rect3676-3-6-6-7-7"
d="m 514.87163,592.58356 0,84.98582 159.49798,0 0,-84.98582 -159.49798,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
id="rect3676-3-6-0-6"
d="m 426.30019,745.41943 0,69.27154 228.06942,0 0,-69.27154 -228.06942,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229473;stroke-opacity:1"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-1-8"
width="100.71428"
height="31.428583"
x="430.47775"
y="759.24445"
rx="6.5394874"
ry="13.497082"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="480.30072"
y="778.82104"
id="text3953-4-98-1-2-2"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-4-6"
x="480.30072"
y="778.82104"
style="font-size:14px;text-align:center;text-anchor:middle">Pending Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="583.33783"
y="663.5517"
id="text3961-0-0-9-1-1-8-8-6-6-6-0-6-3"><tspan
id="tspan3432-5-42-51-0-4-8-0"
sodipodi:role="line"
x="583.33783"
y="663.5517"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[ACTIVE</tspan></text>
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000019, 1.00000003;stroke-dashoffset:0"
id="rect9570-8-3-4"
width="100.71428"
height="30.714298"
x="550.4071"
y="759.60156"
rx="6.5394874"
ry="13.497082"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="601.02399"
y="780.17798"
id="text3953-4-7-7-7-3-4"><tspan
sodipodi:role="line"
id="tspan3955-8-0-5-9-0-4"
x="601.02399"
y="780.17798"
style="font-size:14px;text-align:center;text-anchor:middle">Current Goal</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="644.76715"
y="663.5517"
id="text3961-0-0-9-1-1-8-8-6-7-86-9-2-3"><tspan
id="tspan3432-5-42-5-6-1-6-6"
sodipodi:role="line"
x="644.76715"
y="663.5517"
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1">[DONE]</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-7-92-8-3-2"
width="40.217854"
height="32.392994"
x="624.65533"
y="617.23712"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-5-40-9-1-6"
y="639.99463"
x="638.61188"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
y="639.99463"
x="638.61188"
id="tspan4500-0-22-1-6-3-7"
sodipodi:role="line">A</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="627.01501"
y="588.51019"
id="text3953-4-98-1-4-6-0"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-3-9"
x="627.01501"
y="588.51019"
style="font-size:14px;text-align:center;text-anchor:middle">Action Server</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="501.87219"
y="828.36731"
id="text3953-4-98-1-4-8-3-6-3-0"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-1-3"
x="501.87219"
y="828.36731"
style="font-size:14px;text-align:center;text-anchor:middle">Simple Action Server</tspan></text>
<rect
ry="10.25953"
rx="5.2600446"
y="537.40192"
x="370.98233"
height="379.08322"
width="310.5329"
id="rect5479-0-1-1-3"
style="fill:none;stroke:#000000;stroke-width:0.78192776;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.12771117, 3.12771117;stroke-dashoffset:0"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text5475-3-5-3-4"
y="558.7655"
x="618.46692"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:18px"
y="558.7655"
x="618.46692"
id="tspan5477-7-3-5-1"
sodipodi:role="line">step 2</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948925;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-3-9-4-2-76-6-8"
width="40.217854"
height="32.392994"
x="563.35486"
y="617.23712"
ry="13.497081"
rx="6.5394878" />
<text
id="text4498-0-7-7-9-8-6-2"
y="639.99463"
x="577.0434"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
y="639.99463"
x="577.0434"
id="tspan4500-0-9-8-9-4-1-5"
sodipodi:role="line">B</tspan></text>
<path
id="rect3676-3-6-9-1-6"
d="m 548.51524,865.27664 0,44.2715 104.49799,0 0,-44.2715 -104.49799,0 z"
style="fill:#cdcdcd;fill-opacity:1;stroke:#000000;stroke-width:0.36229476;stroke-opacity:1"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="600.52838"
y="893.65302"
id="text3953-4-98-1-4-8-3-6-5-4-1"><tspan
sodipodi:role="line"
id="tspan3955-8-5-5-1-9-3-9-3-5-6"
x="600.52838"
y="893.65302"
style="font-size:14px;text-align:center;text-anchor:middle">User Code</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-mid:none;marker-end:url(#Arrow1Lend-5)"
d="m 583.46381,861.36223 0,-62.14287"
id="path8343-6-4"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 271.24953,751.93361 1.22284,-82.25204"
id="path10409-9-5"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend-50)"
d="m 582.44908,751.93361 1.22284,-82.25204"
id="path10409-0-8"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-7-5-5"
y="558.78149"
x="738.4389"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="558.78149"
x="738.4389"
id="tspan3963-3-9-6-9"
sodipodi:role="line">Goal Object</tspan></text>
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
style="fill:#d4e7fa;fill-opacity:1;stroke:#000000;stroke-width:0.93948931;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect3945-1-06-8-2-3-1-3-2"
width="20.771046"
height="16.643425"
x="711.02051"
y="547.70099"
ry="13.497081"
rx="6.5394878" />
<rect
style="fill:#b3b1e9;fill-opacity:1;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8.00000009, 1.00000002;stroke-dashoffset:0"
id="rect9570-1-3-2"
width="19.792318"
height="15.163901"
x="711.50989"
y="573.79486"
rx="6.5394874"
ry="13.497082"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-7-5-0-4"
y="584.13556"
x="738.4389"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:10px;fill:#000000;fill-opacity:1"
y="584.13556"
x="738.4389"
id="tspan3963-3-9-6-0-0"
sodipodi:role="line">Goal Object Pointer</tspan></text>
<rect
y="872.51898"
x="79.763458"
height="35.142857"
width="109.71429"
id="rect3959-8-5-8-4-6-3"
style="fill:url(#radialGradient7796);fill-opacity:1;stroke:none"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<text
id="text3961-1-0-8-5-9-9-3"
y="893.25812"
x="137.23418"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#336699;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
xml:space="preserve"
inkscape:export-filename="/home/eitan/code/ros/trunks/common/actionlib/docs/simple_goal_accept.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><tspan
style="font-size:12px;text-align:center;text-anchor:middle;fill:#336699;fill-opacity:1"
y="893.25812"
x="137.23418"
sodipodi:role="line"
id="tspan3020-4-7-3-5">Accept Goal B</tspan></text>
</g>
</g>
</svg>
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/action/Test.action | int32 goal
---
int32 result
---
int32 feedback
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/action/TestRequest.action | int32 TERMINATE_SUCCESS = 0
int32 TERMINATE_ABORTED = 1
int32 TERMINATE_REJECTED = 2
int32 TERMINATE_LOSE = 3
int32 TERMINATE_DROP = 4
int32 TERMINATE_EXCEPTION = 5
int32 terminate_status
bool ignore_cancel # If true, ignores requests to cancel
string result_text
int32 the_result # Desired value for the_result in the Result
bool is_simple_client
duration delay_accept # Delays accepting the goal by this amount of time
duration delay_terminate # Delays terminating for this amount of time
duration pause_status # Pauses the status messages for this amount of time
---
int32 the_result
bool is_simple_server
---
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/action/TwoInts.action | int64 a
int64 b
---
int64 sum
---
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/src/goal_id_generator.cpp | /*********************************************************************
* 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 <actionlib/goal_id_generator.h>
#include <boost/thread/mutex.hpp>
using namespace actionlib;
static boost::mutex s_goalcount_mutex_;
static unsigned int s_goalcount_ = 0;
GoalIDGenerator::GoalIDGenerator()
{
setName(ros::this_node::getName());
}
GoalIDGenerator::GoalIDGenerator(const std::string& name)
{
setName(name);
}
void GoalIDGenerator::setName(const std::string& name)
{
name_ = name;
}
actionlib_msgs::GoalID GoalIDGenerator::generateID()
{
actionlib_msgs::GoalID id;
ros::Time cur_time = ros::Time::now();
std::stringstream ss;
ss << name_ << "-";
{
boost::mutex::scoped_lock lock(s_goalcount_mutex_);
s_goalcount_++;
ss << s_goalcount_ << "-";
}
ss << cur_time.sec << "." << cur_time.nsec;
id.id = ss.str();
id.stamp = cur_time;
return id;
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib | apollo_public_repos/apollo-platform/ros/actionlib/src/connection_monitor.cpp | /*********************************************************************
* 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 <actionlib/client/connection_monitor.h>
#include <sstream>
using namespace std;
using namespace actionlib;
#define CONNECTION_DEBUG(fmt, ...) \
ROS_DEBUG_NAMED("ConnectionMonitor", fmt,##__VA_ARGS__)
#define CONNECTION_WARN(fmt, ...) \
ROS_WARN_NAMED("ConnectionMonitor", fmt,##__VA_ARGS__)
ConnectionMonitor::ConnectionMonitor(ros::Subscriber&feedback_sub, ros::Subscriber& result_sub)
: feedback_sub_(feedback_sub), result_sub_(result_sub)
{
status_received_ = false;
}
// ********* Goal Connections *********
void ConnectionMonitor::goalConnectCallback(const ros::SingleSubscriberPublisher& pub)
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
// Check if it's not in the list
if (goalSubscribers_.find(pub.getSubscriberName()) == goalSubscribers_.end())
{
CONNECTION_DEBUG("goalConnectCallback: Adding [%s] to goalSubscribers", pub.getSubscriberName().c_str());
goalSubscribers_[pub.getSubscriberName()] = 1;
}
else
{
CONNECTION_WARN("goalConnectCallback: Trying to add [%s] to goalSubscribers, but it is already in the goalSubscribers list", pub.getSubscriberName().c_str());
goalSubscribers_[pub.getSubscriberName()]++;
}
CONNECTION_DEBUG("%s", goalSubscribersString().c_str());
check_connection_condition_.notify_all();
}
void ConnectionMonitor::goalDisconnectCallback(const ros::SingleSubscriberPublisher& pub)
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
map<string, size_t>::iterator it;
it = goalSubscribers_.find(pub.getSubscriberName());
if (it == goalSubscribers_.end())
CONNECTION_WARN("goalDisconnectCallback: Trying to remove [%s] to goalSubscribers, but it is not in the goalSubscribers list", pub.getSubscriberName().c_str());
else
{
CONNECTION_DEBUG("goalDisconnectCallback: Removing [%s] from goalSubscribers", pub.getSubscriberName().c_str());
goalSubscribers_[pub.getSubscriberName()]--;
if (goalSubscribers_[pub.getSubscriberName()] == 0)
{
goalSubscribers_.erase(it);
}
}
CONNECTION_DEBUG("%s", goalSubscribersString().c_str());
}
string ConnectionMonitor::goalSubscribersString()
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
ostringstream ss;
ss << "Goal Subscribers (" << goalSubscribers_.size() << " total)";
for (map<string, size_t>::iterator it=goalSubscribers_.begin(); it != goalSubscribers_.end(); it++)
ss << "\n - " << it->first;
return ss.str();
}
// ********* Cancel Connections *********
void ConnectionMonitor::cancelConnectCallback(const ros::SingleSubscriberPublisher& pub)
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
// Check if it's not in the list
if (cancelSubscribers_.find(pub.getSubscriberName()) == cancelSubscribers_.end())
{
CONNECTION_DEBUG("cancelConnectCallback: Adding [%s] to cancelSubscribers", pub.getSubscriberName().c_str());
cancelSubscribers_[pub.getSubscriberName()] = 1;
}
else
{
CONNECTION_WARN("cancelConnectCallback: Trying to add [%s] to cancelSubscribers, but it is already in the cancelSubscribers list", pub.getSubscriberName().c_str());
cancelSubscribers_[pub.getSubscriberName()]++;
}
CONNECTION_DEBUG("%s", cancelSubscribersString().c_str());
check_connection_condition_.notify_all();
}
void ConnectionMonitor::cancelDisconnectCallback(const ros::SingleSubscriberPublisher& pub)
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
map<string, size_t>::iterator it;
it = cancelSubscribers_.find(pub.getSubscriberName());
if (it == cancelSubscribers_.end())
CONNECTION_WARN("cancelDisconnectCallback: Trying to remove [%s] to cancelSubscribers, but it is not in the cancelSubscribers list", pub.getSubscriberName().c_str());
else
{
CONNECTION_DEBUG("cancelDisconnectCallback: Removing [%s] from cancelSubscribers", pub.getSubscriberName().c_str());
cancelSubscribers_[pub.getSubscriberName()]--;
if (cancelSubscribers_[pub.getSubscriberName()] == 0)
{
cancelSubscribers_.erase(it);
}
}
CONNECTION_DEBUG("%s", cancelSubscribersString().c_str());
}
string ConnectionMonitor::cancelSubscribersString()
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
ostringstream ss;
ss << "cancel Subscribers (" << cancelSubscribers_.size() << " total)";
for (map<string, size_t>::iterator it=cancelSubscribers_.begin(); it != cancelSubscribers_.end(); it++)
ss << "\n - " << it->first;
return ss.str();
}
// ********* GoalStatus Connections *********
void ConnectionMonitor::processStatus(const actionlib_msgs::GoalStatusArrayConstPtr& status, const std::string& cur_status_caller_id)
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
if (status_received_)
{
if (status_caller_id_ != cur_status_caller_id)
{
CONNECTION_WARN("processStatus: Previously received status from [%s], but we now received status from [%s]. Did the ActionServer change?",
status_caller_id_.c_str(), cur_status_caller_id.c_str());
status_caller_id_ = cur_status_caller_id;
}
latest_status_time_ = status->header.stamp;
}
else
{
CONNECTION_DEBUG("processStatus: Just got our first status message from the ActionServer at node [%s]", cur_status_caller_id.c_str());
status_received_ = true;
status_caller_id_ = cur_status_caller_id;
latest_status_time_ = status->header.stamp;
}
check_connection_condition_.notify_all();
}
// ********* Connection logic *********
bool ConnectionMonitor::isServerConnected()
{
boost::recursive_mutex::scoped_lock lock(data_mutex_);
if (!status_received_)
{
CONNECTION_DEBUG("isServerConnected: Didn't receive status yet, so not connected yet");
return false;
}
if(goalSubscribers_.find(status_caller_id_) == goalSubscribers_.end())
{
CONNECTION_DEBUG("isServerConnected: Server [%s] has not yet subscribed to the goal topic, so not connected yet", status_caller_id_.c_str());
CONNECTION_DEBUG("%s", goalSubscribersString().c_str());
return false;
}
if(cancelSubscribers_.find(status_caller_id_) == cancelSubscribers_.end())
{
CONNECTION_DEBUG("isServerConnected: Server [%s] has not yet subscribed to the cancel topic, so not connected yet", status_caller_id_.c_str());
CONNECTION_DEBUG("%s", cancelSubscribersString().c_str());
return false;
}
if(feedback_sub_.getNumPublishers() == 0)
{
CONNECTION_DEBUG("isServerConnected: Client has not yet connected to feedback topic of server [%s]", status_caller_id_.c_str());
return false;
}
if(result_sub_.getNumPublishers() == 0)
{
CONNECTION_DEBUG("isServerConnected: Client has not yet connected to result topic of server [%s]", status_caller_id_.c_str());
return false;
}
CONNECTION_DEBUG("isServerConnected: Server [%s] is fully connected", status_caller_id_.c_str());
return true;
}
bool ConnectionMonitor::waitForActionServerToStart(const ros::Duration& timeout, const ros::NodeHandle& nh)
{
if (timeout < ros::Duration(0,0))
ROS_ERROR_NAMED("actionlib", "Timeouts can't be negative. Timeout is [%.2fs]", timeout.toSec());
ros::Time timeout_time = ros::Time::now() + timeout;
boost::recursive_mutex::scoped_lock lock(data_mutex_);
if (isServerConnected())
return true;
// Hardcode how often we check for node.ok()
ros::Duration loop_period = ros::Duration().fromSec(.5);
while (nh.ok() && !isServerConnected())
{
// Determine how long we should wait
ros::Duration time_left = timeout_time - ros::Time::now();
// Check if we're past the timeout time
if (timeout != ros::Duration(0,0) && time_left <= ros::Duration(0,0) )
break;
// Truncate the time left
if (time_left > loop_period || timeout == ros::Duration())
time_left = loop_period;
check_connection_condition_.timed_wait(lock, boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));
}
return isServerConnected();
}
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/server_goal_handle.py | # Copyright (c) 2009, 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, Inc. 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.
# Author: Alexander Sorokin.
# Based on C++ goal_id_generator.h/cpp
import rospy
import actionlib_msgs.msg
class ServerGoalHandle:
"""
* @class ServerGoalHandle
* @brief Encapsulates a state machine for a given goal that the user can
* trigger transisions on. All ROS interfaces for the goal are managed by
* the ActionServer to lessen the burden on the user.
"""
def __init__(self, status_tracker=None, action_server=None, handle_tracker=None):
"""
A private constructor used by the ActionServer to initialize a ServerGoalHandle.
@node The default constructor was not ported.
"""
self.status_tracker = status_tracker;
self.action_server = action_server
self.handle_tracker = handle_tracker;
if status_tracker:
self.goal=status_tracker.goal;
else:
self.goal=None
def get_default_result(self):
return self.action_server.ActionResultType();
def set_accepted(self, text=""):
"""
Accept the goal referenced by the goal handle. This will
transition to the ACTIVE state or the PREEMPTING state depending
on whether a cancel request has been received for the goal
"""
rospy.logdebug("Accepting goal, id: %s, stamp: %.2f", self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if self.goal:
with self.action_server.lock:
status = self.status_tracker.status.status;
#if we were pending before, then we'll go active
if(status == actionlib_msgs.msg.GoalStatus.PENDING):
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.ACTIVE;
self.status_tracker.status.text = text
self.action_server.publish_status();
#if we were recalling before, now we'll go to preempting
elif(status == actionlib_msgs.msg.GoalStatus.RECALLING) :
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.PREEMPTING;
self.status_tracker.status.text = text
self.action_server.publish_status();
else:
rospy.logerr("To transition to an active state, the goal must be in a pending or recalling state, it is currently in state: %d", self.status_tracker.status.status);
else:
rospy.logerr("Attempt to set status on an uninitialized ServerGoalHandle");
def set_canceled(self, result=None, text=""):
"""
Set the status of the goal associated with the ServerGoalHandle to RECALLED or PREEMPTED
depending on what the current status of the goal is
@param result Optionally, the user can pass in a result to be sent to any clients of the goal
"""
if not result:
result=self.get_default_result();
rospy.logdebug("Setting status to canceled on goal, id: %s, stamp: %.2f", self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if(self.goal):
with self.action_server.lock:
status = self.status_tracker.status.status;
if(status == actionlib_msgs.msg.GoalStatus.PENDING or status == actionlib_msgs.msg.GoalStatus.RECALLING):
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.RECALLED;
self.status_tracker.status.text = text
#on transition to a terminal state, we'll also set the handle destruction time
self.status_tracker.handle_destruction_time = rospy.Time.now()
self.action_server.publish_result(self.status_tracker.status, result);
elif(status == actionlib_msgs.msg.GoalStatus.ACTIVE or status == actionlib_msgs.msg.GoalStatus.PREEMPTING):
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.PREEMPTED;
self.status_tracker.status.text = text
#on transition to a terminal state, we'll also set the handle destruction time
self.status_tracker.handle_destruction_time = rospy.Time.now()
self.action_server.publish_result(self.status_tracker.status, result);
else:
rospy.logerr("To transition to a cancelled state, the goal must be in a pending, recalling, active, or preempting state, it is currently in state: %d",
self.status_tracker.status.status);
else:
rospy.logerr("Attempt to set status on an uninitialized ServerGoalHandle");
def set_rejected(self, result=None, text=""):
"""
* @brief Set the status of the goal associated with the ServerGoalHandle to rejected
* @param result Optionally, the user can pass in a result to be sent to any clients of the goal
"""
if not result:
result=self.get_default_result();
rospy.logdebug("Setting status to rejected on goal, id: %s, stamp: %.2f", self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if self.goal :
with self.action_server.lock:
status = self.status_tracker.status.status;
if(status == actionlib_msgs.msg.GoalStatus.PENDING or status == actionlib_msgs.msg.GoalStatus.RECALLING):
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.REJECTED;
self.status_tracker.status.text = text
#on transition to a terminal state, we'll also set the handle destruction time
self.status_tracker.handle_destruction_time = rospy.Time.now()
self.action_server.publish_result(self.status_tracker.status, result);
else:
rospy.logerr("To transition to a rejected state, the goal must be in a pending or recalling state, it is currently in state: %d",
self.status_tracker.status.status);
else:
rospy.logerr("Attempt to set status on an uninitialized ServerGoalHandle");
def set_aborted(self, result=None, text=""):
"""
Set the status of the goal associated with the ServerGoalHandle to aborted
@param result Optionally, the user can pass in a result to be sent to any clients of the goal
"""
if not result:
result=self.get_default_result();
rospy.logdebug("Setting status to aborted on goal, id: %s, stamp: %.2f", self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if self.goal:
with self.action_server.lock:
status = self.status_tracker.status.status;
if status == actionlib_msgs.msg.GoalStatus.PREEMPTING or status == actionlib_msgs.msg.GoalStatus.ACTIVE:
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.ABORTED;
self.status_tracker.status.text = text
#on transition to a terminal state, we'll also set the handle destruction time
self.status_tracker.handle_destruction_time = rospy.Time.now()
self.action_server.publish_result(self.status_tracker.status, result);
else:
rospy.logerr("To transition to an aborted state, the goal must be in a preempting or active state, it is currently in state: %d",
status);
else:
rospy.logerr("Attempt to set status on an uninitialized ServerGoalHandle");
def set_succeeded(self,result=None, text=""):
"""
Set the status of the goal associated with the ServerGoalHandle to succeeded
@param result Optionally, the user can pass in a result to be sent to any clients of the goal
"""
if not result:
result=self.get_default_result();
rospy.logdebug("Setting status to succeeded on goal, id: %s, stamp: %.2f",
self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if self.goal:
with self.action_server.lock:
status = self.status_tracker.status.status;
if status == actionlib_msgs.msg.GoalStatus.PREEMPTING or status == actionlib_msgs.msg.GoalStatus.ACTIVE :
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.SUCCEEDED;
self.status_tracker.status.text = text
#on transition to a terminal state, we'll also set the handle destruction time
self.status_tracker.handle_destruction_time = rospy.Time.now()
self.action_server.publish_result(self.status_tracker.status, result);
else:
rospy.logerr("To transition to a succeeded state, the goal must be in a preempting or active state, it is currently in state: %d",
status);
else:
rospy.logerr("Attempt to set status on an uninitialized ServerGoalHandle");
def publish_feedback(self,feedback):
"""
Send feedback to any clients of the goal associated with this ServerGoalHandle
@param feedback The feedback to send to the client
"""
rospy.logdebug("Publishing feedback for goal, id: %s, stamp: %.2f",
self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if self.goal:
with self.action_server.lock:
self.action_server.publish_feedback(self.status_tracker.status, feedback);
else:
rospy.logerr("Attempt to publish feedback on an uninitialized ServerGoalHandle");
def get_goal(self):
"""
Accessor for the goal associated with the ServerGoalHandle
@return A shared_ptr to the goal object
"""
#if we have a goal that is non-null
if self.goal:
#@todo Test that python reference counting automatically handles this.
#create the deleter for our goal subtype
#d = EnclosureDeleter(self.goal);
#weakref.ref(boost::shared_ptr<const Goal>(&(goal_->goal), d);
return self.goal.goal
return None
def get_goal_id(self):
"""
Accessor for the goal id associated with the ServerGoalHandle
@return The goal id
"""
if self.goal:
with self.action_server.lock:
return self.status_tracker.status.goal_id;
else:
rospy.logerr("Attempt to get a goal id on an uninitialized ServerGoalHandle");
return actionlib_msgs.msg.GoalID();
def get_goal_status(self):
"""
Accessor for the status associated with the ServerGoalHandle
@return The goal status
"""
if self.goal:
with self.action_server.lock:
return self.status_tracker.status;
else:
rospy.logerr("Attempt to get goal status on an uninitialized ServerGoalHandle");
return actionlib_msgs.msg.GoalStatus();
def __eq__(self, other):
"""
Equals operator for ServerGoalHandles
@param other The ServerGoalHandle to compare to
@return True if the ServerGoalHandles refer to the same goal, false otherwise
"""
if( not self.goal or not other.goal):
return False;
my_id = self.get_goal_id();
their_id = other.get_goal_id();
return my_id.id == their_id.id;
def __ne__(self, other):
"""
!= operator for ServerGoalHandles
@param other The ServerGoalHandle to compare to
@return True if the ServerGoalHandles refer to different goals, false otherwise
"""
if( not self.goal or not other.goal):
return True;
my_id = self.get_goal_id();
their_id = other.get_goal_id();
return my_id.id != their_id.id;
def __hash__(self):
"""
hash function for ServerGoalHandles
@return hash of the goal ID
"""
return hash(self.get_goal_id().id)
def set_cancel_requested(self):
"""
A private method to set status to PENDING or RECALLING
@return True if the cancel request should be passed on to the user, false otherwise
"""
rospy.logdebug("Transisitoning to a cancel requested state on goal id: %s, stamp: %.2f",
self.get_goal_id().id, self.get_goal_id().stamp.to_sec());
if self.goal:
with self.action_server.lock:
status = self.status_tracker.status.status;
if (status == actionlib_msgs.msg.GoalStatus.PENDING):
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.RECALLING;
self.action_server.publish_status();
return True;
if(status == actionlib_msgs.msg.GoalStatus.ACTIVE):
self.status_tracker.status.status = actionlib_msgs.msg.GoalStatus.PREEMPTING;
self.action_server.publish_status();
return True;
return False;
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/__init__.py | # Copyright (c) 2009, 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, Inc. 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.
from actionlib.action_client import *
from actionlib.simple_action_client import *
from actionlib.action_server import *
from actionlib.simple_action_server import *
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/status_tracker.py | # Copyright (c) 2009, 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, Inc. 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.
# Author: Alexander Sorokin.
# Based on C++ goal_id_generator.h/cpp
import rospy
import actionlib
import actionlib_msgs.msg
from actionlib import goal_id_generator
class StatusTracker:
"""
* @class StatusTracker
* @brief A class for storing the status of each goal the action server
* is currently working on
"""
def __init__(self, goal_id=None, status=None, goal=None):
"""
@brief create status tracker. Either pass goal_id and status OR goal
"""
self.goal = None ;
self.handle_tracker = None;
self.status = actionlib_msgs.msg.GoalStatus();
self.handle_destruction_time = rospy.Time();
self.id_generator = goal_id_generator.GoalIDGenerator();
if goal_id:
#set the goal id and status appropriately
self.status.goal_id = goal_id;
self.status.status = status;
else:
self.goal = goal
self.status.goal_id = goal.goal_id;
#initialize the status of the goal to pending
self.status.status = actionlib_msgs.msg.GoalStatus.PENDING;
#if the goal id is zero, then we need to make up an id for the goal
if self.status.goal_id.id == "":
self.status.goal_id = self.id_generator.generate_ID();
#if the timestamp of the goal is zero, then we'll set it to now()
if self.status.goal_id.stamp == rospy.Time():
self.status.goal_id.stamp = rospy.Time.now();
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/goal_id_generator.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
# Author: Alexander Sorokin.
# Based on C++ goal_id_generator.h/cpp
import rospy
import sys
from actionlib_msgs.msg import GoalID
import threading
global s_goalcount_lock
global s_goalcount
s_goalcount_lock = threading.Lock();
s_goalcount = 0
class GoalIDGenerator:
def __init__(self,name=None):
"""
* Create a generator that prepends the fully qualified node name to the Goal ID
* \param name Unique name to prepend to the goal id. This will
* generally be a fully qualified node name.
"""
if name is not None:
self.set_name(name)
else:
self.set_name(rospy.get_name());
def set_name(self,name):
"""
* \param name Set the name to prepend to the goal id. This will
* generally be a fully qualified node name.
"""
self.name=name;
def generate_ID(self):
"""
* \brief Generates a unique ID
* \return A unique GoalID for this action
"""
id = GoalID();
cur_time = rospy.Time.now();
ss = self.name + "-";
global s_goalcount_lock
global s_goalcount
with s_goalcount_lock:
s_goalcount += 1
ss += str(s_goalcount) + "-";
ss += str(cur_time.secs) + "." + str(cur_time.nsecs);
id.id = ss;
id.stamp = cur_time;
return id;
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/simple_action_server.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
#
# Author: Alexander Sorokin.
# Based on C++ simple_action_server.h by Eitan Marder-Eppstein
import rospy
import threading
import traceback
from actionlib_msgs.msg import *
from actionlib import ActionServer
from actionlib.server_goal_handle import ServerGoalHandle;
def nop_cb(goal_handle):
pass
## @class SimpleActionServer
## @brief The SimpleActionServer
## implements a singe goal policy on top of the ActionServer class. The
## specification of the policy is as follows: only one goal can have an
## active status at a time, new goals preempt previous goals based on the
## stamp in their GoalID field (later goals preempt earlier ones), an
## explicit preempt goal preempts all goals with timestamps that are less
## than or equal to the stamp associated with the preempt, accepting a new
## goal implies successful preemption of any old goal and the status of the
## old goal will be change automatically to reflect this.
class SimpleActionServer:
## @brief Constructor for a SimpleActionServer
## @param name A name for the action server
## @param execute_cb Optional callback that gets called in a separate thread whenever
## a new goal is received, allowing users to have blocking callbacks.
## Adding an execute callback also deactivates the goalCallback.
## @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
def __init__(self, name, ActionSpec, execute_cb = None, auto_start = True):
self.new_goal = False
self.preempt_request = False
self.new_goal_preempt_request = False
self.execute_callback = execute_cb;
self.goal_callback = None;
self.preempt_callback = None;
self.need_to_terminate = False
self.terminate_mutex = threading.RLock();
# since the internal_goal/preempt_callbacks are invoked from the
# ActionServer while holding the self.action_server.lock
# self.lock must always be locked after the action server lock
# to avoid an inconsistent lock acquisition order
self.lock = threading.RLock();
self.execute_condition = threading.Condition(self.lock);
self.current_goal = ServerGoalHandle();
self.next_goal = ServerGoalHandle();
if self.execute_callback:
self.execute_thread = threading.Thread(None, self.executeLoop);
self.execute_thread.start();
else:
self.execute_thread = None
#create the action server
self.action_server = ActionServer(name, ActionSpec, self.internal_goal_callback,self.internal_preempt_callback,auto_start);
def __del__(self):
if hasattr(self, 'execute_callback') and self.execute_callback:
with self.terminate_mutex:
self.need_to_terminate = True;
assert(self.execute_thread);
self.execute_thread.join();
## @brief Accepts a new goal when one is available The status of this
## goal is set to active upon acceptance, and the status of any
## previously active goal is set to preempted. Preempts received for the
## new goal between checking if isNewGoalAvailable or invokation of a
## goal callback and the acceptNewGoal call will not trigger a preempt
## callback. This means, isPreemptReqauested should be called after
## accepting the goal even for callback-based implementations to make
## sure the new goal does not have a pending preempt request.
## @return A shared_ptr to the new goal.
def accept_new_goal(self):
with self.action_server.lock, self.lock:
if not self.new_goal or not self.next_goal.get_goal():
rospy.logerr("Attempting to accept the next goal when a new goal is not available");
return None;
#check if we need to send a preempted message for the goal that we're currently pursuing
if self.is_active() and self.current_goal.get_goal() and self.current_goal != self.next_goal:
self.current_goal.set_canceled(None, "This goal was canceled because another goal was received by the simple action server");
rospy.logdebug("Accepting a new goal");
#accept the next goal
self.current_goal = self.next_goal;
self.new_goal = False;
#set preempt to request to equal the preempt state of the new goal
self.preempt_request = self.new_goal_preempt_request;
self.new_goal_preempt_request = False;
#set the status of the current goal to be active
self.current_goal.set_accepted("This goal has been accepted by the simple action server");
return self.current_goal.get_goal();
## @brief Allows polling implementations to query about the availability of a new goal
## @return True if a new goal is available, false otherwise
def is_new_goal_available(self):
return self.new_goal;
## @brief Allows polling implementations to query about preempt requests
## @return True if a preempt is requested, false otherwise
def is_preempt_requested(self):
return self.preempt_request;
## @brief Allows polling implementations to query about the status of the current goal
## @return True if a goal is active, false otherwise
def is_active(self):
if not self.current_goal.get_goal():
return False;
status = self.current_goal.get_goal_status().status;
return status == actionlib_msgs.msg.GoalStatus.ACTIVE or status == actionlib_msgs.msg.GoalStatus.PREEMPTING;
## @brief Sets the status of the active goal to succeeded
## @param result An optional result to send back to any clients of the goal
def set_succeeded(self,result=None, text=""):
with self.action_server.lock, self.lock:
if not result:
result=self.get_default_result();
self.current_goal.set_succeeded(result, text);
## @brief Sets the status of the active goal to aborted
## @param result An optional result to send back to any clients of the goal
def set_aborted(self, result = None, text=""):
with self.action_server.lock, self.lock:
if not result:
result=self.get_default_result();
self.current_goal.set_aborted(result, text);
## @brief Publishes feedback for a given goal
## @param feedback Shared pointer to the feedback to publish
def publish_feedback(self,feedback):
self.current_goal.publish_feedback(feedback);
def get_default_result(self):
return self.action_server.ActionResultType();
## @brief Sets the status of the active goal to preempted
## @param result An optional result to send back to any clients of the goal
def set_preempted(self,result=None, text=""):
if not result:
result=self.get_default_result();
with self.action_server.lock, self.lock:
rospy.logdebug("Setting the current goal as canceled");
self.current_goal.set_canceled(result, text);
## @brief Allows users to register a callback to be invoked when a new goal is available
## @param cb The callback to be invoked
def register_goal_callback(self,cb):
if self.execute_callback:
rospy.logwarn("Cannot call SimpleActionServer.register_goal_callback() because an executeCallback exists. Not going to register it.");
else:
self.goal_callback = cb;
## @brief Allows users to register a callback to be invoked when a new preempt request is available
## @param cb The callback to be invoked
def register_preempt_callback(self, cb):
self.preempt_callback = cb;
## @brief Explicitly start the action server, used it auto_start is set to false
def start(self):
self.action_server.start();
## @brief Callback for when the ActionServer receives a new goal and passes it on
def internal_goal_callback(self, goal):
self.execute_condition.acquire();
try:
rospy.logdebug("A new goal %shas been recieved by the single goal action server",goal.get_goal_id().id);
#check that the timestamp is past that of the current goal and the next goal
if((not self.current_goal.get_goal() or goal.get_goal_id().stamp >= self.current_goal.get_goal_id().stamp)
and (not self.next_goal.get_goal() or goal.get_goal_id().stamp >= self.next_goal.get_goal_id().stamp)):
#if next_goal has not been accepted already... its going to get bumped, but we need to let the client know we're preempting
if(self.next_goal.get_goal() and (not self.current_goal.get_goal() or self.next_goal != self.current_goal)):
self.next_goal.set_canceled(None, "This goal was canceled because another goal was received by the simple action server");
self.next_goal = goal;
self.new_goal = True;
self.new_goal_preempt_request = False;
#if the server is active, we'll want to call the preempt callback for the current goal
if(self.is_active()):
self.preempt_request = True;
#if the user has registered a preempt callback, we'll call it now
if(self.preempt_callback):
self.preempt_callback();
#if the user has defined a goal callback, we'll call it now
if self.goal_callback:
self.goal_callback();
#Trigger runLoop to call execute()
self.execute_condition.notify();
self.execute_condition.release();
else:
#the goal requested has already been preempted by a different goal, so we're not going to execute it
goal.set_canceled(None, "This goal was canceled because another goal was received by the simple action server");
self.execute_condition.release();
except Exception as e:
rospy.logerr("SimpleActionServer.internal_goal_callback - exception %s",str(e))
self.execute_condition.release();
## @brief Callback for when the ActionServer receives a new preempt and passes it on
def internal_preempt_callback(self,preempt):
with self.lock:
rospy.logdebug("A preempt has been received by the SimpleActionServer");
#if the preempt is for the current goal, then we'll set the preemptRequest flag and call the user's preempt callback
if(preempt == self.current_goal):
rospy.logdebug("Setting preempt_request bit for the current goal to TRUE and invoking callback");
self.preempt_request = True;
#if the user has registered a preempt callback, we'll call it now
if(self.preempt_callback):
self.preempt_callback();
#if the preempt applies to the next goal, we'll set the preempt bit for that
elif(preempt == self.next_goal):
rospy.logdebug("Setting preempt request bit for the next goal to TRUE");
self.new_goal_preempt_request = True;
## @brief Called from a separate thread to call blocking execute calls
def executeLoop(self):
loop_duration = rospy.Duration.from_sec(.1);
while (not rospy.is_shutdown()):
rospy.logdebug("SAS: execute");
with self.terminate_mutex:
if (self.need_to_terminate):
break;
# the following checks (is_active, is_new_goal_available)
# are performed without locking
# the worst thing that might happen in case of a race
# condition is a warning/error message on the console
if (self.is_active()):
rospy.logerr("Should never reach this code with an active goal");
return
if (self.is_new_goal_available()):
# accept_new_goal() is performing its own locking
goal = self.accept_new_goal();
if not self.execute_callback:
rospy.logerr("execute_callback_ must exist. This is a bug in SimpleActionServer");
return
try:
self.execute_callback(goal)
if self.is_active():
rospy.logwarn("Your executeCallback did not set the goal to a terminal status. " +
"This is a bug in your ActionServer implementation. Fix your code! "+
"For now, the ActionServer will set this goal to aborted");
self.set_aborted(None, "No terminal state was set.");
except Exception as ex:
rospy.logerr("Exception in your execute callback: %s\n%s", str(ex),
traceback.format_exc())
self.set_aborted(None, "Exception in execute callback: %s" % str(ex))
with self.execute_condition:
self.execute_condition.wait(loop_duration.to_sec());
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/handle_tracker_deleter.py | # Copyright (c) 2009, 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, Inc. 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.
# Author: Alexander Sorokin.
# Based on C++ goal_id_generator.h/cpp
import rospy
class HandleTrackerDeleter:
"""
* @class HandleTrackerDeleter
* @brief A class to help with tracking GoalHandles and removing goals
* from the status list when the last GoalHandle associated with a given
* goal is deleted.
"""
def __init__(self, action_server, status_tracker):
"""
@brief create deleter
"""
self.action_server = action_server;
self.status_tracker = status_tracker;
def __call__(self,ptr):
if self.action_server:
with self.action_server.lock:
self.status_tracker.handle_destruction_time = rospy.Time.now();
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/action_server.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
#
# Author: Alexander Sorokin.
# Based on C++ action_server.h by Eitan Marder-Eppstein
import rospy
import threading
from actionlib_msgs.msg import *
from actionlib.goal_id_generator import GoalIDGenerator
from actionlib.status_tracker import StatusTracker
from actionlib.handle_tracker_deleter import HandleTrackerDeleter
from actionlib.server_goal_handle import ServerGoalHandle
from actionlib.exceptions import *
def nop_cb(goal_handle):
pass
def ros_timer(callable,frequency):
rate = rospy.Rate(frequency)
rospy.logdebug("Starting timer");
while not rospy.is_shutdown():
try:
rate.sleep()
callable()
except rospy.exceptions.ROSInterruptException:
rospy.logdebug("Sleep interrupted");
## @class ActionServer
## @brief The ActionServer is a helpful tool for managing goal requests to a
## node. It allows the user to specify callbacks that are invoked when goal
## or cancel requests come over the wire, and passes back GoalHandles that
## can be used to track the state of a given goal request. The ActionServer
## makes no assumptions about the policy used to service these goals, and
## sends status for each goal over the wire until the last GoalHandle
## associated with a goal request is destroyed.
class ActionServer:
## @brief Constructor for an ActionServer
## @param ns/name A namespace for the action server
## @param actionspec An explicit specification of the action
## @param goal_cb A goal callback to be called when the ActionServer receives a new goal over the wire
## @param cancel_cb A cancel callback to be called when the ActionServer receives a new cancel request over the wire
## @param auto_start A boolean value that tells the ActionServer wheteher or not to start publishing as soon as it comes up. THIS SHOULD ALWAYS BE SET TO FALSE TO AVOID RACE CONDITIONS and start() should be called after construction of the server.
def __init__(self, ns, ActionSpec, goal_cb, cancel_cb = nop_cb, auto_start = True):
self.ns=ns;
try:
a = ActionSpec()
self.ActionSpec = ActionSpec
self.ActionGoal = type(a.action_goal)
self.ActionResult = type(a.action_result)
self.ActionResultType = type(a.action_result.result)
self.ActionFeedback = type(a.action_feedback)
except AttributeError:
raise ActionException("Type is not an action spec: %s" % str(ActionSpec))
self.goal_sub = None
self.cancel_sub = None
self.status_pub = None
self.result_pub = None
self.feedback_pub = None
self.lock = threading.RLock()
self.status_timer = None;
self.status_list = [];
self.last_cancel = rospy.Time();
self.status_list_timeout = rospy.Duration();
self.id_generator = GoalIDGenerator();
self.goal_callback = goal_cb;
assert(self.goal_callback);
self.cancel_callback = cancel_cb;
self.auto_start = auto_start;
self.started = False;
if self.auto_start:
rospy.logwarn("You've passed in true for auto_start to the python action server, you should always pass in false to avoid race conditions.")
self.start()
## @brief Register a callback to be invoked when a new goal is received, this will replace any previously registered callback
## @param cb The callback to invoke
def register_goal_callback(self, cb):
self.goal_callback = cb
## @brief Register a callback to be invoked when a new cancel is received, this will replace any previously registered callback
## @param cb The callback to invoke
def register_cancel_callback(self,cancel_cb):
self.cancel_callback = cancel_cb
## @brief Start the action server
def start(self):
with self.lock:
self.initialize();
self.started = True;
self.publish_status();
## @brief Initialize all ROS connections and setup timers
def initialize(self):
self.status_pub = rospy.Publisher(rospy.remap_name(self.ns)+"/status", GoalStatusArray, latch=True, queue_size=50);
self.result_pub = rospy.Publisher(rospy.remap_name(self.ns)+"/result", self.ActionResult, queue_size=50);
self.feedback_pub = rospy.Publisher(rospy.remap_name(self.ns)+"/feedback", self.ActionFeedback, queue_size=50);
self.goal_sub = rospy.Subscriber(rospy.remap_name(self.ns)+"/goal", self.ActionGoal,self.internal_goal_callback);
self.cancel_sub = rospy.Subscriber(rospy.remap_name(self.ns)+"/cancel", GoalID,self.internal_cancel_callback);
#read the frequency with which to publish status from the parameter server
#if not specified locally explicitly, use search param to find actionlib_status_frequency
resolved_status_frequency_name = rospy.remap_name(self.ns)+"/status_frequency"
if rospy.has_param(resolved_status_frequency_name):
self.status_frequency = rospy.get_param(resolved_status_frequency_name, 5.0);
rospy.logwarn("You're using the deprecated status_frequency parameter, please switch to actionlib_status_frequency.")
else:
search_status_frequency_name = rospy.search_param("actionlib_status_frequency")
if search_status_frequency_name is None:
self.status_frequency = 5.0
else:
self.status_frequency = rospy.get_param(search_status_frequency_name, 5.0)
status_list_timeout = rospy.get_param(rospy.remap_name(self.ns)+"/status_list_timeout", 5.0);
self.status_list_timeout = rospy.Duration(status_list_timeout);
self.status_timer = threading.Thread( None, ros_timer, None, (self.publish_status_async,self.status_frequency) );
self.status_timer.start();
## @brief Publishes a result for a given goal
## @param status The status of the goal with which the result is associated
## @param result The result to publish
def publish_result(self, status, result):
with self.lock:
ar = self.ActionResult();
ar.header.stamp = rospy.Time.now();
ar.status = status;
ar.result = result;
self.result_pub.publish(ar);
self.publish_status()
## @brief Publishes feedback for a given goal
## @param status The status of the goal with which the feedback is associated
## @param feedback The feedback to publish
def publish_feedback(self, status, feedback):
with self.lock:
af=self.ActionFeedback();
af.header.stamp = rospy.Time.now();
af.status = status;
af.feedback = feedback;
self.feedback_pub.publish(af);
## @brief The ROS callback for cancel requests coming into the ActionServer
def internal_cancel_callback(self, goal_id):
with self.lock:
#if we're not started... then we're not actually going to do anything
if not self.started:
return;
#we need to handle a cancel for the user
rospy.logdebug("The action server has received a new cancel request");
goal_id_found = False;
for st in self.status_list[:]:
#check if the goal id is zero or if it is equal to the goal id of
#the iterator or if the time of the iterator warrants a cancel
cancel_everything = (goal_id.id == "" and goal_id.stamp == rospy.Time() ) #rospy::Time()) #id and stamp 0 --> cancel everything
cancel_this_one = ( goal_id.id == st.status.goal_id.id) #ids match... cancel that goal
cancel_before_stamp = (goal_id.stamp != rospy.Time() and st.status.goal_id.stamp <= goal_id.stamp) #//stamp != 0 --> cancel everything before stamp
if cancel_everything or cancel_this_one or cancel_before_stamp:
#we need to check if we need to store this cancel request for later
if goal_id.id == st.status.goal_id.id:
goal_id_found = True;
#attempt to get the handle_tracker for the list item if it exists
handle_tracker = st.handle_tracker;
if handle_tracker is None:
#if the handle tracker is expired, then we need to create a new one
handle_tracker = HandleTrackerDeleter(self, st);
st.handle_tracker = handle_tracker;
#we also need to reset the time that the status is supposed to be removed from the list
st.handle_destruction_time = rospy.Time.now()
#set the status of the goal to PREEMPTING or RECALLING as approriate
#and check if the request should be passed on to the user
gh = ServerGoalHandle(st, self, handle_tracker);
if gh.set_cancel_requested():
#call the user's cancel callback on the relevant goal
self.cancel_callback(gh);
#if the requested goal_id was not found, and it is non-zero, then we need to store the cancel request
if goal_id.id != "" and not goal_id_found:
tracker= StatusTracker(goal_id, actionlib_msgs.msg.GoalStatus.RECALLING);
self.status_list.append(tracker)
#start the timer for how long the status will live in the list without a goal handle to it
tracker.handle_destruction_time = rospy.Time.now()
#make sure to set last_cancel_ based on the stamp associated with this cancel request
if goal_id.stamp > self.last_cancel:
self.last_cancel = goal_id.stamp;
## @brief The ROS callback for goals coming into the ActionServer
def internal_goal_callback(self, goal):
with self.lock:
#if we're not started... then we're not actually going to do anything
if not self.started:
return;
rospy.logdebug("The action server has received a new goal request");
#we need to check if this goal already lives in the status list
for st in self.status_list[:]:
if goal.goal_id.id == st.status.goal_id.id:
rospy.logdebug("Goal %s was already in the status list with status %i" % (goal.goal_id.id, st.status.status))
# Goal could already be in recalling state if a cancel came in before the goal
if st.status.status == actionlib_msgs.msg.GoalStatus.RECALLING:
st.status.status = actionlib_msgs.msg.GoalStatus.RECALLED
self.publish_result(st.status, self.ActionResultType())
#if this is a request for a goal that has no active handles left,
#we'll bump how long it stays in the list
if st.handle_tracker is None:
st.handle_destruction_time = rospy.Time.now()
#make sure not to call any user callbacks or add duplicate status onto the list
return;
#if the goal is not in our list, we need to create a StatusTracker associated with this goal and push it on
st = StatusTracker(None,None,goal)
self.status_list.append(st);
#we need to create a handle tracker for the incoming goal and update the StatusTracker
handle_tracker = HandleTrackerDeleter(self, st);
st.handle_tracker = handle_tracker;
#check if this goal has already been canceled based on its timestamp
gh= ServerGoalHandle(st, self, handle_tracker);
if goal.goal_id.stamp != rospy.Time() and goal.goal_id.stamp <= self.last_cancel:
#if it has... just create a GoalHandle for it and setCanceled
gh.set_canceled(None, "This goal handle was canceled by the action server because its timestamp is before the timestamp of the last cancel request");
else:
#now, we need to create a goal handle and call the user's callback
self.goal_callback(gh);
## @brief Publish status for all goals on a timer event
def publish_status_async(self):
rospy.logdebug("Status async");
with self.lock:
#we won't publish status unless we've been started
if not self.started:
return
self.publish_status();
## @brief Explicitly publish status
def publish_status(self):
with self.lock:
#build a status array
status_array = actionlib_msgs.msg.GoalStatusArray()
#status_array.set_status_list_size(len(self.status_list));
i=0;
while i<len(self.status_list):
st = self.status_list[i]
#check if the item is due for deletion from the status list
if st.handle_destruction_time != rospy.Time() and st.handle_destruction_time + self.status_list_timeout < rospy.Time.now():
rospy.logdebug("Item %s with destruction time of %.3f being removed from list. Now = %.3f" % \
(st.status.goal_id, st.handle_destruction_time.to_sec(), rospy.Time.now().to_sec()))
del self.status_list[i]
else:
status_array.status_list.append(st.status);
i+=1
status_array.header.stamp = rospy.Time.now()
self.status_pub.publish(status_array)
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/exceptions.py | #! /usr/bin/env python
# Copyright (c) 2010, 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, Inc. 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.
# Author: Jonathan Bohren
class ActionException(Exception): pass
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/simple_action_client.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
# Author: Stuart Glaser
import threading
import time
import rospy
from rospy import Header
from actionlib_msgs.msg import *
from actionlib.action_client import ActionClient, CommState, get_name_of_constant
class SimpleGoalState:
PENDING = 0
ACTIVE = 1
DONE = 2
SimpleGoalState.to_string = classmethod(get_name_of_constant)
class SimpleActionClient:
## @brief Constructs a SimpleActionClient and opens connections to an ActionServer.
##
## @param ns The namespace in which to access the action. For
## example, the "goal" topic should occur under ns/goal
##
## @param ActionSpec The *Action message type. The SimpleActionClient
## will grab the other message types from this type.
def __init__(self, ns, ActionSpec):
self.action_client = ActionClient(ns, ActionSpec)
self.simple_state = SimpleGoalState.DONE
self.gh = None
self.done_condition = threading.Condition()
## @brief Blocks until the action server connects to this client
##
## @param timeout Max time to block before returning. A zero
## timeout is interpreted as an infinite timeout.
##
## @return True if the server connected in the allocated time. False on timeout
def wait_for_server(self, timeout = rospy.Duration()):
return self.action_client.wait_for_server(timeout)
## @brief Sends a goal to the ActionServer, and also registers callbacks
##
## If a previous goal is already active when this is called. We simply forget
## about that goal and start tracking the new goal. No cancel requests are made.
##
## @param done_cb Callback that gets called on transitions to
## Done. The callback should take two parameters: the terminal
## state (as an integer from actionlib_msgs/GoalStatus) and the
## result.
##
## @param active_cb No-parameter callback that gets called on transitions to Active.
##
## @param feedback_cb Callback that gets called whenever feedback
## for this goal is received. Takes one parameter: the feedback.
def send_goal(self, goal, done_cb = None, active_cb = None, feedback_cb = None):
# destroys the old goal handle
self.stop_tracking_goal()
self.done_cb = done_cb
self.active_cb = active_cb
self.feedback_cb = feedback_cb
self.simple_state = SimpleGoalState.PENDING
self.gh = self.action_client.send_goal(goal, self._handle_transition, self._handle_feedback)
## @brief Sends a goal to the ActionServer, waits for the goal to complete, and preempts goal is necessary
##
## If a previous goal is already active when this is called. We simply forget
## about that goal and start tracking the new goal. No cancel requests are made.
##
## If the goal does not complete within the execute_timeout, the goal gets preempted
##
## If preemption of the goal does not complete withing the preempt_timeout, this
## method simply returns
##
## @param execute_timeout The time to wait for the goal to complete
##
## @param preempt_timeout The time to wait for preemption to complete
##
## @return The goal's state.
def send_goal_and_wait(self, goal, execute_timeout = rospy.Duration(), preempt_timeout = rospy.Duration()):
self.send_goal(goal)
if not self.wait_for_result(execute_timeout):
# preempt action
rospy.logdebug("Canceling goal")
self.cancel_goal()
if self.wait_for_result(preempt_timeout):
rospy.logdebug("Preempt finished within specified preempt_timeout [%.2f]", preempt_timeout.to_sec());
else:
rospy.logdebug("Preempt didn't finish specified preempt_timeout [%.2f]", preempt_timeout.to_sec());
return self.get_state()
## @brief Blocks until this goal transitions to done
## @param timeout Max time to block before returning. A zero timeout is interpreted as an infinite timeout.
## @return True if the goal finished. False if the goal didn't finish within the allocated timeout
def wait_for_result(self, timeout = rospy.Duration()):
if not self.gh:
rospy.logerr("Called wait_for_goal_to_finish when no goal exists")
return False
timeout_time = rospy.get_rostime() + timeout
loop_period = rospy.Duration(0.1)
with self.done_condition:
while not rospy.is_shutdown():
time_left = timeout_time - rospy.get_rostime()
if timeout > rospy.Duration(0.0) and time_left <= rospy.Duration(0.0):
break
if self.simple_state == SimpleGoalState.DONE:
break
if time_left > loop_period or timeout == rospy.Duration():
time_left = loop_period
self.done_condition.wait(time_left.to_sec())
return self.simple_state == SimpleGoalState.DONE
## @brief Gets the Result of the current goal
def get_result(self):
if not self.gh:
rospy.logerr("Called get_result when no goal is running")
return None
return self.gh.get_result()
## @brief Get the state information for this goal
##
## Possible States Are: PENDING, ACTIVE, RECALLED, REJECTED,
## PREEMPTED, ABORTED, SUCCEEDED, LOST.
##
## @return The goal's state. Returns LOST if this
## SimpleActionClient isn't tracking a goal.
def get_state(self):
if not self.gh:
rospy.logerr("Called get_state when no goal is running")
return GoalStatus.LOST
status = self.gh.get_goal_status()
if status == GoalStatus.RECALLING:
status = GoalStatus.PENDING
elif status == GoalStatus.PREEMPTING:
status = GoalStatus.ACTIVE
return status
## @brief Returns the current status text of the goal.
##
## The text is sent by the action server. It is designed to
## help debugging issues on the server side.
##
## @return The current status text of the goal.
def get_goal_status_text(self):
if not self.gh:
rospy.logerr("Called get_goal_status_text when no goal is running")
return "ERROR: Called get_goal_status_text when no goal is running"
return self.gh.get_goal_status_text()
## @brief Cancels all goals currently running on the action server
##
## This preempts all goals running on the action server at the point that
## this message is serviced by the ActionServer.
def cancel_all_goals(self):
self.action_client.cancel_all_goals()
## @brief Cancels all goals prior to a given timestamp
##
## This preempts all goals running on the action server for which the
## time stamp is earlier than the specified time stamp
## this message is serviced by the ActionServer.
def cancel_goals_at_and_before_time(self, time):
self.action_client.cancel_goals_at_and_before_time(time)
## @brief Cancels the goal that we are currently pursuing
def cancel_goal(self):
if self.gh:
self.gh.cancel()
## @brief Stops tracking the state of the current goal. Unregisters this goal's callbacks
##
## This is useful if we want to make sure we stop calling our callbacks before sending a new goal.
## Note that this does not cancel the goal, it simply stops looking for status info about this goal.
def stop_tracking_goal(self):
self.gh = None
def _handle_transition(self, gh):
comm_state = gh.get_comm_state()
error_msg = "Received comm state %s when in simple state %s with SimpleActionClient in NS %s" % \
(CommState.to_string(comm_state), SimpleGoalState.to_string(self.simple_state), rospy.resolve_name(self.action_client.ns))
if comm_state == CommState.ACTIVE:
if self.simple_state == SimpleGoalState.PENDING:
self._set_simple_state(SimpleGoalState.ACTIVE)
if self.active_cb:
self.active_cb()
elif self.simple_state == SimpleGoalState.DONE:
rospy.logerr(error_msg)
elif comm_state == CommState.RECALLING:
if self.simple_state != SimpleGoalState.PENDING:
rospy.logerr(error_msg)
elif comm_state == CommState.PREEMPTING:
if self.simple_state == SimpleGoalState.PENDING:
self._set_simple_state(SimpleGoalState.ACTIVE)
if self.active_cb:
self.active_cb()
elif self.simple_state == SimpleGoalState.DONE:
rospy.logerr(error_msg)
elif comm_state == CommState.DONE:
if self.simple_state in [SimpleGoalState.PENDING, SimpleGoalState.ACTIVE]:
self._set_simple_state(SimpleGoalState.DONE)
if self.done_cb:
self.done_cb(gh.get_goal_status(), gh.get_result())
with self.done_condition:
self.done_condition.notifyAll()
elif self.simple_state == SimpleGoalState.DONE:
rospy.logerr("SimpleActionClient received DONE twice")
def _handle_feedback(self, gh, feedback):
if not self.gh:
rospy.logerr("Got a feedback callback when we're not tracking a goal. (id: %s)" % \
gh.comm_state_machine.action_goal.goal_id.id)
return
if gh != self.gh:
rospy.logerr("Got a feedback callback on a goal handle that we're not tracking. %s vs %s" % \
(self.gh.comm_state_machine.action_goal.goal_id.id,
gh.comm_state_machine.action_goal.goal_id.id))
return
if self.feedback_cb:
self.feedback_cb(feedback)
def _set_simple_state(self, state):
self.simple_state = state
| 0 |
apollo_public_repos/apollo-platform/ros/actionlib/src | apollo_public_repos/apollo-platform/ros/actionlib/src/actionlib/action_client.py | #! /usr/bin/env python
# Copyright (c) 2009, 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, Inc. 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.
# Author: Stuart Glaser
'''
Example:
from move_base.msg import *
rospy.init_node('foo')
from move_base.msg import *
from geometry_msgs.msg import *
g1 = MoveBaseGoal(PoseStamped(Header(frame_id = 'base_link'),
Pose(Point(2, 0, 0),
Quaternion(0, 0, 0, 1))))
g2 = MoveBaseGoal(PoseStamped(Header(frame_id = 'base_link'),
Pose(Point(5, 0, 0),
Quaternion(0, 0, 0, 1))))
client = ActionClient('move_base', MoveBaseAction)
h1 = client.send_goal(g1)
h2 = client.send_goal(g2)
client.cancel_all_goals()
'''
import threading
import weakref
import time
import rospy
from rospy import Header
from actionlib_msgs.msg import *
from actionlib.exceptions import *
g_goal_id = 1
def get_name_of_constant(C, n):
for k, v in C.__dict__.items():
if type(v) is int and v == n:
return k
return "NO_SUCH_STATE_%d" % n
class CommState(object):
WAITING_FOR_GOAL_ACK = 0
PENDING = 1
ACTIVE = 2
WAITING_FOR_RESULT = 3
WAITING_FOR_CANCEL_ACK = 4
RECALLING = 5
PREEMPTING = 6
DONE = 7
LOST = 8
class TerminalState(object):
RECALLED = GoalStatus.RECALLED
REJECTED = GoalStatus.REJECTED
PREEMPTED = GoalStatus.PREEMPTED
ABORTED = GoalStatus.ABORTED
SUCCEEDED = GoalStatus.SUCCEEDED
LOST = GoalStatus.LOST
GoalStatus.to_string = classmethod(get_name_of_constant)
CommState.to_string = classmethod(get_name_of_constant)
TerminalState.to_string = classmethod(get_name_of_constant)
def _find_status_by_goal_id(status_array, id):
for s in status_array.status_list:
if s.goal_id.id == id:
return s
return None
## @brief Client side handle to monitor goal progress.
##
## A ClientGoalHandle is a reference counted object that is used to
## manipulate and monitor the progress of an already dispatched
## goal. Once all the goal handles go out of scope (or are reset), an
## ActionClient stops maintaining state for that goal.
class ClientGoalHandle:
## @brief Internal use only
##
## ClientGoalHandle objects should be created by the action
## client. You should never need to construct one yourself.
def __init__(self, comm_state_machine):
self.comm_state_machine = comm_state_machine
#print "GH created. id = %.3f" % self.comm_state_machine.action_goal.goal_id.stamp.to_sec()
## @brief True iff the two ClientGoalHandle's are tracking the same goal
def __eq__(self, o):
if not o:
return False
return self.comm_state_machine == o.comm_state_machine
## @brief True iff the two ClientGoalHandle's are tracking different goals
def __ne__(self, o):
if not o:
return True
return not (self.comm_state_machine == o.comm_state_machine)
## @brieft Hash function for ClientGoalHandle
def __hash__(self):
return hash(self.comm_state_machine)
## @brief Sends a cancel message for this specific goal to the ActionServer.
##
## Also transitions the client state to WAITING_FOR_CANCEL_ACK
def cancel(self):
with self.comm_state_machine.mutex:
cancel_msg = GoalID(stamp = rospy.Time(0),
id = self.comm_state_machine.action_goal.goal_id.id)
self.comm_state_machine.send_cancel_fn(cancel_msg)
self.comm_state_machine.transition_to(CommState.WAITING_FOR_CANCEL_ACK)
## @brief Get the state of this goal's communication state machine from interaction with the server
##
## Possible States are: WAITING_FOR_GOAL_ACK, PENDING, ACTIVE, WAITING_FOR_RESULT,
## WAITING_FOR_CANCEL_ACK, RECALLING, PREEMPTING, DONE
##
## @return The current goal's communication state with the server
def get_comm_state(self):
if not self.comm_state_machine:
rospy.logerr("Trying to get_comm_state on an inactive ClientGoalHandle.")
return CommState.LOST
return self.comm_state_machine.state
## @brief Returns the current status of the goal.
##
## Possible states are listed in the enumeration in the
## actionlib_msgs/GoalStatus message.
##
## @return The current status of the goal.
def get_goal_status(self):
if not self.comm_state_machine:
rospy.logerr("Trying to get_goal_status on an inactive ClientGoalHandle.")
return GoalStatus.PENDING
return self.comm_state_machine.latest_goal_status.status
## @brief Returns the current status text of the goal.
##
## The text is sent by the action server.
##
## @return The current status text of the goal.
def get_goal_status_text(self):
if not self.comm_state_machine:
rospy.logerr("Trying to get_goal_status_text on an inactive ClientGoalHandle.")
return "ERROR: Trying to get_goal_status_text on an inactive ClientGoalHandle."
return self.comm_state_machine.latest_goal_status.text
## @brief Gets the result produced by the action server for this goal.
##
## @return None if no result was receieved. Otherwise the goal's result as a *Result message.
def get_result(self):
if not self.comm_state_machine:
rospy.logerr("Trying to get_result on an inactive ClientGoalHandle.")
return None
if not self.comm_state_machine.latest_result:
#rospy.logerr("Trying to get_result on a ClientGoalHandle when no result has been received.")
return None
return self.comm_state_machine.latest_result.result
## @brief Gets the terminal state information for this goal.
##
## Possible States Are: RECALLED, REJECTED, PREEMPTED, ABORTED, SUCCEEDED, LOST
## This call only makes sense if CommState==DONE. This will send ROS_WARNs if we're not in DONE
##
## @return The terminal state as an integer from the GoalStatus message.
def get_terminal_state(self):
if not self.comm_state_machine:
rospy.logerr("Trying to get_terminal_state on an inactive ClientGoalHandle.")
return GoalStatus.LOST
with self.comm_state_machine.mutex:
if self.comm_state_machine.state != CommState.DONE:
rospy.logwarn("Asking for the terminal state when we're in [%s]",
CommState.to_string(self.comm_state_machine.state))
goal_status = self.comm_state_machine.latest_goal_status.status
if goal_status in [GoalStatus.PREEMPTED, GoalStatus.SUCCEEDED,
GoalStatus.ABORTED, GoalStatus.REJECTED,
GoalStatus.RECALLED, GoalStatus.LOST]:
return goal_status
rospy.logerr("Asking for a terminal state, but the goal status is %d", goal_status)
return GoalStatus.LOST
NO_TRANSITION = -1
INVALID_TRANSITION = -2
_transitions = {
CommState.WAITING_FOR_GOAL_ACK: {
GoalStatus.PENDING: CommState.PENDING,
GoalStatus.ACTIVE: CommState.ACTIVE,
GoalStatus.REJECTED: (CommState.PENDING, CommState.WAITING_FOR_RESULT),
GoalStatus.RECALLING: (CommState.PENDING, CommState.RECALLING),
GoalStatus.RECALLED: (CommState.PENDING, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTED: (CommState.ACTIVE, CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.SUCCEEDED: (CommState.ACTIVE, CommState.WAITING_FOR_RESULT),
GoalStatus.ABORTED: (CommState.ACTIVE, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTING: (CommState.ACTIVE, CommState.PREEMPTING) },
CommState.PENDING: {
GoalStatus.PENDING: NO_TRANSITION,
GoalStatus.ACTIVE: CommState.ACTIVE,
GoalStatus.REJECTED: CommState.WAITING_FOR_RESULT,
GoalStatus.RECALLING: CommState.RECALLING,
GoalStatus.RECALLED: (CommState.RECALLING, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTED: (CommState.ACTIVE, CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.SUCCEEDED: (CommState.ACTIVE, CommState.WAITING_FOR_RESULT),
GoalStatus.ABORTED: (CommState.ACTIVE, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTING: (CommState.ACTIVE, CommState.PREEMPTING) },
CommState.ACTIVE: {
GoalStatus.PENDING: INVALID_TRANSITION,
GoalStatus.ACTIVE: NO_TRANSITION,
GoalStatus.REJECTED: INVALID_TRANSITION,
GoalStatus.RECALLING: INVALID_TRANSITION,
GoalStatus.RECALLED: INVALID_TRANSITION,
GoalStatus.PREEMPTED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.SUCCEEDED: CommState.WAITING_FOR_RESULT,
GoalStatus.ABORTED: CommState.WAITING_FOR_RESULT,
GoalStatus.PREEMPTING: CommState.PREEMPTING },
CommState.WAITING_FOR_RESULT: {
GoalStatus.PENDING: INVALID_TRANSITION,
GoalStatus.ACTIVE: NO_TRANSITION,
GoalStatus.REJECTED: NO_TRANSITION,
GoalStatus.RECALLING: INVALID_TRANSITION,
GoalStatus.RECALLED: NO_TRANSITION,
GoalStatus.PREEMPTED: NO_TRANSITION,
GoalStatus.SUCCEEDED: NO_TRANSITION,
GoalStatus.ABORTED: NO_TRANSITION,
GoalStatus.PREEMPTING: INVALID_TRANSITION },
CommState.WAITING_FOR_CANCEL_ACK: {
GoalStatus.PENDING: NO_TRANSITION,
GoalStatus.ACTIVE: NO_TRANSITION,
GoalStatus.REJECTED: CommState.WAITING_FOR_RESULT,
GoalStatus.RECALLING: CommState.RECALLING,
GoalStatus.RECALLED: (CommState.RECALLING, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.SUCCEEDED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.ABORTED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTING: CommState.PREEMPTING },
CommState.RECALLING: {
GoalStatus.PENDING: INVALID_TRANSITION,
GoalStatus.ACTIVE: INVALID_TRANSITION,
GoalStatus.REJECTED: CommState.WAITING_FOR_RESULT,
GoalStatus.RECALLING: NO_TRANSITION,
GoalStatus.RECALLED: CommState.WAITING_FOR_RESULT,
GoalStatus.PREEMPTED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.SUCCEEDED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.ABORTED: (CommState.PREEMPTING, CommState.WAITING_FOR_RESULT),
GoalStatus.PREEMPTING: CommState.PREEMPTING },
CommState.PREEMPTING: {
GoalStatus.PENDING: INVALID_TRANSITION,
GoalStatus.ACTIVE: INVALID_TRANSITION,
GoalStatus.REJECTED: INVALID_TRANSITION,
GoalStatus.RECALLING: INVALID_TRANSITION,
GoalStatus.RECALLED: INVALID_TRANSITION,
GoalStatus.PREEMPTED: CommState.WAITING_FOR_RESULT,
GoalStatus.SUCCEEDED: CommState.WAITING_FOR_RESULT,
GoalStatus.ABORTED: CommState.WAITING_FOR_RESULT,
GoalStatus.PREEMPTING: NO_TRANSITION },
CommState.DONE: {
GoalStatus.PENDING: INVALID_TRANSITION,
GoalStatus.ACTIVE: INVALID_TRANSITION,
GoalStatus.REJECTED: NO_TRANSITION,
GoalStatus.RECALLING: INVALID_TRANSITION,
GoalStatus.RECALLED: NO_TRANSITION,
GoalStatus.PREEMPTED: NO_TRANSITION,
GoalStatus.SUCCEEDED: NO_TRANSITION,
GoalStatus.ABORTED: NO_TRANSITION,
GoalStatus.PREEMPTING: INVALID_TRANSITION } }
class CommStateMachine:
def __init__(self, action_goal, transition_cb, feedback_cb, send_goal_fn, send_cancel_fn):
self.action_goal = action_goal
self.transition_cb = transition_cb
self.feedback_cb = feedback_cb
self.send_goal_fn = send_goal_fn
self.send_cancel_fn = send_cancel_fn
self.state = CommState.WAITING_FOR_GOAL_ACK
self.mutex = threading.RLock()
self.latest_goal_status = GoalStatus(status = GoalStatus.PENDING)
self.latest_result = None
def __eq__(self, o):
return self.action_goal.goal_id.id == o.action_goal.goal_id.id
## @brieft Hash function for CommStateMachine
def __hash__(self):
return hash(self.action_goal.goal_id.id)
def set_state(self, state):
rospy.logdebug("Transitioning CommState from %s to %s",
CommState.to_string(self.state), CommState.to_string(state))
self.state = state
##
## @param gh ClientGoalHandle
## @param status_array actionlib_msgs/GoalStatusArray
def update_status(self, status_array):
with self.mutex:
if self.state == CommState.DONE:
return
status = _find_status_by_goal_id(status_array, self.action_goal.goal_id.id)
# You mean you haven't heard of me?
if not status:
if self.state not in [CommState.WAITING_FOR_GOAL_ACK,
CommState.WAITING_FOR_RESULT,
CommState.DONE]:
self._mark_as_lost()
return
self.latest_goal_status = status
# Determines the next state from the lookup table
if self.state not in _transitions:
rospy.logerr("CommStateMachine is in a funny state: %i" % self.state)
return
if status.status not in _transitions[self.state]:
rospy.logerr("Got an unknown status from the ActionServer: %i" % status.status)
return
next_state = _transitions[self.state][status.status]
# Knowing the next state, what should we do?
if next_state == NO_TRANSITION:
pass
elif next_state == INVALID_TRANSITION:
rospy.logerr("Invalid goal status transition from %s to %s" %
(CommState.to_string(self.state), GoalStatus.to_string(status.status)))
else:
if hasattr(next_state, '__getitem__'):
for s in next_state:
self.transition_to(s)
else:
self.transition_to(next_state)
def transition_to(self, state):
rospy.logdebug("Transitioning to %s (from %s, goal: %s)",
CommState.to_string(state), CommState.to_string(self.state),
self.action_goal.goal_id.id)
self.state = state
if self.transition_cb:
self.transition_cb(ClientGoalHandle(self))
def _mark_as_lost(self):
self.latest_goal_status.status = GoalStatus.LOST
self.transition_to(CommState.DONE)
def update_result(self, action_result):
# Might not be for us
if self.action_goal.goal_id.id != action_result.status.goal_id.id:
return
with self.mutex:
self.latest_goal_status = action_result.status
self.latest_result = action_result
if self.state in [CommState.WAITING_FOR_GOAL_ACK,
CommState.WAITING_FOR_CANCEL_ACK,
CommState.PENDING,
CommState.ACTIVE,
CommState.WAITING_FOR_RESULT,
CommState.RECALLING,
CommState.PREEMPTING]:
# Stuffs the goal status in the result into a GoalStatusArray
status_array = GoalStatusArray()
status_array.status_list.append(action_result.status)
self.update_status(status_array)
self.transition_to(CommState.DONE)
elif self.state == CommState.DONE:
rospy.logerr("Got a result when we were already in the DONE state")
else:
rospy.logerr("In a funny state: %i" % self.state)
def update_feedback(self, action_feedback):
# Might not be for us
if self.action_goal.goal_id.id != action_feedback.status.goal_id.id:
return
#with self.mutex:
if self.feedback_cb and self.state != CommState.DONE:
self.feedback_cb(ClientGoalHandle(self), action_feedback.feedback)
class GoalManager:
# statuses - a list of weak references to CommStateMachine objects
def __init__(self, ActionSpec):
self.list_mutex = threading.RLock()
self.statuses = []
self.send_goal_fn = None
try:
a = ActionSpec()
self.ActionSpec = ActionSpec
self.ActionGoal = type(a.action_goal)
self.ActionResult = type(a.action_result)
self.ActionFeedback = type(a.action_feedback)
except AttributeError:
raise ActionException("Type is not an action spec: %s" % str(ActionSpec))
def _generate_id(self):
global g_goal_id
id, g_goal_id = g_goal_id, g_goal_id + 1
now = rospy.Time.now()
return GoalID(id = "%s-%i-%.3f" % \
(rospy.get_caller_id(), id, now.to_sec()), stamp = now)
def register_send_goal_fn(self, fn):
self.send_goal_fn = fn
def register_cancel_fn(self, fn):
self.cancel_fn = fn
## Sends off a goal and starts tracking its status.
##
## @return ClientGoalHandle for the sent goal.
def init_goal(self, goal, transition_cb = None, feedback_cb = None):
action_goal = self.ActionGoal(header = Header(),
goal_id = self._generate_id(),
goal = goal)
action_goal.header.stamp = rospy.get_rostime()
csm = CommStateMachine(action_goal, transition_cb, feedback_cb,
self.send_goal_fn, self.cancel_fn)
with self.list_mutex:
self.statuses.append(weakref.ref(csm))
self.send_goal_fn(action_goal)
return ClientGoalHandle(csm)
# Pulls out the statuses that are still live (creating strong
# references to them)
def _get_live_statuses(self):
with self.list_mutex:
live_statuses = [r() for r in self.statuses]
live_statuses = filter(lambda x: x, live_statuses)
return live_statuses
## Updates the statuses of all goals from the information in status_array.
##
## @param status_array (\c actionlib_msgs/GoalStatusArray)
def update_statuses(self, status_array):
live_statuses = []
with self.list_mutex:
# Garbage collects dead status objects
self.statuses = [r for r in self.statuses if r()]
for status in self._get_live_statuses():
status.update_status(status_array)
def update_results(self, action_result):
for status in self._get_live_statuses():
status.update_result(action_result)
def update_feedbacks(self, action_feedback):
for status in self._get_live_statuses():
status.update_feedback(action_feedback)
class ActionClient:
## @brief Constructs an ActionClient and opens connections to an ActionServer.
##
## @param ns The namespace in which to access the action. For
## example, the "goal" topic should occur under ns/goal
##
## @param ActionSpec The *Action message type. The ActionClient
## will grab the other message types from this type.
def __init__(self, ns, ActionSpec):
self.ns = ns
self.last_status_msg = None
try:
a = ActionSpec()
self.ActionSpec = ActionSpec
self.ActionGoal = type(a.action_goal)
self.ActionResult = type(a.action_result)
self.ActionFeedback = type(a.action_feedback)
except AttributeError:
raise ActionException("Type is not an action spec: %s" % str(ActionSpec))
self.pub_goal = rospy.Publisher(rospy.remap_name(ns) + '/goal', self.ActionGoal, queue_size=10)
self.pub_cancel = rospy.Publisher(rospy.remap_name(ns) + '/cancel', GoalID, queue_size=10)
self.manager = GoalManager(ActionSpec)
self.manager.register_send_goal_fn(self.pub_goal.publish)
self.manager.register_cancel_fn(self.pub_cancel.publish)
self.status_sub = rospy.Subscriber(rospy.remap_name(ns) + '/status', GoalStatusArray, self._status_cb)
self.result_sub = rospy.Subscriber(rospy.remap_name(ns) + '/result', self.ActionResult, self._result_cb)
self.feedback_sub = rospy.Subscriber(rospy.remap_name(ns) + '/feedback', self.ActionFeedback, self._feedback_cb)
## @brief Sends a goal to the action server
##
## @param goal An instance of the *Goal message.
##
## @param transition_cb Callback that gets called on every client
## state transition for the sent goal. It should take in a
## ClientGoalHandle as an argument.
##
## @param feedback_cb Callback that gets called every time
## feedback is received for the sent goal. It takes two
## parameters: a ClientGoalHandle and an instance of the *Feedback
## message.
##
## @return ClientGoalHandle for the sent goal.
def send_goal(self, goal, transition_cb = None, feedback_cb = None):
return self.manager.init_goal(goal, transition_cb, feedback_cb)
## @brief Cancels all goals currently running on the action server.
##
## Preempts all goals running on the action server at the point
## that the cancel message is serviced by the action server.
def cancel_all_goals(self):
cancel_msg = GoalID(stamp = rospy.Time.from_sec(0.0),
id = "")
self.pub_cancel.publish(cancel_msg)
## @brief Cancels all goals prior to a given timestamp
##
## This preempts all goals running on the action server for which the
## time stamp is earlier than the specified time stamp
## this message is serviced by the ActionServer.
def cancel_goals_at_and_before_time(self, time):
cancel_msg = GoalID(stamp = time, id = "")
self.pub_cancel.publish(cancel_msg)
## @brief [Deprecated] Use wait_for_server
def wait_for_action_server_to_start(self, timeout = rospy.Duration(0.0)):
return self.wait_for_server(timeout)
## @brief Waits for the ActionServer to connect to this client
##
## Often, it can take a second for the action server & client to negotiate
## a connection, thus, risking the first few goals to be dropped. This call lets
## the user wait until the network connection to the server is negotiated
def wait_for_server(self, timeout = rospy.Duration(0.0)):
started = False
timeout_time = rospy.get_rostime() + timeout
while not rospy.is_shutdown():
if self.last_status_msg:
server_id = self.last_status_msg._connection_header['callerid']
if self.pub_goal.impl.has_connection(server_id) and \
self.pub_cancel.impl.has_connection(server_id):
#We'll also check that all of the subscribers have at least
#one publisher, this isn't a perfect check, but without
#publisher callbacks... it'll have to do
status_num_pubs = 0
for stat in self.status_sub.impl.get_stats()[1]:
if stat[4]:
status_num_pubs += 1
result_num_pubs = 0
for stat in self.result_sub.impl.get_stats()[1]:
if stat[4]:
result_num_pubs += 1
feedback_num_pubs = 0
for stat in self.feedback_sub.impl.get_stats()[1]:
if stat[4]:
feedback_num_pubs += 1
if status_num_pubs > 0 and result_num_pubs > 0 and feedback_num_pubs > 0:
started = True
break
if timeout != rospy.Duration(0.0) and rospy.get_rostime() >= timeout_time:
break
time.sleep(0.01)
return started
def _status_cb(self, msg):
self.last_status_msg = msg
self.manager.update_statuses(msg)
def _result_cb(self, msg):
self.manager.update_results(msg)
def _feedback_cb(self, msg):
self.manager.update_feedbacks(msg)
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/index.rst | tf2
=====
This is the Python API reference of the tf2 package.
.. toctree::
:maxdepth: 2
tf2
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/CMakeLists.txt | cmake_minimum_required(VERSION 2.8.3)
project(tf2)
find_package(console_bridge REQUIRED)
find_package(catkin REQUIRED COMPONENTS geometry_msgs rostime tf2_msgs)
find_package(Boost REQUIRED COMPONENTS signals system thread)
catkin_package(
INCLUDE_DIRS include
LIBRARIES tf2
DEPENDS console_bridge
CATKIN_DEPENDS geometry_msgs tf2_msgs rostime)
include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS})
include_directories (src/bt)
# export user definitions
#CPP Libraries
add_library(tf2 src/cache.cpp src/buffer_core.cpp src/static_cache.cpp)
target_link_libraries(tf2 ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${console_bridge_LIBRARIES})
add_dependencies(tf2 tf2_msgs_gencpp)
install(TARGETS tf2
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
# Tests
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(test_cache_unittest test/cache_unittest.cpp)
target_link_libraries(test_cache_unittest tf2 ${console_bridge_LIBRARIES})
add_dependencies(test_cache_unittest tf2_msgs_gencpp)
catkin_add_gtest(test_static_cache_unittest test/static_cache_test.cpp)
target_link_libraries(test_static_cache_unittest tf2 ${console_bridge_LIBRARIES})
add_dependencies(test_static_cache_unittest tf2_msgs_gencpp)
catkin_add_gtest(test_simple test/simple_tf2_core.cpp)
target_link_libraries(test_simple tf2 ${console_bridge_LIBRARIES})
add_dependencies(test_simple tf2_msgs_gencpp)
add_executable(speed_test EXCLUDE_FROM_ALL test/speed_test.cpp)
target_link_libraries(speed_test tf2 ${console_bridge_LIBRARIES})
add_dependencies(tests speed_test)
add_dependencies(tests tf2_msgs_gencpp)
endif()
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/package.xml | <package>
<name>tf2</name>
<version>0.5.13</version>
<description>
tf2 is the second generation of the transform library, which lets
the user keep track of multiple coordinate frames over time. tf2
maintains the relationship between coordinate frames in a tree
structure buffered in time, and lets the user transform points,
vectors, etc between any two coordinate frames at any desired
point in time.
</description>
<author>Tully Foote</author>
<author>Eitan Marder-Eppstein</author>
<author>Wim Meeussen</author>
<maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer>
<license>BSD</license>
<url type="website">http://www.ros.org/wiki/tf2</url>
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
<build_depend>libconsole-bridge-dev</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>rostime</build_depend>
<build_depend>tf2_msgs</build_depend>
<run_depend>libconsole-bridge-dev</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>rostime</run_depend>
<run_depend>tf2_msgs</run_depend>
</package>
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/mainpage.dox | /**
\mainpage
\htmlinclude manifest.html
\b tf2 is the second generation of the tf library.
This library implements the interface defined by
tf2::BufferCore
There is also a python wrapper with the same API.
\section codeapi Code API
The main interface is through the tf2::BufferCore interface.
It uses the exceptions in exceptions.h and the Stamped datatype
in transform_datatypes.h.
*/
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/.tar | {!!python/unicode 'url': 'https://github.com/ros-gbp/geometry2-release/archive/release/indigo/tf2/0.5.13-0.tar.gz',
!!python/unicode 'version': geometry2-release-release-indigo-tf2-0.5.13-0}
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/CHANGELOG.rst | ^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package tf2
^^^^^^^^^^^^^^^^^^^^^^^^^
0.5.13 (2016-03-04)
-------------------
0.5.12 (2015-08-05)
-------------------
* add utilities to get yaw, pitch, roll and identity transform
* provide more conversions between types
The previous conversion always assumed that it was converting a
non-message type to a non-message type. Now, one, both or none
can be a message or a non-message.
* Contributors: Vincent Rabaud
0.5.11 (2015-04-22)
-------------------
0.5.10 (2015-04-21)
-------------------
* move lct_cache into function local memoryfor `#92 <https://github.com/ros/geometry_experimental/issues/92>`_
* Clean up range checking. Re: `#92 <https://github.com/ros/geometry_experimental/issues/92>`_
* Fixed chainToVector
* release lock before possibly invoking user callbacks. Fixes `#91 <https://github.com/ros/geometry_experimental/issues/91>`_
* Contributors: Jackie Kay, Tully Foote
0.5.9 (2015-03-25)
------------------
* fixing edge case where two no frame id lookups matched in getLatestCommonTime
* Contributors: Tully Foote
0.5.8 (2015-03-17)
------------------
* change from default argument to overload to avoid linking issue `#84 <https://github.com/ros/geometry_experimental/issues/84>`_
* remove useless Makefile files
* Remove unused assignments in max/min functions
* change _allFramesAsDot() -> _allFramesAsDot(double current_time)
* Contributors: Jon Binney, Kei Okada, Tully Foote, Vincent Rabaud
0.5.7 (2014-12-23)
------------------
0.5.6 (2014-09-18)
------------------
0.5.5 (2014-06-23)
------------------
* convert to use console bridge from upstream debian package https://github.com/ros/rosdistro/issues/4633
* Fix format string
* Contributors: Austin, Tully Foote
0.5.4 (2014-05-07)
------------------
* switch to boost signals2 following `ros/ros_comm#267 <https://github.com/ros/ros_comm/issues/267>`_, blocking `ros/geometry#23 <https://github.com/ros/geometry/issues/23>`_
* Contributors: Tully Foote
0.5.3 (2014-02-21)
------------------
0.5.2 (2014-02-20)
------------------
0.5.1 (2014-02-14)
------------------
0.5.0 (2014-02-14)
------------------
0.4.10 (2013-12-26)
-------------------
* updated error message. fixes `#38 <https://github.com/ros/geometry_experimental/issues/38>`_
* tf2: add missing console bridge include directories (fix `#48 <https://github.com/ros/geometry_experimental/issues/48>`_)
* Fix const correctness of tf2::Vector3 rotate() method
The method does not modify the class thus should be const.
This has already been fixed in Bullet itself.
* Contributors: Dirk Thomas, Timo Rohling, Tully Foote
0.4.9 (2013-11-06)
------------------
0.4.8 (2013-11-06)
------------------
* moving python documentation to tf2_ros from tf2 to follow the code
* removing legacy rospy dependency. implementation removed in 0.4.0 fixes `#27 <https://github.com/ros/geometry_experimental/issues/27>`_
0.4.7 (2013-08-28)
------------------
* switching to use allFramesAsStringNoLock inside of getLatestCommonTime and walkToParent and locking in public API _getLatestCommonTime instead re `#23 <https://github.com/ros/geometry_experimental/issues/23>`_
* Fixes a crash in tf's view_frames related to dot code generation in allFramesAsDot
0.4.6 (2013-08-28)
------------------
* cleaner fix for `#19 <https://github.com/ros/geometry_experimental/issues/19>`_
* fix pointer initialization. Fixes `#19 <https://github.com/ros/geometry_experimental/issues/19>`_
* fixes `#18 <https://github.com/ros/geometry_experimental/issues/18>`_ for hydro
* package.xml: corrected typo in description
0.4.5 (2013-07-11)
------------------
* adding _chainAsVector method for https://github.com/ros/geometry/issues/18
* adding _allFramesAsDot for backwards compatability https://github.com/ros/geometry/issues/18
0.4.4 (2013-07-09)
------------------
* making repo use CATKIN_ENABLE_TESTING correctly and switching rostest to be a test_depend with that change.
* tf2: Fixes a warning on OS X, but generally safer
Replaces the use of pointers with shared_ptrs,
this allows the polymorphism and makes it so that
the compiler doesn't yell at us about calling
delete on a class with a public non-virtual
destructor.
* tf2: Fixes compiler warnings on OS X
This exploited a gcc specific extension and is not
C++ standard compliant. There used to be a "fix"
for OS X which no longer applies. I think it is ok
to use this as an int instead of a double, but
another way to fix it would be to use a define.
* tf2: Fixes linkedit errors on OS X
0.4.3 (2013-07-05)
------------------
0.4.2 (2013-07-05)
------------------
* adding getCacheLength() to parallel old tf API
* removing legacy static const variable MAX_EXTRAPOLATION_DISTANCE copied from tf unnecessesarily
0.4.1 (2013-07-05)
------------------
* adding old style callback notifications to BufferCore to enable backwards compatability of message filters
* exposing dedicated thread logic in BufferCore and checking in Buffer
* more methods to expose, and check for empty cache before getting latest timestamp
* adding methods to enable backwards compatability for passing through to tf::Transformer
0.4.0 (2013-06-27)
------------------
* splitting rospy dependency into tf2_py so tf2 is pure c++ library.
* switching to console_bridge from rosconsole
* moving convert methods back into tf2 because it does not have any ros dependencies beyond ros::Time which is already a dependency of tf2
* Cleaning up unnecessary dependency on roscpp
* Cleaning up packaging of tf2 including:
removing unused nodehandle
fixing overmatch on search and replace
cleaning up a few dependencies and linking
removing old backup of package.xml
making diff minimally different from tf version of library
* suppressing bullet LinearMath copy inside of tf2, so it will not collide, and should not be used externally.
* Restoring test packages and bullet packages.
reverting 3570e8c42f9b394ecbfd9db076b920b41300ad55 to get back more of the packages previously implemented
reverting 04cf29d1b58c660fdc999ab83563a5d4b76ab331 to fix `#7 <https://github.com/ros/geometry_experimental/issues/7>`_
* fixing includes in unit tests
* Make PythonLibs find_package python2 specific
On systems with python 3 installed and default, find_package(PythonLibs) will find the python 3 paths and libraries. However, the c++ include structure seems to be different in python 3 and tf2 uses includes that are no longer present or deprecated.
Until the includes are made to be python 3 compliant, we should specify that the version of python found must be python 2.
0.3.6 (2013-03-03)
------------------
0.3.5 (2013-02-15 14:46)
------------------------
* 0.3.4 -> 0.3.5
0.3.4 (2013-02-15 13:14)
------------------------
* 0.3.3 -> 0.3.4
* moving LinearMath includes to include/tf2
0.3.3 (2013-02-15 11:30)
------------------------
* 0.3.2 -> 0.3.3
* fixing include installation of tf2
0.3.2 (2013-02-15 00:42)
------------------------
* 0.3.1 -> 0.3.2
* fixed missing include export & tf2_ros dependecy
0.3.1 (2013-02-14)
------------------
* 0.3.0 -> 0.3.1
* fixing PYTHON installation directory
0.3.0 (2013-02-13)
------------------
* switching to version 0.3.0
* adding setup.py to tf2 package
* fixed tf2 exposing python functionality
* removed line that was killing tf2_ros.so
* fixing catkin message dependencies
* removing packages with missing deps
* adding missing package.xml
* adding missing package.xml
* adding missing package.xml
* catkinizing geometry-experimental
* removing bullet headers from use in header files
* removing bullet headers from use in header files
* merging my recent changes
* setting child_frame_id overlooked in revision 6a0eec022be0 which fixed failing tests
* allFramesAsString public and internal methods seperated. Public method is locked, private method is not
* fixing another scoped lock
* fixing one scoped lock
* fixing test compilation
* merge
* Error message fix, ros-pkg5085
* Check if target equals to source before validation
* When target_frame == source_frame, just returns an identity transform.
* adding addition ros header includes for strictness
* Fixed optimized lookups with compound transforms
* Fixed problem in tf2 optimized branch. Quaternion multiplication order was incorrect
* fix compilation on 32-bit
* Josh fix: Final inverse transform composition (missed multiplying the sourcd->top vector by the target->top inverse orientation). b44877d2b054
* Josh change: fix first/last time case. 46bf33868e0d
* fix transform accumulation to parent
* fix parent lookup, now works on the real pr2's tree
* move the message filter to tf2_ros
* tf2::MessageFilter + tests. Still need to change it around to pass in a callback queue, since we're being triggered directly from the tf2 buffer
* Don't add the request if the transform is already available. Add some new tests
* working transformable callbacks with a simple (incomplete) test case
* first pass at a transformable callback api, not tested yet
* add interpolation cases
* fix getLatestCommonTime -- no longer returns the latest of any of the times
* Some more optimization -- allow findClosest to inline
* another minor speedup
* Minorly speed up canTransform by not requiring the full data lookup, and only looking up the parent
* Add explicit operator= so that we can see the time in it on a profile graph. Also some minor cleanup
* minor cleanup
* add 3 more cases to the speed test
* Remove use of btTransform at all from transform accumulation, since the conversion to/from is unnecessary, expensive, and can introduce floating point error
* Don't use btTransform as an intermediate when accumulating transforms, as constructing them takes quite a bit of time
* Completely remove lookupLists(). canTransform() now uses the same walking code as lookupTransform(). Also fixed a bug in the static transform publisher test
* Genericise the walk-to-top-parent code in lookupTransform so that it will be able to be used by canTransform as well (minus the cost of actually computing the transform)
* remove id lookup that wasn't doing anything
* Some more optimization:
* Reduce # of TransformStorage copies made in TimeCache::getData()
* Remove use of lookupLists from getLatestCommonTime
* lookupTransform() no longer uses lookupLists unless it's called with Time(0). Removes lots of object construction/destruction due to removal of pushing back on the lists
* Remove CompactFrameID in favor of a typedef
* these mode checks are no longer necessary
* Fix crash when testing extrapolation on the forward transforms
* Update cache unit tests to work with the changes TransformStorage.
Also make sure that BT_USE_DOUBLE_PRECISION is set for tf2.
* remove exposure of time_cache.h from buffer_core.h
* Removed the mutex from TimeCache, as it's unnecessary (BufferCore needs to have its own mutex locked anyway), and this speeds things up by about 20%
Also fixed a number of thread-safety problems
* Optimize test_extrapolation a bit, 25% speedup of lookupTransform
* use a hash map for looking up frame numbers, speeds up lookupTransform by ~8%
* Cache vectors used for looking up transforms. Speeds up lookupTransform by another 10%
* speed up lookupTransform by another 25%
* speed up lookupTransform by another 2x. also reduces the memory footprint of the cache significantly
* sped up lookupTransform by another 2x
* First add of a simple speed test
Sped up lookupTransform 2x
* roscpp dependency explicit, instead of relying on implicit
* static transform tested and working
* tests passing and all throw catches removed too\!
* validating frame_ids up front for lookup exceptions
* working with single base class vector
* tests passing for static storage
* making method private for clarity
* static cache implementation and test
* cleaning up API doc typos
* sphinx docs for Buffer
* new dox mainpage
* update tf2 manifest
* commenting out twist
* Changed cache_time to cache_time_ to follow C++ style guide, also initialized it to actually get things to work
* no more rand in cache tests
* Changing tf2_py.cpp to use underscores instead of camelCase
* removing all old converter functions from transform_datatypes.h
* removing last references to transform_datatypes.h in tf2
* transform conversions internalized
* removing unused datatypes
* copying bullet transform headers into tf2 and breaking bullet dependency
* merge
* removing dependency on tf
* removing include of old tf from tf2
* update doc
* merge
* kdl unittest passing
* Spaces instead of tabs in YAML grrrr
* Adding quotes for parent
* canTransform advanced ported
* Hopefully fixing YAML syntax
* new version of view_frames in new tf2_tools package
* testing new argument validation and catching bug
* Python support for debugging
* merge
* adding validation of frame_ids in queries with warnings and exceptions where appropriate
* Exposing ability to get frames as a string
* A compiling version of YAML debugging interface for BufferCore
* placeholder for tf debug
* fixing tf:: to tf2:: ns issues and stripping slashes on set in tf2 for backwards compatiabily
* Adding a python version of the BufferClient
* moving test to new package
* merging
* working unit test for BufferCore::lookupTransform
* removing unused method test and converting NO_PARENT test to new API
* Adding some comments
* Moving the python bindings for tf2 to the tf2 package from the tf2_py package
* buffercore tests upgraded
* porting tf_unittest while running incrmentally instead of block copy
* BufferCore::clear ported forward
* successfully changed lookupTransform advanced to new version
* switching to new implementation of lookupTransform tests still passing
* compiling lookupTransform new version
* removing tf_prefix from BufferCore. BuferCore is independent of any frame_ids. tf_prefix should be implemented at the ROS API level.
* initializing tf_prefix
* adding missing initialization
* suppressing warnings
* more tests ported
* removing tests for apis not ported forward
* setTransform tests ported
* old tests in new package passing due to backwards dependency. now for the fun, port all 1500 lines :-)
* setTransform working in new framework as well as old
* porting more methods
* more compatability
* bringing in helper functions for buffer_core from tf.h/cpp
* rethrowing to new exceptions
* converting Storage to geometry_msgs::TransformStamped
* removing deprecated useage
* cleaning up includes
* moving all implementations into cpp file
* switching test to new class from old one
* Compiling version of the buffer client
* moving listener to tf_cpp
* removing listener, it should be in another package
* most of listener
* add cantransform implementation
* removing deprecated API usage
* initial import of listener header
* move implementation into library
* 2 tests of buffer
* moving executables back into bin
* compiling again with new design
* rename tfcore to buffercore
* almost compiling version of template code
* compiling tf2_core simple test
* add test to start compiling
* copying in tf_unittest for tf_core testing template
* prototype of tf2_core implemented using old tf.
* first version of template functions
* remove timeouts
* properly naming tf2_core.h from tf_core.h
* working cache test with tf2 lib
* first unit test passing, not yet ported
* tf_core api
* tf2 v2
* aborting port
* moving across time cache tf and datatypes headers
* copying exceptions from tf
* switching to tf2 from tf_core
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/test/static_cache_test.cpp | /*
* 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, Inc. 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 <gtest/gtest.h>
#include <tf2/time_cache.h>
#include <sys/time.h>
#include <stdexcept>
#include <geometry_msgs/TransformStamped.h>
#include <cmath>
using namespace tf2;
void setIdentity(TransformStorage& stor)
{
stor.translation_.setValue(0.0, 0.0, 0.0);
stor.rotation_.setValue(0.0, 0.0, 0.0, 1.0);
}
TEST(StaticCache, Repeatability)
{
unsigned int runs = 100;
tf2::StaticCache cache;
TransformStorage stor;
setIdentity(stor);
for ( uint64_t i = 1; i < runs ; i++ )
{
stor.frame_id_ = CompactFrameID(i);
stor.stamp_ = ros::Time().fromNSec(i);
cache.insertData(stor);
cache.getData(ros::Time().fromNSec(i), stor);
EXPECT_EQ(stor.frame_id_, i);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(i));
}
}
TEST(StaticCache, DuplicateEntries)
{
tf2::StaticCache cache;
TransformStorage stor;
setIdentity(stor);
stor.frame_id_ = CompactFrameID(3);
stor.stamp_ = ros::Time().fromNSec(1);
cache.insertData(stor);
cache.insertData(stor);
cache.getData(ros::Time().fromNSec(1), stor);
//printf(" stor is %f\n", stor.transform.translation.x);
EXPECT_TRUE(!std::isnan(stor.translation_.x()));
EXPECT_TRUE(!std::isnan(stor.translation_.y()));
EXPECT_TRUE(!std::isnan(stor.translation_.z()));
EXPECT_TRUE(!std::isnan(stor.rotation_.x()));
EXPECT_TRUE(!std::isnan(stor.rotation_.y()));
EXPECT_TRUE(!std::isnan(stor.rotation_.z()));
EXPECT_TRUE(!std::isnan(stor.rotation_.w()));
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/test/cache_unittest.cpp | /*
* 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, Inc. 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 <gtest/gtest.h>
#include <tf2/time_cache.h>
#include <sys/time.h>
#include "tf2/LinearMath/Quaternion.h"
#include <stdexcept>
#include <geometry_msgs/TransformStamped.h>
#include <cmath>
std::vector<double> values;
unsigned int step = 0;
void seed_rand()
{
values.clear();
for (unsigned int i = 0; i < 1000; i++)
{
int pseudo_rand = std::floor(i * M_PI);
values.push_back(( pseudo_rand % 100)/50.0 - 1.0);
//printf("Seeding with %f\n", values.back());
}
};
double get_rand()
{
if (values.size() == 0) throw std::runtime_error("you need to call seed_rand first");
if (step >= values.size())
step = 0;
else
step++;
return values[step];
}
using namespace tf2;
void setIdentity(TransformStorage& stor)
{
stor.translation_.setValue(0.0, 0.0, 0.0);
stor.rotation_.setValue(0.0, 0.0, 0.0, 1.0);
}
TEST(TimeCache, Repeatability)
{
unsigned int runs = 100;
tf2::TimeCache cache;
TransformStorage stor;
setIdentity(stor);
for ( uint64_t i = 1; i < runs ; i++ )
{
stor.frame_id_ = i;
stor.stamp_ = ros::Time().fromNSec(i);
cache.insertData(stor);
}
for ( uint64_t i = 1; i < runs ; i++ )
{
cache.getData(ros::Time().fromNSec(i), stor);
EXPECT_EQ(stor.frame_id_, i);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(i));
}
}
TEST(TimeCache, RepeatabilityReverseInsertOrder)
{
unsigned int runs = 100;
tf2::TimeCache cache;
TransformStorage stor;
setIdentity(stor);
for ( int i = runs -1; i >= 0 ; i-- )
{
stor.frame_id_ = i;
stor.stamp_ = ros::Time().fromNSec(i);
cache.insertData(stor);
}
for ( uint64_t i = 1; i < runs ; i++ )
{
cache.getData(ros::Time().fromNSec(i), stor);
EXPECT_EQ(stor.frame_id_, i);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(i));
}
}
#if 0 // jfaust: this doesn't seem to actually be testing random insertion?
TEST(TimeCache, RepeatabilityRandomInsertOrder)
{
seed_rand();
tf2::TimeCache cache;
double my_vals[] = {13,2,5,4,9,7,3,11,15,14,12,1,6,10,0,8};
std::vector<double> values (my_vals, my_vals + sizeof(my_vals)/sizeof(double));
unsigned int runs = values.size();
TransformStorage stor;
setIdentity(stor);
for ( uint64_t i = 0; i <runs ; i++ )
{
values[i] = 10.0 * get_rand();
std::stringstream ss;
ss << values[i];
stor.header.frame_id = ss.str();
stor.frame_id_ = i;
stor.stamp_ = ros::Time().fromNSec(i);
cache.insertData(stor);
}
for ( uint64_t i = 1; i < runs ; i++ )
{
cache.getData(ros::Time().fromNSec(i), stor);
EXPECT_EQ(stor.frame_id_, i);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(i));
std::stringstream ss;
ss << values[i];
EXPECT_EQ(stor.header.frame_id, ss.str());
}
}
#endif
TEST(TimeCache, ZeroAtFront)
{
uint64_t runs = 100;
tf2::TimeCache cache;
TransformStorage stor;
setIdentity(stor);
for ( uint64_t i = 1; i < runs ; i++ )
{
stor.frame_id_ = i;
stor.stamp_ = ros::Time().fromNSec(i);
cache.insertData(stor);
}
stor.frame_id_ = runs;
stor.stamp_ = ros::Time().fromNSec(runs);
cache.insertData(stor);
for ( uint64_t i = 1; i < runs ; i++ )
{
cache.getData(ros::Time().fromNSec(i), stor);
EXPECT_EQ(stor.frame_id_, i);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(i));
}
cache.getData(ros::Time(), stor);
EXPECT_EQ(stor.frame_id_, runs);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(runs));
stor.frame_id_ = runs;
stor.stamp_ = ros::Time().fromNSec(runs+1);
cache.insertData(stor);
//Make sure we get a different value now that a new values is added at the front
cache.getData(ros::Time(), stor);
EXPECT_EQ(stor.frame_id_, runs);
EXPECT_EQ(stor.stamp_, ros::Time().fromNSec(runs+1));
}
TEST(TimeCache, CartesianInterpolation)
{
uint64_t runs = 100;
double epsilon = 2e-6;
seed_rand();
tf2::TimeCache cache;
std::vector<double> xvalues(2);
std::vector<double> yvalues(2);
std::vector<double> zvalues(2);
uint64_t offset = 200;
TransformStorage stor;
setIdentity(stor);
for ( uint64_t i = 1; i < runs ; i++ )
{
for (uint64_t step = 0; step < 2 ; step++)
{
xvalues[step] = 10.0 * get_rand();
yvalues[step] = 10.0 * get_rand();
zvalues[step] = 10.0 * get_rand();
stor.translation_.setValue(xvalues[step], yvalues[step], zvalues[step]);
stor.frame_id_ = 2;
stor.stamp_ = ros::Time().fromNSec(step * 100 + offset);
cache.insertData(stor);
}
for (int pos = 0; pos < 100 ; pos ++)
{
cache.getData(ros::Time().fromNSec(offset + pos), stor);
double x_out = stor.translation_.x();
double y_out = stor.translation_.y();
double z_out = stor.translation_.z();
// printf("pose %d, %f %f %f, expected %f %f %f\n", pos, x_out, y_out, z_out,
// xvalues[0] + (xvalues[1] - xvalues[0]) * (double)pos/100.,
// yvalues[0] + (yvalues[1] - yvalues[0]) * (double)pos/100.0,
// zvalues[0] + (xvalues[1] - zvalues[0]) * (double)pos/100.0);
EXPECT_NEAR(xvalues[0] + (xvalues[1] - xvalues[0]) * (double)pos/100.0, x_out, epsilon);
EXPECT_NEAR(yvalues[0] + (yvalues[1] - yvalues[0]) * (double)pos/100.0, y_out, epsilon);
EXPECT_NEAR(zvalues[0] + (zvalues[1] - zvalues[0]) * (double)pos/100.0, z_out, epsilon);
}
cache.clearList();
}
}
/** \brief Make sure we dont' interpolate across reparented data */
TEST(TimeCache, ReparentingInterpolationProtection)
{
double epsilon = 1e-6;
uint64_t offset = 555;
seed_rand();
tf2::TimeCache cache;
std::vector<double> xvalues(2);
std::vector<double> yvalues(2);
std::vector<double> zvalues(2);
TransformStorage stor;
setIdentity(stor);
for (uint64_t step = 0; step < 2 ; step++)
{
xvalues[step] = 10.0 * get_rand();
yvalues[step] = 10.0 * get_rand();
zvalues[step] = 10.0 * get_rand();
stor.translation_.setValue(xvalues[step], yvalues[step], zvalues[step]);
stor.frame_id_ = step + 4;
stor.stamp_ = ros::Time().fromNSec(step * 100 + offset);
cache.insertData(stor);
}
for (int pos = 0; pos < 100 ; pos ++)
{
EXPECT_TRUE(cache.getData(ros::Time().fromNSec(offset + pos), stor));
double x_out = stor.translation_.x();
double y_out = stor.translation_.y();
double z_out = stor.translation_.z();
EXPECT_NEAR(xvalues[0], x_out, epsilon);
EXPECT_NEAR(yvalues[0], y_out, epsilon);
EXPECT_NEAR(zvalues[0], z_out, epsilon);
}
}
TEST(Bullet, Slerp)
{
uint64_t runs = 100;
seed_rand();
tf2::Quaternion q1, q2;
q1.setEuler(0,0,0);
for (uint64_t i = 0 ; i < runs ; i++)
{
q2.setEuler(1.0 * get_rand(),
1.0 * get_rand(),
1.0 * get_rand());
tf2::Quaternion q3 = slerp(q1,q2,0.5);
EXPECT_NEAR(q3.angle(q1), q2.angle(q3), 1e-5);
}
}
TEST(TimeCache, AngularInterpolation)
{
uint64_t runs = 100;
double epsilon = 1e-6;
seed_rand();
tf2::TimeCache cache;
std::vector<double> yawvalues(2);
std::vector<double> pitchvalues(2);
std::vector<double> rollvalues(2);
uint64_t offset = 200;
std::vector<tf2::Quaternion> quats(2);
TransformStorage stor;
setIdentity(stor);
for ( uint64_t i = 1; i < runs ; i++ )
{
for (uint64_t step = 0; step < 2 ; step++)
{
yawvalues[step] = 10.0 * get_rand() / 100.0;
pitchvalues[step] = 0;//10.0 * get_rand();
rollvalues[step] = 0;//10.0 * get_rand();
quats[step].setRPY(yawvalues[step], pitchvalues[step], rollvalues[step]);
stor.rotation_ = quats[step];
stor.frame_id_ = 3;
stor.stamp_ = ros::Time().fromNSec(offset + (step * 100)); //step = 0 or 1
cache.insertData(stor);
}
for (int pos = 0; pos < 100 ; pos ++)
{
EXPECT_TRUE(cache.getData(ros::Time().fromNSec(offset + pos), stor)); //get the transform for the position
tf2::Quaternion quat (stor.rotation_);
//Generate a ground truth quaternion directly calling slerp
tf2::Quaternion ground_truth = quats[0].slerp(quats[1], pos/100.0);
//Make sure the transformed one and the direct call match
EXPECT_NEAR(0, angle(ground_truth, quat), epsilon);
}
cache.clearList();
}
}
TEST(TimeCache, DuplicateEntries)
{
TimeCache cache;
TransformStorage stor;
setIdentity(stor);
stor.frame_id_ = 3;
stor.stamp_ = ros::Time().fromNSec(1);
cache.insertData(stor);
cache.insertData(stor);
cache.getData(ros::Time().fromNSec(1), stor);
//printf(" stor is %f\n", stor.translation_.x());
EXPECT_TRUE(!std::isnan(stor.translation_.x()));
EXPECT_TRUE(!std::isnan(stor.translation_.y()));
EXPECT_TRUE(!std::isnan(stor.translation_.z()));
EXPECT_TRUE(!std::isnan(stor.rotation_.x()));
EXPECT_TRUE(!std::isnan(stor.rotation_.y()));
EXPECT_TRUE(!std::isnan(stor.rotation_.z()));
EXPECT_TRUE(!std::isnan(stor.rotation_.w()));
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/test/simple_tf2_core.cpp | /*
* 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, Inc. 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 <gtest/gtest.h>
#include <tf2/buffer_core.h>
#include <sys/time.h>
#include <ros/ros.h>
#include "tf2/LinearMath/Vector3.h"
#include "tf2/exceptions.h"
void seed_rand()
{
//Seed random number generator with current microseond count
timeval temp_time_struct;
gettimeofday(&temp_time_struct,NULL);
srand(temp_time_struct.tv_usec);
};
void generate_rand_vectors(double scale, uint64_t runs, std::vector<double>& xvalues, std::vector<double>& yvalues, std::vector<double>&zvalues)
{
seed_rand();
for ( uint64_t i = 0; i < runs ; i++ )
{
xvalues[i] = 1.0 * ((double) rand() - (double)RAND_MAX /2.0) /(double)RAND_MAX;
yvalues[i] = 1.0 * ((double) rand() - (double)RAND_MAX /2.0) /(double)RAND_MAX;
zvalues[i] = 1.0 * ((double) rand() - (double)RAND_MAX /2.0) /(double)RAND_MAX;
}
}
TEST(tf2, setTransformFail)
{
tf2::BufferCore tfc;
geometry_msgs::TransformStamped st;
EXPECT_FALSE(tfc.setTransform(st, "authority1"));
}
TEST(tf2, setTransformValid)
{
tf2::BufferCore tfc;
geometry_msgs::TransformStamped st;
st.header.frame_id = "foo";
st.header.stamp = ros::Time(1.0);
st.child_frame_id = "child";
st.transform.rotation.w = 1;
EXPECT_TRUE(tfc.setTransform(st, "authority1"));
}
TEST(tf2_lookupTransform, LookupException_Nothing_Exists)
{
tf2::BufferCore tfc;
EXPECT_THROW(tfc.lookupTransform("a", "b", ros::Time().fromSec(1.0)), tf2::LookupException);
}
TEST(tf2_canTransform, Nothing_Exists)
{
tf2::BufferCore tfc;
EXPECT_FALSE(tfc.canTransform("a", "b", ros::Time().fromSec(1.0)));
}
TEST(tf2_lookupTransform, LookupException_One_Exists)
{
tf2::BufferCore tfc;
geometry_msgs::TransformStamped st;
st.header.frame_id = "foo";
st.header.stamp = ros::Time(1.0);
st.child_frame_id = "child";
st.transform.rotation.w = 1;
EXPECT_TRUE(tfc.setTransform(st, "authority1"));
EXPECT_THROW(tfc.lookupTransform("foo", "bar", ros::Time().fromSec(1.0)), tf2::LookupException);
}
TEST(tf2_canTransform, One_Exists)
{
tf2::BufferCore tfc;
geometry_msgs::TransformStamped st;
st.header.frame_id = "foo";
st.header.stamp = ros::Time(1.0);
st.child_frame_id = "child";
st.transform.rotation.w = 1;
EXPECT_TRUE(tfc.setTransform(st, "authority1"));
EXPECT_FALSE(tfc.canTransform("foo", "bar", ros::Time().fromSec(1.0)));
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
ros::Time::init(); //needed for ros::TIme::now()
return RUN_ALL_TESTS();
}
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/test/speed_test.cpp | /*
* Copyright (c) 2010, 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, Inc. 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 <tf2/buffer_core.h>
#include <ros/time.h>
#include <console_bridge/console.h>
#include <boost/lexical_cast.hpp>
int main(int argc, char** argv)
{
uint32_t num_levels = 10;
if (argc > 1)
{
num_levels = boost::lexical_cast<uint32_t>(argv[1]);
}
tf2::BufferCore bc;
geometry_msgs::TransformStamped t;
t.header.stamp = ros::Time(1);
t.header.frame_id = "root";
t.child_frame_id = "0";
t.transform.translation.x = 1;
t.transform.rotation.w = 1.0;
bc.setTransform(t, "me");
t.header.stamp = ros::Time(2);
bc.setTransform(t, "me");
for (uint32_t i = 1; i < num_levels/2; ++i)
{
for (uint32_t j = 1; j < 3; ++j)
{
std::stringstream parent_ss;
parent_ss << (i - 1);
std::stringstream child_ss;
child_ss << i;
t.header.stamp = ros::Time(j);
t.header.frame_id = parent_ss.str();
t.child_frame_id = child_ss.str();
bc.setTransform(t, "me");
}
}
t.header.frame_id = "root";
std::stringstream ss;
ss << num_levels/2;
t.header.stamp = ros::Time(1);
t.child_frame_id = ss.str();
bc.setTransform(t, "me");
t.header.stamp = ros::Time(2);
bc.setTransform(t, "me");
for (uint32_t i = num_levels/2 + 1; i < num_levels; ++i)
{
for (uint32_t j = 1; j < 3; ++j)
{
std::stringstream parent_ss;
parent_ss << (i - 1);
std::stringstream child_ss;
child_ss << i;
t.header.stamp = ros::Time(j);
t.header.frame_id = parent_ss.str();
t.child_frame_id = child_ss.str();
bc.setTransform(t, "me");
}
}
//logInfo_STREAM(bc.allFramesAsYAML());
std::string v_frame0 = boost::lexical_cast<std::string>(num_levels - 1);
std::string v_frame1 = boost::lexical_cast<std::string>(num_levels/2 - 1);
logInform("%s to %s", v_frame0.c_str(), v_frame1.c_str());
geometry_msgs::TransformStamped out_t;
const uint32_t count = 1000000;
logInform("Doing %d %d-level tests", count, num_levels);
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
out_t = bc.lookupTransform(v_frame1, v_frame0, ros::Time(0));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("lookupTransform at Time(0) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
out_t = bc.lookupTransform(v_frame1, v_frame0, ros::Time(1));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("lookupTransform at Time(1) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
out_t = bc.lookupTransform(v_frame1, v_frame0, ros::Time(1.5));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("lookupTransform at Time(1.5) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
out_t = bc.lookupTransform(v_frame1, v_frame0, ros::Time(2));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("lookupTransform at Time(2) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
bc.canTransform(v_frame1, v_frame0, ros::Time(0));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("canTransform at Time(0) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
bc.canTransform(v_frame1, v_frame0, ros::Time(1));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("canTransform at Time(1) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
bc.canTransform(v_frame1, v_frame0, ros::Time(1.5));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("canTransform at Time(1.5) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
#if 01
{
ros::WallTime start = ros::WallTime::now();
for (uint32_t i = 0; i < count; ++i)
{
bc.canTransform(v_frame1, v_frame0, ros::Time(2));
}
ros::WallTime end = ros::WallTime::now();
ros::WallDuration dur = end - start;
//ROS_INFO_STREAM(out_t);
logInform("canTransform at Time(2) took %f for an average of %.9f", dur.toSec(), dur.toSec() / (double)count);
}
#endif
}
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/utils.h | // Copyright 2014 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef TF2_UTILS_H
#define TF2_UTILS_H
#include <tf2/LinearMath/Transform.h>
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/impl/utils.h>
namespace tf2 {
/** Return the yaw, pitch, roll of anything that can be converted to a tf2::Quaternion
* The conventions are the usual ROS ones defined in tf2/LineMath/Matrix3x3.h
* \param a the object to get data from (it represents a rotation/quaternion)
* \param yaw yaw
* \param pitch pitch
* \param roll roll
*/
template <class A>
void getEulerYPR(const A& a, double& yaw, double& pitch, double& roll)
{
tf2::Quaternion q = impl::toQuaternion(a);
impl::getEulerYPR(q, yaw, pitch, roll);
}
/** Return the yaw of anything that can be converted to a tf2::Quaternion
* The conventions are the usual ROS ones defined in tf2/LineMath/Matrix3x3.h
* This function is a specialization of getEulerYPR and is useful for its
* wide-spread use in navigation
* \param a the object to get data from (it represents a rotation/quaternion)
* \param yaw yaw
*/
template <class A>
double getYaw(const A& a)
{
tf2::Quaternion q = impl::toQuaternion(a);
return impl::getYaw(q);
}
/** Return the identity for any type that can be converted to a tf2::Transform
* \return an object of class A that is an identity transform
*/
template <class A>
A getTransformIdentity()
{
tf2::Transform t;
t.setIdentity();
A a;
convert(t, a);
return a;
}
}
#endif //TF2_UTILS_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/transform_datatypes.h | /*
* 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, Inc. 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.
*/
/** \author Tully Foote */
#ifndef TF2_TRANSFORM_DATATYPES_H
#define TF2_TRANSFORM_DATATYPES_H
#include <string>
#include "ros/time.h"
namespace tf2
{
/** \brief The data type which will be cross compatable with geometry_msgs
* This is the tf2 datatype equivilant of a MessageStamped */
template <typename T>
class Stamped : public T{
public:
ros::Time stamp_; ///< The timestamp associated with this data
std::string frame_id_; ///< The frame_id associated this data
/** Default constructor */
Stamped() :frame_id_ ("NO_ID_STAMPED_DEFAULT_CONSTRUCTION"){}; //Default constructor used only for preallocation
/** Full constructor */
Stamped(const T& input, const ros::Time& timestamp, const std::string & frame_id) :
T (input), stamp_ ( timestamp ), frame_id_ (frame_id){ } ;
/** Copy Constructor */
Stamped(const Stamped<T>& s):
T (s),
stamp_(s.stamp_),
frame_id_(s.frame_id_) {}
/** Set the data element */
void setData(const T& input){*static_cast<T*>(this) = input;};
};
/** \brief Comparison Operator for Stamped datatypes */
template <typename T>
bool operator==(const Stamped<T> &a, const Stamped<T> &b) {
return a.frame_id_ == b.frame_id_ && a.stamp_ == b.stamp_ && static_cast<const T&>(a) == static_cast<const T&>(b);
};
}
#endif //TF2_TRANSFORM_DATATYPES_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/exceptions.h | /*
* 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, Inc. 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.
*/
/** \author Tully Foote */
#ifndef TF2_EXCEPTIONS_H
#define TF2_EXCEPTIONS_H
#include <stdexcept>
namespace tf2{
/** \brief A base class for all tf2 exceptions
* This inherits from ros::exception
* which inherits from std::runtime_exception
*/
class TransformException: public std::runtime_error
{
public:
TransformException(const std::string errorDescription) : std::runtime_error(errorDescription) { ; };
};
/** \brief An exception class to notify of no connection
*
* This is an exception class to be thrown in the case
* that the Reference Frame tree is not connected between
* the frames requested. */
class ConnectivityException:public TransformException
{
public:
ConnectivityException(const std::string errorDescription) : tf2::TransformException(errorDescription) { ; };
};
/** \brief An exception class to notify of bad frame number
*
* This is an exception class to be thrown in the case that
* a frame not in the graph has been attempted to be accessed.
* The most common reason for this is that the frame is not
* being published, or a parent frame was not set correctly
* causing the tree to be broken.
*/
class LookupException: public TransformException
{
public:
LookupException(const std::string errorDescription) : tf2::TransformException(errorDescription) { ; };
};
/** \brief An exception class to notify that the requested value would have required extrapolation beyond current limits.
*
*/
class ExtrapolationException: public TransformException
{
public:
ExtrapolationException(const std::string errorDescription) : tf2::TransformException(errorDescription) { ; };
};
/** \brief An exception class to notify that one of the arguments is invalid
*
* usually it's an uninitalized Quaternion (0,0,0,0)
*
*/
class InvalidArgumentException: public TransformException
{
public:
InvalidArgumentException(const std::string errorDescription) : tf2::TransformException(errorDescription) { ; };
};
/** \brief An exception class to notify that a timeout has occured
*
*
*/
class TimeoutException: public TransformException
{
public:
TimeoutException(const std::string errorDescription) : tf2::TransformException(errorDescription) { ; };
};
}
#endif //TF2_EXCEPTIONS_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/buffer_core.h | /*
* 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, Inc. 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.
*/
/** \author Tully Foote */
#ifndef TF2_BUFFER_CORE_H
#define TF2_BUFFER_CORE_H
#include "transform_storage.h"
#include <boost/signals2.hpp>
#include <string>
#include "ros/duration.h"
#include "ros/time.h"
//#include "geometry_msgs/TwistStamped.h"
#include "geometry_msgs/TransformStamped.h"
//////////////////////////backwards startup for porting
//#include "tf/tf.h"
#include <boost/unordered_map.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
namespace tf2
{
typedef std::pair<ros::Time, CompactFrameID> P_TimeAndFrameID;
typedef uint32_t TransformableCallbackHandle;
typedef uint64_t TransformableRequestHandle;
class TimeCacheInterface;
typedef boost::shared_ptr<TimeCacheInterface> TimeCacheInterfacePtr;
enum TransformableResult
{
TransformAvailable,
TransformFailure,
};
/** \brief A Class which provides coordinate transforms between any two frames in a system.
*
* This class provides a simple interface to allow recording and lookup of
* relationships between arbitrary frames of the system.
*
* libTF assumes that there is a tree of coordinate frame transforms which define the relationship between all coordinate frames.
* For example your typical robot would have a transform from global to real world. And then from base to hand, and from base to head.
* But Base to Hand really is composed of base to shoulder to elbow to wrist to hand.
* libTF is designed to take care of all the intermediate steps for you.
*
* Internal Representation
* libTF will store frames with the parameters necessary for generating the transform into that frame from it's parent and a reference to the parent frame.
* Frames are designated using an std::string
* 0 is a frame without a parent (the top of a tree)
* The positions of frames over time must be pushed in.
*
* All function calls which pass frame ids can potentially throw the exception tf::LookupException
*/
class BufferCore
{
public:
/************* Constants ***********************/
static const int DEFAULT_CACHE_TIME = 10; //!< The default amount of time to cache data in seconds
static const uint32_t MAX_GRAPH_DEPTH = 1000UL; //!< The default amount of time to cache data in seconds
/** Constructor
* \param interpolating Whether to interpolate, if this is false the closest value will be returned
* \param cache_time How long to keep a history of transforms in nanoseconds
*
*/
BufferCore(ros::Duration cache_time_ = ros::Duration(DEFAULT_CACHE_TIME));
virtual ~BufferCore(void);
/** \brief Clear all data */
void clear();
/** \brief Add transform information to the tf data structure
* \param transform The transform to store
* \param authority The source of the information for this transform
* \param is_static Record this transform as a static transform. It will be good across all time. (This cannot be changed after the first call.)
* \return True unless an error occured
*/
bool setTransform(const geometry_msgs::TransformStamped& transform, const std::string & authority, bool is_static = false);
/*********** Accessors *************/
/** \brief Get the transform between two frames by frame ID.
* \param target_frame The frame to which data should be transformed
* \param source_frame The frame where the data originated
* \param time The time at which the value of the transform is desired. (0 will get the latest)
* \return The transform between the frames
*
* Possible exceptions tf2::LookupException, tf2::ConnectivityException,
* tf2::ExtrapolationException, tf2::InvalidArgumentException
*/
geometry_msgs::TransformStamped
lookupTransform(const std::string& target_frame, const std::string& source_frame,
const ros::Time& time) const;
/** \brief Get the transform between two frames by frame ID assuming fixed frame.
* \param target_frame The frame to which data should be transformed
* \param target_time The time to which the data should be transformed. (0 will get the latest)
* \param source_frame The frame where the data originated
* \param source_time The time at which the source_frame should be evaluated. (0 will get the latest)
* \param fixed_frame The frame in which to assume the transform is constant in time.
* \return The transform between the frames
*
* Possible exceptions tf2::LookupException, tf2::ConnectivityException,
* tf2::ExtrapolationException, tf2::InvalidArgumentException
*/
geometry_msgs::TransformStamped
lookupTransform(const std::string& target_frame, const ros::Time& target_time,
const std::string& source_frame, const ros::Time& source_time,
const std::string& fixed_frame) const;
/** \brief Lookup the twist of the tracking_frame with respect to the observation frame in the reference_frame using the reference point
* \param tracking_frame The frame to track
* \param observation_frame The frame from which to measure the twist
* \param reference_frame The reference frame in which to express the twist
* \param reference_point The reference point with which to express the twist
* \param reference_point_frame The frame_id in which the reference point is expressed
* \param time The time at which to get the velocity
* \param duration The period over which to average
* \return twist The twist output
*
* This will compute the average velocity on the interval
* (time - duration/2, time+duration/2). If that is too close to the most
* recent reading, in which case it will shift the interval up to
* duration/2 to prevent extrapolation.
*
* Possible exceptions tf2::LookupException, tf2::ConnectivityException,
* tf2::ExtrapolationException, tf2::InvalidArgumentException
*
* New in geometry 1.1
*/
/*
geometry_msgs::Twist
lookupTwist(const std::string& tracking_frame, const std::string& observation_frame, const std::string& reference_frame,
const tf::Point & reference_point, const std::string& reference_point_frame,
const ros::Time& time, const ros::Duration& averaging_interval) const;
*/
/** \brief lookup the twist of the tracking frame with respect to the observational frame
*
* This is a simplified version of
* lookupTwist with it assumed that the reference point is the
* origin of the tracking frame, and the reference frame is the
* observation frame.
*
* Possible exceptions tf2::LookupException, tf2::ConnectivityException,
* tf2::ExtrapolationException, tf2::InvalidArgumentException
*
* New in geometry 1.1
*/
/*
geometry_msgs::Twist
lookupTwist(const std::string& tracking_frame, const std::string& observation_frame,
const ros::Time& time, const ros::Duration& averaging_interval) const;
*/
/** \brief Test if a transform is possible
* \param target_frame The frame into which to transform
* \param source_frame The frame from which to transform
* \param time The time at which to transform
* \param error_msg A pointer to a string which will be filled with why the transform failed, if not NULL
* \return True if the transform is possible, false otherwise
*/
bool canTransform(const std::string& target_frame, const std::string& source_frame,
const ros::Time& time, std::string* error_msg = NULL) const;
/** \brief Test if a transform is possible
* \param target_frame The frame into which to transform
* \param target_time The time into which to transform
* \param source_frame The frame from which to transform
* \param source_time The time from which to transform
* \param fixed_frame The frame in which to treat the transform as constant in time
* \param error_msg A pointer to a string which will be filled with why the transform failed, if not NULL
* \return True if the transform is possible, false otherwise
*/
bool canTransform(const std::string& target_frame, const ros::Time& target_time,
const std::string& source_frame, const ros::Time& source_time,
const std::string& fixed_frame, std::string* error_msg = NULL) const;
/** \brief A way to see what frames have been cached in yaml format
* Useful for debugging tools
*/
std::string allFramesAsYAML(double current_time) const;
/** Backwards compatibility for #84
*/
std::string allFramesAsYAML() const;
/** \brief A way to see what frames have been cached
* Useful for debugging
*/
std::string allFramesAsString() const;
typedef boost::function<void(TransformableRequestHandle request_handle, const std::string& target_frame, const std::string& source_frame,
ros::Time time, TransformableResult result)> TransformableCallback;
/// \brief Internal use only
TransformableCallbackHandle addTransformableCallback(const TransformableCallback& cb);
/// \brief Internal use only
void removeTransformableCallback(TransformableCallbackHandle handle);
/// \brief Internal use only
TransformableRequestHandle addTransformableRequest(TransformableCallbackHandle handle, const std::string& target_frame, const std::string& source_frame, ros::Time time);
/// \brief Internal use only
void cancelTransformableRequest(TransformableRequestHandle handle);
// Tell the buffer that there are multiple threads serviciing it.
// This is useful for derived classes to know if they can block or not.
void setUsingDedicatedThread(bool value) { using_dedicated_thread_ = value;};
// Get the state of using_dedicated_thread_
bool isUsingDedicatedThread() const { return using_dedicated_thread_;};
/* Backwards compatability section for tf::Transformer you should not use these
*/
/**
* \brief Add a callback that happens when a new transform has arrived
*
* \param callback The callback, of the form void func();
* \return A boost::signals2::connection object that can be used to remove this
* listener
*/
boost::signals2::connection _addTransformsChangedListener(boost::function<void(void)> callback);
void _removeTransformsChangedListener(boost::signals2::connection c);
/**@brief Check if a frame exists in the tree
* @param frame_id_str The frame id in question */
bool _frameExists(const std::string& frame_id_str) const;
/**@brief Fill the parent of a frame.
* @param frame_id The frame id of the frame in question
* @param parent The reference to the string to fill the parent
* Returns true unless "NO_PARENT" */
bool _getParent(const std::string& frame_id, ros::Time time, std::string& parent) const;
/** \brief A way to get a std::vector of available frame ids */
void _getFrameStrings(std::vector<std::string>& ids) const;
CompactFrameID _lookupFrameNumber(const std::string& frameid_str) const {
return lookupFrameNumber(frameid_str);
}
CompactFrameID _lookupOrInsertFrameNumber(const std::string& frameid_str) {
return lookupOrInsertFrameNumber(frameid_str);
}
int _getLatestCommonTime(CompactFrameID target_frame, CompactFrameID source_frame, ros::Time& time, std::string* error_string) const {
boost::mutex::scoped_lock lock(frame_mutex_);
return getLatestCommonTime(target_frame, source_frame, time, error_string);
}
CompactFrameID _validateFrameId(const char* function_name_arg, const std::string& frame_id) const {
return validateFrameId(function_name_arg, frame_id);
}
/**@brief Get the duration over which this transformer will cache */
ros::Duration getCacheLength() { return cache_time_;}
/** \brief Backwards compatabilityA way to see what frames have been cached
* Useful for debugging
*/
std::string _allFramesAsDot(double current_time) const;
std::string _allFramesAsDot() const;
/** \brief Backwards compatabilityA way to see what frames are in a chain
* Useful for debugging
*/
void _chainAsVector(const std::string & target_frame, ros::Time target_time, const std::string & source_frame, ros::Time source_time, const std::string & fixed_frame, std::vector<std::string>& output) const;
private:
/** \brief A way to see what frames have been cached
* Useful for debugging. Use this call internally.
*/
std::string allFramesAsStringNoLock() const;
/******************** Internal Storage ****************/
/** \brief The pointers to potential frames that the tree can be made of.
* The frames will be dynamically allocated at run time when set the first time. */
typedef std::vector<TimeCacheInterfacePtr> V_TimeCacheInterface;
V_TimeCacheInterface frames_;
/** \brief A mutex to protect testing and allocating new frames on the above vector. */
mutable boost::mutex frame_mutex_;
/** \brief A map from string frame ids to CompactFrameID */
typedef boost::unordered_map<std::string, CompactFrameID> M_StringToCompactFrameID;
M_StringToCompactFrameID frameIDs_;
/** \brief A map from CompactFrameID frame_id_numbers to string for debugging and output */
std::vector<std::string> frameIDs_reverse;
/** \brief A map to lookup the most recent authority for a given frame */
std::map<CompactFrameID, std::string> frame_authority_;
/// How long to cache transform history
ros::Duration cache_time_;
typedef boost::unordered_map<TransformableCallbackHandle, TransformableCallback> M_TransformableCallback;
M_TransformableCallback transformable_callbacks_;
uint32_t transformable_callbacks_counter_;
boost::mutex transformable_callbacks_mutex_;
struct TransformableRequest
{
ros::Time time;
TransformableRequestHandle request_handle;
TransformableCallbackHandle cb_handle;
CompactFrameID target_id;
CompactFrameID source_id;
std::string target_string;
std::string source_string;
};
typedef std::vector<TransformableRequest> V_TransformableRequest;
V_TransformableRequest transformable_requests_;
boost::mutex transformable_requests_mutex_;
uint64_t transformable_requests_counter_;
struct RemoveRequestByCallback;
struct RemoveRequestByID;
// Backwards compatability for tf message_filter
typedef boost::signals2::signal<void(void)> TransformsChangedSignal;
/// Signal which is fired whenever new transform data has arrived, from the thread the data arrived in
TransformsChangedSignal _transforms_changed_;
/************************* Internal Functions ****************************/
/** \brief An accessor to get a frame, which will throw an exception if the frame is no there.
* \param frame_number The frameID of the desired Reference Frame
*
* This is an internal function which will get the pointer to the frame associated with the frame id
* Possible Exception: tf::LookupException
*/
TimeCacheInterfacePtr getFrame(CompactFrameID c_frame_id) const;
TimeCacheInterfacePtr allocateFrame(CompactFrameID cfid, bool is_static);
bool warnFrameId(const char* function_name_arg, const std::string& frame_id) const;
CompactFrameID validateFrameId(const char* function_name_arg, const std::string& frame_id) const;
/// String to number for frame lookup with dynamic allocation of new frames
CompactFrameID lookupFrameNumber(const std::string& frameid_str) const;
/// String to number for frame lookup with dynamic allocation of new frames
CompactFrameID lookupOrInsertFrameNumber(const std::string& frameid_str);
///Number to string frame lookup may throw LookupException if number invalid
const std::string& lookupFrameString(CompactFrameID frame_id_num) const;
void createConnectivityErrorString(CompactFrameID source_frame, CompactFrameID target_frame, std::string* out) const;
/**@brief Return the latest rostime which is common across the spanning set
* zero if fails to cross */
int getLatestCommonTime(CompactFrameID target_frame, CompactFrameID source_frame, ros::Time& time, std::string* error_string) const;
template<typename F>
int walkToTopParent(F& f, ros::Time time, CompactFrameID target_id, CompactFrameID source_id, std::string* error_string) const;
/**@brief Traverse the transform tree. If frame_chain is not NULL, store the traversed frame tree in vector frame_chain.
* */
template<typename F>
int walkToTopParent(F& f, ros::Time time, CompactFrameID target_id, CompactFrameID source_id, std::string* error_string, std::vector<CompactFrameID> *frame_chain) const;
void testTransformableRequests();
bool canTransformInternal(CompactFrameID target_id, CompactFrameID source_id,
const ros::Time& time, std::string* error_msg) const;
bool canTransformNoLock(CompactFrameID target_id, CompactFrameID source_id,
const ros::Time& time, std::string* error_msg) const;
//Whether it is safe to use canTransform with a timeout. (If another thread is not provided it will always timeout.)
bool using_dedicated_thread_;
};
};
#endif //TF2_CORE_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/time_cache.h | /*
* 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, Inc. 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.
*/
/** \author Tully Foote */
#ifndef TF2_TIME_CACHE_H
#define TF2_TIME_CACHE_H
#include "transform_storage.h"
#include <list>
#include <sstream>
#include <ros/message_forward.h>
#include <ros/time.h>
#include <boost/shared_ptr.hpp>
namespace geometry_msgs
{
ROS_DECLARE_MESSAGE(TransformStamped);
}
namespace tf2
{
typedef std::pair<ros::Time, CompactFrameID> P_TimeAndFrameID;
class TimeCacheInterface
{
public:
/** \brief Access data from the cache */
virtual bool getData(ros::Time time, TransformStorage & data_out, std::string* error_str = 0)=0; //returns false if data unavailable (should be thrown as lookup exception
/** \brief Insert data into the cache */
virtual bool insertData(const TransformStorage& new_data)=0;
/** @brief Clear the list of stored values */
virtual void clearList()=0;
/** \brief Retrieve the parent at a specific time */
virtual CompactFrameID getParent(ros::Time time, std::string* error_str) = 0;
/**
* \brief Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no data.
*/
virtual P_TimeAndFrameID getLatestTimeAndParent() = 0;
/// Debugging information methods
/** @brief Get the length of the stored list */
virtual unsigned int getListLength()=0;
/** @brief Get the latest timestamp cached */
virtual ros::Time getLatestTimestamp()=0;
/** @brief Get the oldest timestamp cached */
virtual ros::Time getOldestTimestamp()=0;
};
typedef boost::shared_ptr<TimeCacheInterface> TimeCacheInterfacePtr;
/** \brief A class to keep a sorted linked list in time
* This builds and maintains a list of timestamped
* data. And provides lookup functions to get
* data out as a function of time. */
class TimeCache : public TimeCacheInterface
{
public:
static const int MIN_INTERPOLATION_DISTANCE = 5; //!< Number of nano-seconds to not interpolate below.
static const unsigned int MAX_LENGTH_LINKED_LIST = 1000000; //!< Maximum length of linked list, to make sure not to be able to use unlimited memory.
static const int64_t DEFAULT_MAX_STORAGE_TIME = 1ULL * 1000000000LL; //!< default value of 10 seconds storage
TimeCache(ros::Duration max_storage_time = ros::Duration().fromNSec(DEFAULT_MAX_STORAGE_TIME));
/// Virtual methods
virtual bool getData(ros::Time time, TransformStorage & data_out, std::string* error_str = 0);
virtual bool insertData(const TransformStorage& new_data);
virtual void clearList();
virtual CompactFrameID getParent(ros::Time time, std::string* error_str);
virtual P_TimeAndFrameID getLatestTimeAndParent();
/// Debugging information methods
virtual unsigned int getListLength();
virtual ros::Time getLatestTimestamp();
virtual ros::Time getOldestTimestamp();
private:
typedef std::list<TransformStorage> L_TransformStorage;
L_TransformStorage storage_;
ros::Duration max_storage_time_;
/// A helper function for getData
//Assumes storage is already locked for it
inline uint8_t findClosest(TransformStorage*& one, TransformStorage*& two, ros::Time target_time, std::string* error_str);
inline void interpolate(const TransformStorage& one, const TransformStorage& two, ros::Time time, TransformStorage& output);
void pruneList();
};
class StaticCache : public TimeCacheInterface
{
public:
/// Virtual methods
virtual bool getData(ros::Time time, TransformStorage & data_out, std::string* error_str = 0); //returns false if data unavailable (should be thrown as lookup exception
virtual bool insertData(const TransformStorage& new_data);
virtual void clearList();
virtual CompactFrameID getParent(ros::Time time, std::string* error_str);
virtual P_TimeAndFrameID getLatestTimeAndParent();
/// Debugging information methods
virtual unsigned int getListLength();
virtual ros::Time getLatestTimestamp();
virtual ros::Time getOldestTimestamp();
private:
TransformStorage storage_;
};
}
#endif // TF2_TIME_CACHE_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/convert.h | /*
* Copyright (c) 2013, Open Source Robotics Foundation
* 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, Inc. 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.
*/
/** \author Tully Foote */
#ifndef TF2_CONVERT_H
#define TF2_CONVERT_H
#include <tf2/transform_datatypes.h>
#include <tf2/exceptions.h>
#include <geometry_msgs/TransformStamped.h>
#include <tf2/impl/convert.h>
namespace tf2 {
/**\brief The templated function expected to be able to do a transform
*
* This is the method which tf2 will use to try to apply a transform for any given datatype.
* \param data_in The data to be transformed.
* \param data_out A reference to the output data. Note this can point to data in and the method should be mutation safe.
* \param transform The transform to apply to data_in to fill data_out.
*
* This method needs to be implemented by client library developers
*/
template <class T>
void doTransform(const T& data_in, T& data_out, const geometry_msgs::TransformStamped& transform);
/**\brief Get the timestamp from data
* \param t The data input.
* \return The timestamp associated with the data.
*/
template <class T>
const ros::Time& getTimestamp(const T& t);
/**\brief Get the frame_id from data
* \param t The data input.
* \return The frame_id associated with the data.
*/
template <class T>
const std::string& getFrameId(const T& t);
/* An implementation for Stamped<P> datatypes */
template <class P>
const ros::Time& getTimestamp(const tf2::Stamped<P>& t)
{
return t.stamp_;
}
/* An implementation for Stamped<P> datatypes */
template <class P>
const std::string& getFrameId(const tf2::Stamped<P>& t)
{
return t.frame_id_;
}
/** Function that converts from one type to a ROS message type. It has to be
* implemented by each data type in tf2_* (except ROS messages) as it is
* used in the "convert" function.
* \param a an object of whatever type
* \return the conversion as a ROS message
*/
template<typename A, typename B>
B toMsg(const A& a);
/** Function that converts from a ROS message type to another type. It has to be
* implemented by each data type in tf2_* (except ROS messages) as it is used
* in the "convert" function.
* \param a a ROS message to convert from
* \param b the object to convert to
*/
template<typename A, typename B>
void fromMsg(const A&, B& b);
/** Function that converts any type to any type (messages or not).
* Matching toMsg and from Msg conversion functions need to exist.
* If they don't exist or do not apply (for example, if your two
* classes are ROS messages), just write a specialization of the function.
* \param a an object to convert from
* \param b the object to convert to
*/
template <class A, class B>
void convert(const A& a, B& b)
{
//printf("In double type convert\n");
impl::Converter<ros::message_traits::IsMessage<A>::value, ros::message_traits::IsMessage<B>::value>::convert(a, b);
}
template <class A>
void convert(const A& a1, A& a2)
{
//printf("In single type convert\n");
if(&a1 != &a2)
a2 = a1;
}
}
#endif //TF2_CONVERT_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/transform_storage.h | /*
* Copyright (c) 2010, 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, Inc. 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.
*/
/** \author Tully Foote */
#ifndef TF2_TRANSFORM_STORAGE_H
#define TF2_TRANSFORM_STORAGE_H
#include <tf2/LinearMath/Vector3.h>
#include <tf2/LinearMath/Quaternion.h>
#include <ros/message_forward.h>
#include <ros/time.h>
#include <ros/types.h>
namespace geometry_msgs
{
ROS_DECLARE_MESSAGE(TransformStamped);
}
namespace tf2
{
typedef uint32_t CompactFrameID;
/** \brief Storage for transforms and their parent */
class TransformStorage
{
public:
TransformStorage();
TransformStorage(const geometry_msgs::TransformStamped& data, CompactFrameID frame_id, CompactFrameID child_frame_id);
TransformStorage(const TransformStorage& rhs)
{
*this = rhs;
}
TransformStorage& operator=(const TransformStorage& rhs)
{
#if 01
rotation_ = rhs.rotation_;
translation_ = rhs.translation_;
stamp_ = rhs.stamp_;
frame_id_ = rhs.frame_id_;
child_frame_id_ = rhs.child_frame_id_;
#endif
return *this;
}
tf2::Quaternion rotation_;
tf2::Vector3 translation_;
ros::Time stamp_;
CompactFrameID frame_id_;
CompactFrameID child_frame_id_;
};
}
#endif // TF2_TRANSFORM_STORAGE_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/impl/utils.h | // Copyright 2014 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef TF2_IMPL_UTILS_H
#define TF2_IMPL_UTILS_H
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf2/transform_datatypes.h>
#include <tf2/LinearMath/Quaternion.h>
namespace tf2 {
namespace impl {
/** Function needed for the generalization of toQuaternion
* \param q a tf2::Quaternion
* \return a copy of the same quaternion
*/
inline
tf2::Quaternion toQuaternion(const tf2::Quaternion& q) {
return q;
}
/** Function needed for the generalization of toQuaternion
* \param q a geometry_msgs::Quaternion
* \return a copy of the same quaternion as a tf2::Quaternion
*/
inline
tf2::Quaternion toQuaternion(const geometry_msgs::Quaternion& q) {
tf2::Quaternion res;
fromMsg(q, res);
return res;
}
/** Function needed for the generalization of toQuaternion
* \param q a geometry_msgs::QuaternionStamped
* \return a copy of the same quaternion as a tf2::Quaternion
*/
inline
tf2::Quaternion toQuaternion(const geometry_msgs::QuaternionStamped& q) {
tf2::Quaternion res;
fromMsg(q.quaternion, res);
return res;
}
/** Function needed for the generalization of toQuaternion
* \param t some tf2::Stamped object
* \return a copy of the same quaternion as a tf2::Quaternion
*/
template<typename T>
tf2::Quaternion toQuaternion(const tf2::Stamped<T>& t) {
geometry_msgs::QuaternionStamped q = toMsg<tf2::Stamped<T>, geometry_msgs::QuaternionStamped>(t);
return toQuaternion(q);
}
/** Generic version of toQuaternion. It tries to convert the argument
* to a geometry_msgs::Quaternion
* \param t some object
* \return a copy of the same quaternion as a tf2::Quaternion
*/
template<typename T>
tf2::Quaternion toQuaternion(const T& t) {
geometry_msgs::Quaternion q = toMsg<T, geometry_msgs::QuaternionStamped>(t);
return toQuaternion(q);
}
/** The code below is blantantly copied from urdfdom_headers
* only the normalization has been added.
* It computes the Euler roll, pitch yaw from a tf2::Quaternion
* It is equivalent to tf2::Matrix3x3(q).getEulerYPR(yaw, pitch, roll);
* \param q a tf2::Quaternion
* \param yaw the computed yaw
* \param pitch the computed pitch
* \param roll the computed roll
*/
inline
void getEulerYPR(const tf2::Quaternion& q, double &yaw, double &pitch, double &roll)
{
double sqw;
double sqx;
double sqy;
double sqz;
sqx = q.x() * q.x();
sqy = q.y() * q.y();
sqz = q.z() * q.z();
sqw = q.w() * q.w();
// Cases derived from https://orbitalstation.wordpress.com/tag/quaternion/
double sarg = -2 * (q.x()*q.z() - q.w()*q.y()) / (sqx + sqy + sqz + sqw); /* normalization added from urdfom_headers */
if (sarg <= -0.99999) {
pitch = -0.5*M_PI;
roll = 0;
yaw = -2 * atan2(q.y(), q.x());
} else if (sarg >= 0.99999) {
pitch = 0.5*M_PI;
roll = 0;
yaw = 2 * atan2(q.y(), q.x());
} else {
pitch = asin(sarg);
roll = atan2(2 * (q.y()*q.z() + q.w()*q.x()), sqw - sqx - sqy + sqz);
yaw = atan2(2 * (q.x()*q.y() + q.w()*q.z()), sqw + sqx - sqy - sqz);
}
};
/** The code below is a simplified version of getEulerRPY that only
* returns the yaw. It is mostly useful in navigation where only yaw
* matters
* \param q a tf2::Quaternion
* \return the computed yaw
*/
inline
double getYaw(const tf2::Quaternion& q)
{
double yaw;
double sqw;
double sqx;
double sqy;
double sqz;
sqx = q.x() * q.x();
sqy = q.y() * q.y();
sqz = q.z() * q.z();
sqw = q.w() * q.w();
// Cases derived from https://orbitalstation.wordpress.com/tag/quaternion/
double sarg = -2 * (q.x()*q.z() - q.w()*q.y()) / (sqx + sqy + sqz + sqw); /* normalization added from urdfom_headers */
if (sarg <= -0.99999) {
yaw = -2 * atan2(q.y(), q.x());
} else if (sarg >= 0.99999) {
yaw = 2 * atan2(q.y(), q.x());
} else {
yaw = atan2(2 * (q.x()*q.y() + q.w()*q.z()), sqw + sqx - sqy - sqz);
}
return yaw;
};
}
}
#endif //TF2_IMPL_UTILS_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/impl/convert.h | /*
* Copyright (c) 2013, Open Source Robotics Foundation
* 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, Inc. 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.
*/
#ifndef TF2_IMPL_CONVERT_H
#define TF2_IMPL_CONVERT_H
namespace tf2 {
namespace impl {
template <bool IS_MESSAGE_A, bool IS_MESSAGE_B>
class Converter {
public:
template<typename A, typename B>
static void convert(const A& a, B& b);
};
// The case where both A and B are messages should not happen: if you have two
// messages that are interchangeable, well, that's against the ROS purpose:
// only use one type. Worst comes to worst, specialize the original convert
// function for your types.
// if B == A, the templated version of convert with only one argument will be
// used.
//
//template <>
//template <typename A, typename B>
//inline void Converter<true, true>::convert(const A& a, B& b);
template <>
template <typename A, typename B>
inline void Converter<true, false>::convert(const A& a, B& b)
{
fromMsg(a, b);
}
template <>
template <typename A, typename B>
inline void Converter<false, true>::convert(const A& a, B& b)
{
b = toMsg(a);
}
template <>
template <typename A, typename B>
inline void Converter<false, false>::convert(const A& a, B& b)
{
fromMsg(toMsg(a), b);
}
}
}
#endif //TF2_IMPL_CONVERT_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/MinMax.h | /*
Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef GEN_MINMAX_H
#define GEN_MINMAX_H
template <class T>
TF2SIMD_FORCE_INLINE const T& tf2Min(const T& a, const T& b)
{
return a < b ? a : b ;
}
template <class T>
TF2SIMD_FORCE_INLINE const T& tf2Max(const T& a, const T& b)
{
return a > b ? a : b;
}
template <class T>
TF2SIMD_FORCE_INLINE const T& GEN_clamped(const T& a, const T& lb, const T& ub)
{
return a < lb ? lb : (ub < a ? ub : a);
}
template <class T>
TF2SIMD_FORCE_INLINE void tf2SetMin(T& a, const T& b)
{
if (b < a)
{
a = b;
}
}
template <class T>
TF2SIMD_FORCE_INLINE void tf2SetMax(T& a, const T& b)
{
if (a < b)
{
a = b;
}
}
template <class T>
TF2SIMD_FORCE_INLINE void GEN_clamp(T& a, const T& lb, const T& ub)
{
if (a < lb)
{
a = lb;
}
else if (ub < a)
{
a = ub;
}
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/Matrix3x3.h | /*
Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef TF2_MATRIX3x3_H
#define TF2_MATRIX3x3_H
#include "Vector3.h"
#include "Quaternion.h"
namespace tf2
{
#define Matrix3x3Data Matrix3x3DoubleData
/**@brief The Matrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with Quaternion, Transform and Vector3.
* Make sure to only include a pure orthogonal matrix without scaling. */
class Matrix3x3 {
///Data storage for the matrix, each vector is a row of the matrix
Vector3 m_el[3];
public:
/** @brief No initializaion constructor */
Matrix3x3 () {}
// explicit Matrix3x3(const tf2Scalar *m) { setFromOpenGLSubMatrix(m); }
/**@brief Constructor from Quaternion */
explicit Matrix3x3(const Quaternion& q) { setRotation(q); }
/*
template <typename tf2Scalar>
Matrix3x3(const tf2Scalar& yaw, const tf2Scalar& pitch, const tf2Scalar& roll)
{
setEulerYPR(yaw, pitch, roll);
}
*/
/** @brief Constructor with row major formatting */
Matrix3x3(const tf2Scalar& xx, const tf2Scalar& xy, const tf2Scalar& xz,
const tf2Scalar& yx, const tf2Scalar& yy, const tf2Scalar& yz,
const tf2Scalar& zx, const tf2Scalar& zy, const tf2Scalar& zz)
{
setValue(xx, xy, xz,
yx, yy, yz,
zx, zy, zz);
}
/** @brief Copy constructor */
TF2SIMD_FORCE_INLINE Matrix3x3 (const Matrix3x3& other)
{
m_el[0] = other.m_el[0];
m_el[1] = other.m_el[1];
m_el[2] = other.m_el[2];
}
/** @brief Assignment Operator */
TF2SIMD_FORCE_INLINE Matrix3x3& operator=(const Matrix3x3& other)
{
m_el[0] = other.m_el[0];
m_el[1] = other.m_el[1];
m_el[2] = other.m_el[2];
return *this;
}
/** @brief Get a column of the matrix as a vector
* @param i Column number 0 indexed */
TF2SIMD_FORCE_INLINE Vector3 getColumn(int i) const
{
return Vector3(m_el[0][i],m_el[1][i],m_el[2][i]);
}
/** @brief Get a row of the matrix as a vector
* @param i Row number 0 indexed */
TF2SIMD_FORCE_INLINE const Vector3& getRow(int i) const
{
tf2FullAssert(0 <= i && i < 3);
return m_el[i];
}
/** @brief Get a mutable reference to a row of the matrix as a vector
* @param i Row number 0 indexed */
TF2SIMD_FORCE_INLINE Vector3& operator[](int i)
{
tf2FullAssert(0 <= i && i < 3);
return m_el[i];
}
/** @brief Get a const reference to a row of the matrix as a vector
* @param i Row number 0 indexed */
TF2SIMD_FORCE_INLINE const Vector3& operator[](int i) const
{
tf2FullAssert(0 <= i && i < 3);
return m_el[i];
}
/** @brief Multiply by the target matrix on the right
* @param m Rotation matrix to be applied
* Equivilant to this = this * m */
Matrix3x3& operator*=(const Matrix3x3& m);
/** @brief Set from a carray of tf2Scalars
* @param m A pointer to the beginning of an array of 9 tf2Scalars */
void setFromOpenGLSubMatrix(const tf2Scalar *m)
{
m_el[0].setValue(m[0],m[4],m[8]);
m_el[1].setValue(m[1],m[5],m[9]);
m_el[2].setValue(m[2],m[6],m[10]);
}
/** @brief Set the values of the matrix explicitly (row major)
* @param xx Top left
* @param xy Top Middle
* @param xz Top Right
* @param yx Middle Left
* @param yy Middle Middle
* @param yz Middle Right
* @param zx Bottom Left
* @param zy Bottom Middle
* @param zz Bottom Right*/
void setValue(const tf2Scalar& xx, const tf2Scalar& xy, const tf2Scalar& xz,
const tf2Scalar& yx, const tf2Scalar& yy, const tf2Scalar& yz,
const tf2Scalar& zx, const tf2Scalar& zy, const tf2Scalar& zz)
{
m_el[0].setValue(xx,xy,xz);
m_el[1].setValue(yx,yy,yz);
m_el[2].setValue(zx,zy,zz);
}
/** @brief Set the matrix from a quaternion
* @param q The Quaternion to match */
void setRotation(const Quaternion& q)
{
tf2Scalar d = q.length2();
tf2FullAssert(d != tf2Scalar(0.0));
tf2Scalar s = tf2Scalar(2.0) / d;
tf2Scalar xs = q.x() * s, ys = q.y() * s, zs = q.z() * s;
tf2Scalar wx = q.w() * xs, wy = q.w() * ys, wz = q.w() * zs;
tf2Scalar xx = q.x() * xs, xy = q.x() * ys, xz = q.x() * zs;
tf2Scalar yy = q.y() * ys, yz = q.y() * zs, zz = q.z() * zs;
setValue(tf2Scalar(1.0) - (yy + zz), xy - wz, xz + wy,
xy + wz, tf2Scalar(1.0) - (xx + zz), yz - wx,
xz - wy, yz + wx, tf2Scalar(1.0) - (xx + yy));
}
/** @brief Set the matrix from euler angles using YPR around ZYX respectively
* @param yaw Yaw about Z axis
* @param pitch Pitch about Y axis
* @param roll Roll about X axis
*/
void setEulerZYX(const tf2Scalar& yaw, const tf2Scalar& pitch, const tf2Scalar& roll) __attribute__((deprecated))
{
setEulerYPR(yaw, pitch, roll);
}
/** @brief Set the matrix from euler angles YPR around ZYX axes
* @param eulerZ Yaw aboud Z axis
* @param eulerY Pitch around Y axis
* @param eulerX Roll about X axis
*
* These angles are used to produce a rotation matrix. The euler
* angles are applied in ZYX order. I.e a vector is first rotated
* about X then Y and then Z
**/
void setEulerYPR(tf2Scalar eulerZ, tf2Scalar eulerY,tf2Scalar eulerX) {
tf2Scalar ci ( tf2Cos(eulerX));
tf2Scalar cj ( tf2Cos(eulerY));
tf2Scalar ch ( tf2Cos(eulerZ));
tf2Scalar si ( tf2Sin(eulerX));
tf2Scalar sj ( tf2Sin(eulerY));
tf2Scalar sh ( tf2Sin(eulerZ));
tf2Scalar cc = ci * ch;
tf2Scalar cs = ci * sh;
tf2Scalar sc = si * ch;
tf2Scalar ss = si * sh;
setValue(cj * ch, sj * sc - cs, sj * cc + ss,
cj * sh, sj * ss + cc, sj * cs - sc,
-sj, cj * si, cj * ci);
}
/** @brief Set the matrix using RPY about XYZ fixed axes
* @param roll Roll about X axis
* @param pitch Pitch around Y axis
* @param yaw Yaw aboud Z axis
*
**/
void setRPY(tf2Scalar roll, tf2Scalar pitch,tf2Scalar yaw) {
setEulerYPR(yaw, pitch, roll);
}
/**@brief Set the matrix to the identity */
void setIdentity()
{
setValue(tf2Scalar(1.0), tf2Scalar(0.0), tf2Scalar(0.0),
tf2Scalar(0.0), tf2Scalar(1.0), tf2Scalar(0.0),
tf2Scalar(0.0), tf2Scalar(0.0), tf2Scalar(1.0));
}
static const Matrix3x3& getIdentity()
{
static const Matrix3x3 identityMatrix(tf2Scalar(1.0), tf2Scalar(0.0), tf2Scalar(0.0),
tf2Scalar(0.0), tf2Scalar(1.0), tf2Scalar(0.0),
tf2Scalar(0.0), tf2Scalar(0.0), tf2Scalar(1.0));
return identityMatrix;
}
/**@brief Fill the values of the matrix into a 9 element array
* @param m The array to be filled */
void getOpenGLSubMatrix(tf2Scalar *m) const
{
m[0] = tf2Scalar(m_el[0].x());
m[1] = tf2Scalar(m_el[1].x());
m[2] = tf2Scalar(m_el[2].x());
m[3] = tf2Scalar(0.0);
m[4] = tf2Scalar(m_el[0].y());
m[5] = tf2Scalar(m_el[1].y());
m[6] = tf2Scalar(m_el[2].y());
m[7] = tf2Scalar(0.0);
m[8] = tf2Scalar(m_el[0].z());
m[9] = tf2Scalar(m_el[1].z());
m[10] = tf2Scalar(m_el[2].z());
m[11] = tf2Scalar(0.0);
}
/**@brief Get the matrix represented as a quaternion
* @param q The quaternion which will be set */
void getRotation(Quaternion& q) const
{
tf2Scalar trace = m_el[0].x() + m_el[1].y() + m_el[2].z();
tf2Scalar temp[4];
if (trace > tf2Scalar(0.0))
{
tf2Scalar s = tf2Sqrt(trace + tf2Scalar(1.0));
temp[3]=(s * tf2Scalar(0.5));
s = tf2Scalar(0.5) / s;
temp[0]=((m_el[2].y() - m_el[1].z()) * s);
temp[1]=((m_el[0].z() - m_el[2].x()) * s);
temp[2]=((m_el[1].x() - m_el[0].y()) * s);
}
else
{
int i = m_el[0].x() < m_el[1].y() ?
(m_el[1].y() < m_el[2].z() ? 2 : 1) :
(m_el[0].x() < m_el[2].z() ? 2 : 0);
int j = (i + 1) % 3;
int k = (i + 2) % 3;
tf2Scalar s = tf2Sqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + tf2Scalar(1.0));
temp[i] = s * tf2Scalar(0.5);
s = tf2Scalar(0.5) / s;
temp[3] = (m_el[k][j] - m_el[j][k]) * s;
temp[j] = (m_el[j][i] + m_el[i][j]) * s;
temp[k] = (m_el[k][i] + m_el[i][k]) * s;
}
q.setValue(temp[0],temp[1],temp[2],temp[3]);
}
/**@brief Get the matrix represented as euler angles around ZYX
* @param yaw Yaw around Z axis
* @param pitch Pitch around Y axis
* @param roll around X axis
* @param solution_number Which solution of two possible solutions ( 1 or 2) are possible values*/
__attribute__((deprecated)) void getEulerZYX(tf2Scalar& yaw, tf2Scalar& pitch, tf2Scalar& roll, unsigned int solution_number = 1) const
{
getEulerYPR(yaw, pitch, roll, solution_number);
};
/**@brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR
* @param yaw Yaw around Z axis
* @param pitch Pitch around Y axis
* @param roll around X axis */
void getEulerYPR(tf2Scalar& yaw, tf2Scalar& pitch, tf2Scalar& roll, unsigned int solution_number = 1) const
{
struct Euler
{
tf2Scalar yaw;
tf2Scalar pitch;
tf2Scalar roll;
};
Euler euler_out;
Euler euler_out2; //second solution
//get the pointer to the raw data
// Check that pitch is not at a singularity
// Check that pitch is not at a singularity
if (tf2Fabs(m_el[2].x()) >= 1)
{
euler_out.yaw = 0;
euler_out2.yaw = 0;
// From difference of angles formula
tf2Scalar delta = tf2Atan2(m_el[2].y(),m_el[2].z());
if (m_el[2].x() < 0) //gimbal locked down
{
euler_out.pitch = TF2SIMD_PI / tf2Scalar(2.0);
euler_out2.pitch = TF2SIMD_PI / tf2Scalar(2.0);
euler_out.roll = delta;
euler_out2.roll = delta;
}
else // gimbal locked up
{
euler_out.pitch = -TF2SIMD_PI / tf2Scalar(2.0);
euler_out2.pitch = -TF2SIMD_PI / tf2Scalar(2.0);
euler_out.roll = delta;
euler_out2.roll = delta;
}
}
else
{
euler_out.pitch = - tf2Asin(m_el[2].x());
euler_out2.pitch = TF2SIMD_PI - euler_out.pitch;
euler_out.roll = tf2Atan2(m_el[2].y()/tf2Cos(euler_out.pitch),
m_el[2].z()/tf2Cos(euler_out.pitch));
euler_out2.roll = tf2Atan2(m_el[2].y()/tf2Cos(euler_out2.pitch),
m_el[2].z()/tf2Cos(euler_out2.pitch));
euler_out.yaw = tf2Atan2(m_el[1].x()/tf2Cos(euler_out.pitch),
m_el[0].x()/tf2Cos(euler_out.pitch));
euler_out2.yaw = tf2Atan2(m_el[1].x()/tf2Cos(euler_out2.pitch),
m_el[0].x()/tf2Cos(euler_out2.pitch));
}
if (solution_number == 1)
{
yaw = euler_out.yaw;
pitch = euler_out.pitch;
roll = euler_out.roll;
}
else
{
yaw = euler_out2.yaw;
pitch = euler_out2.pitch;
roll = euler_out2.roll;
}
}
/**@brief Get the matrix represented as roll pitch and yaw about fixed axes XYZ
* @param roll around X axis
* @param pitch Pitch around Y axis
* @param yaw Yaw around Z axis
* @param solution_number Which solution of two possible solutions ( 1 or 2) are possible values*/
void getRPY(tf2Scalar& roll, tf2Scalar& pitch, tf2Scalar& yaw, unsigned int solution_number = 1) const
{
getEulerYPR(yaw, pitch, roll, solution_number);
}
/**@brief Create a scaled copy of the matrix
* @param s Scaling vector The elements of the vector will scale each column */
Matrix3x3 scaled(const Vector3& s) const
{
return Matrix3x3(m_el[0].x() * s.x(), m_el[0].y() * s.y(), m_el[0].z() * s.z(),
m_el[1].x() * s.x(), m_el[1].y() * s.y(), m_el[1].z() * s.z(),
m_el[2].x() * s.x(), m_el[2].y() * s.y(), m_el[2].z() * s.z());
}
/**@brief Return the determinant of the matrix */
tf2Scalar determinant() const;
/**@brief Return the adjoint of the matrix */
Matrix3x3 adjoint() const;
/**@brief Return the matrix with all values non negative */
Matrix3x3 absolute() const;
/**@brief Return the transpose of the matrix */
Matrix3x3 transpose() const;
/**@brief Return the inverse of the matrix */
Matrix3x3 inverse() const;
Matrix3x3 transposeTimes(const Matrix3x3& m) const;
Matrix3x3 timesTranspose(const Matrix3x3& m) const;
TF2SIMD_FORCE_INLINE tf2Scalar tdotx(const Vector3& v) const
{
return m_el[0].x() * v.x() + m_el[1].x() * v.y() + m_el[2].x() * v.z();
}
TF2SIMD_FORCE_INLINE tf2Scalar tdoty(const Vector3& v) const
{
return m_el[0].y() * v.x() + m_el[1].y() * v.y() + m_el[2].y() * v.z();
}
TF2SIMD_FORCE_INLINE tf2Scalar tdotz(const Vector3& v) const
{
return m_el[0].z() * v.x() + m_el[1].z() * v.y() + m_el[2].z() * v.z();
}
/**@brief diagonalizes this matrix by the Jacobi method.
* @param rot stores the rotation from the coordinate system in which the matrix is diagonal to the original
* coordinate system, i.e., old_this = rot * new_this * rot^T.
* @param threshold See iteration
* @param iteration The iteration stops when all off-diagonal elements are less than the threshold multiplied
* by the sum of the absolute values of the diagonal, or when maxSteps have been executed.
*
* Note that this matrix is assumed to be symmetric.
*/
void diagonalize(Matrix3x3& rot, tf2Scalar threshold, int maxSteps)
{
rot.setIdentity();
for (int step = maxSteps; step > 0; step--)
{
// find off-diagonal element [p][q] with largest magnitude
int p = 0;
int q = 1;
int r = 2;
tf2Scalar max = tf2Fabs(m_el[0][1]);
tf2Scalar v = tf2Fabs(m_el[0][2]);
if (v > max)
{
q = 2;
r = 1;
max = v;
}
v = tf2Fabs(m_el[1][2]);
if (v > max)
{
p = 1;
q = 2;
r = 0;
max = v;
}
tf2Scalar t = threshold * (tf2Fabs(m_el[0][0]) + tf2Fabs(m_el[1][1]) + tf2Fabs(m_el[2][2]));
if (max <= t)
{
if (max <= TF2SIMD_EPSILON * t)
{
return;
}
step = 1;
}
// compute Jacobi rotation J which leads to a zero for element [p][q]
tf2Scalar mpq = m_el[p][q];
tf2Scalar theta = (m_el[q][q] - m_el[p][p]) / (2 * mpq);
tf2Scalar theta2 = theta * theta;
tf2Scalar cos;
tf2Scalar sin;
if (theta2 * theta2 < tf2Scalar(10 / TF2SIMD_EPSILON))
{
t = (theta >= 0) ? 1 / (theta + tf2Sqrt(1 + theta2))
: 1 / (theta - tf2Sqrt(1 + theta2));
cos = 1 / tf2Sqrt(1 + t * t);
sin = cos * t;
}
else
{
// approximation for large theta-value, i.e., a nearly diagonal matrix
t = 1 / (theta * (2 + tf2Scalar(0.5) / theta2));
cos = 1 - tf2Scalar(0.5) * t * t;
sin = cos * t;
}
// apply rotation to matrix (this = J^T * this * J)
m_el[p][q] = m_el[q][p] = 0;
m_el[p][p] -= t * mpq;
m_el[q][q] += t * mpq;
tf2Scalar mrp = m_el[r][p];
tf2Scalar mrq = m_el[r][q];
m_el[r][p] = m_el[p][r] = cos * mrp - sin * mrq;
m_el[r][q] = m_el[q][r] = cos * mrq + sin * mrp;
// apply rotation to rot (rot = rot * J)
for (int i = 0; i < 3; i++)
{
Vector3& row = rot[i];
mrp = row[p];
mrq = row[q];
row[p] = cos * mrp - sin * mrq;
row[q] = cos * mrq + sin * mrp;
}
}
}
/**@brief Calculate the matrix cofactor
* @param r1 The first row to use for calculating the cofactor
* @param c1 The first column to use for calculating the cofactor
* @param r1 The second row to use for calculating the cofactor
* @param c1 The second column to use for calculating the cofactor
* See http://en.wikipedia.org/wiki/Cofactor_(linear_algebra) for more details
*/
tf2Scalar cofac(int r1, int c1, int r2, int c2) const
{
return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1];
}
void serialize(struct Matrix3x3Data& dataOut) const;
void serializeFloat(struct Matrix3x3FloatData& dataOut) const;
void deSerialize(const struct Matrix3x3Data& dataIn);
void deSerializeFloat(const struct Matrix3x3FloatData& dataIn);
void deSerializeDouble(const struct Matrix3x3DoubleData& dataIn);
};
TF2SIMD_FORCE_INLINE Matrix3x3&
Matrix3x3::operator*=(const Matrix3x3& m)
{
setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]),
m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]),
m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2]));
return *this;
}
TF2SIMD_FORCE_INLINE tf2Scalar
Matrix3x3::determinant() const
{
return tf2Triple((*this)[0], (*this)[1], (*this)[2]);
}
TF2SIMD_FORCE_INLINE Matrix3x3
Matrix3x3::absolute() const
{
return Matrix3x3(
tf2Fabs(m_el[0].x()), tf2Fabs(m_el[0].y()), tf2Fabs(m_el[0].z()),
tf2Fabs(m_el[1].x()), tf2Fabs(m_el[1].y()), tf2Fabs(m_el[1].z()),
tf2Fabs(m_el[2].x()), tf2Fabs(m_el[2].y()), tf2Fabs(m_el[2].z()));
}
TF2SIMD_FORCE_INLINE Matrix3x3
Matrix3x3::transpose() const
{
return Matrix3x3(m_el[0].x(), m_el[1].x(), m_el[2].x(),
m_el[0].y(), m_el[1].y(), m_el[2].y(),
m_el[0].z(), m_el[1].z(), m_el[2].z());
}
TF2SIMD_FORCE_INLINE Matrix3x3
Matrix3x3::adjoint() const
{
return Matrix3x3(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2),
cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0),
cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1));
}
TF2SIMD_FORCE_INLINE Matrix3x3
Matrix3x3::inverse() const
{
Vector3 co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1));
tf2Scalar det = (*this)[0].dot(co);
tf2FullAssert(det != tf2Scalar(0.0));
tf2Scalar s = tf2Scalar(1.0) / det;
return Matrix3x3(co.x() * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s,
co.y() * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s,
co.z() * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s);
}
TF2SIMD_FORCE_INLINE Matrix3x3
Matrix3x3::transposeTimes(const Matrix3x3& m) const
{
return Matrix3x3(
m_el[0].x() * m[0].x() + m_el[1].x() * m[1].x() + m_el[2].x() * m[2].x(),
m_el[0].x() * m[0].y() + m_el[1].x() * m[1].y() + m_el[2].x() * m[2].y(),
m_el[0].x() * m[0].z() + m_el[1].x() * m[1].z() + m_el[2].x() * m[2].z(),
m_el[0].y() * m[0].x() + m_el[1].y() * m[1].x() + m_el[2].y() * m[2].x(),
m_el[0].y() * m[0].y() + m_el[1].y() * m[1].y() + m_el[2].y() * m[2].y(),
m_el[0].y() * m[0].z() + m_el[1].y() * m[1].z() + m_el[2].y() * m[2].z(),
m_el[0].z() * m[0].x() + m_el[1].z() * m[1].x() + m_el[2].z() * m[2].x(),
m_el[0].z() * m[0].y() + m_el[1].z() * m[1].y() + m_el[2].z() * m[2].y(),
m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].z());
}
TF2SIMD_FORCE_INLINE Matrix3x3
Matrix3x3::timesTranspose(const Matrix3x3& m) const
{
return Matrix3x3(
m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]),
m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]),
m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2]));
}
TF2SIMD_FORCE_INLINE Vector3
operator*(const Matrix3x3& m, const Vector3& v)
{
return Vector3(m[0].dot(v), m[1].dot(v), m[2].dot(v));
}
TF2SIMD_FORCE_INLINE Vector3
operator*(const Vector3& v, const Matrix3x3& m)
{
return Vector3(m.tdotx(v), m.tdoty(v), m.tdotz(v));
}
TF2SIMD_FORCE_INLINE Matrix3x3
operator*(const Matrix3x3& m1, const Matrix3x3& m2)
{
return Matrix3x3(
m2.tdotx( m1[0]), m2.tdoty( m1[0]), m2.tdotz( m1[0]),
m2.tdotx( m1[1]), m2.tdoty( m1[1]), m2.tdotz( m1[1]),
m2.tdotx( m1[2]), m2.tdoty( m1[2]), m2.tdotz( m1[2]));
}
/*
TF2SIMD_FORCE_INLINE Matrix3x3 tf2MultTransposeLeft(const Matrix3x3& m1, const Matrix3x3& m2) {
return Matrix3x3(
m1[0][0] * m2[0][0] + m1[1][0] * m2[1][0] + m1[2][0] * m2[2][0],
m1[0][0] * m2[0][1] + m1[1][0] * m2[1][1] + m1[2][0] * m2[2][1],
m1[0][0] * m2[0][2] + m1[1][0] * m2[1][2] + m1[2][0] * m2[2][2],
m1[0][1] * m2[0][0] + m1[1][1] * m2[1][0] + m1[2][1] * m2[2][0],
m1[0][1] * m2[0][1] + m1[1][1] * m2[1][1] + m1[2][1] * m2[2][1],
m1[0][1] * m2[0][2] + m1[1][1] * m2[1][2] + m1[2][1] * m2[2][2],
m1[0][2] * m2[0][0] + m1[1][2] * m2[1][0] + m1[2][2] * m2[2][0],
m1[0][2] * m2[0][1] + m1[1][2] * m2[1][1] + m1[2][2] * m2[2][1],
m1[0][2] * m2[0][2] + m1[1][2] * m2[1][2] + m1[2][2] * m2[2][2]);
}
*/
/**@brief Equality operator between two matrices
* It will test all elements are equal. */
TF2SIMD_FORCE_INLINE bool operator==(const Matrix3x3& m1, const Matrix3x3& m2)
{
return ( m1[0][0] == m2[0][0] && m1[1][0] == m2[1][0] && m1[2][0] == m2[2][0] &&
m1[0][1] == m2[0][1] && m1[1][1] == m2[1][1] && m1[2][1] == m2[2][1] &&
m1[0][2] == m2[0][2] && m1[1][2] == m2[1][2] && m1[2][2] == m2[2][2] );
}
///for serialization
struct Matrix3x3FloatData
{
Vector3FloatData m_el[3];
};
///for serialization
struct Matrix3x3DoubleData
{
Vector3DoubleData m_el[3];
};
TF2SIMD_FORCE_INLINE void Matrix3x3::serialize(struct Matrix3x3Data& dataOut) const
{
for (int i=0;i<3;i++)
m_el[i].serialize(dataOut.m_el[i]);
}
TF2SIMD_FORCE_INLINE void Matrix3x3::serializeFloat(struct Matrix3x3FloatData& dataOut) const
{
for (int i=0;i<3;i++)
m_el[i].serializeFloat(dataOut.m_el[i]);
}
TF2SIMD_FORCE_INLINE void Matrix3x3::deSerialize(const struct Matrix3x3Data& dataIn)
{
for (int i=0;i<3;i++)
m_el[i].deSerialize(dataIn.m_el[i]);
}
TF2SIMD_FORCE_INLINE void Matrix3x3::deSerializeFloat(const struct Matrix3x3FloatData& dataIn)
{
for (int i=0;i<3;i++)
m_el[i].deSerializeFloat(dataIn.m_el[i]);
}
TF2SIMD_FORCE_INLINE void Matrix3x3::deSerializeDouble(const struct Matrix3x3DoubleData& dataIn)
{
for (int i=0;i<3;i++)
m_el[i].deSerializeDouble(dataIn.m_el[i]);
}
}
#endif //TF2_MATRIX3x3_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/QuadWord.h | /*
Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef TF2SIMD_QUADWORD_H
#define TF2SIMD_QUADWORD_H
#include "Scalar.h"
#include "MinMax.h"
#if defined (__CELLOS_LV2) && defined (__SPU__)
#include <altivec.h>
#endif
namespace tf2
{
/**@brief The QuadWord class is base class for Vector3 and Quaternion.
* Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword.
*/
#ifndef USE_LIBSPE2
ATTRIBUTE_ALIGNED16(class) QuadWord
#else
class QuadWord
#endif
{
protected:
#if defined (__SPU__) && defined (__CELLOS_LV2__)
union {
vec_float4 mVec128;
tf2Scalar m_floats[4];
};
public:
vec_float4 get128() const
{
return mVec128;
}
protected:
#else //__CELLOS_LV2__ __SPU__
tf2Scalar m_floats[4];
#endif //__CELLOS_LV2__ __SPU__
public:
/**@brief Return the x value */
TF2SIMD_FORCE_INLINE const tf2Scalar& getX() const { return m_floats[0]; }
/**@brief Return the y value */
TF2SIMD_FORCE_INLINE const tf2Scalar& getY() const { return m_floats[1]; }
/**@brief Return the z value */
TF2SIMD_FORCE_INLINE const tf2Scalar& getZ() const { return m_floats[2]; }
/**@brief Set the x value */
TF2SIMD_FORCE_INLINE void setX(tf2Scalar x) { m_floats[0] = x;};
/**@brief Set the y value */
TF2SIMD_FORCE_INLINE void setY(tf2Scalar y) { m_floats[1] = y;};
/**@brief Set the z value */
TF2SIMD_FORCE_INLINE void setZ(tf2Scalar z) { m_floats[2] = z;};
/**@brief Set the w value */
TF2SIMD_FORCE_INLINE void setW(tf2Scalar w) { m_floats[3] = w;};
/**@brief Return the x value */
TF2SIMD_FORCE_INLINE const tf2Scalar& x() const { return m_floats[0]; }
/**@brief Return the y value */
TF2SIMD_FORCE_INLINE const tf2Scalar& y() const { return m_floats[1]; }
/**@brief Return the z value */
TF2SIMD_FORCE_INLINE const tf2Scalar& z() const { return m_floats[2]; }
/**@brief Return the w value */
TF2SIMD_FORCE_INLINE const tf2Scalar& w() const { return m_floats[3]; }
//TF2SIMD_FORCE_INLINE tf2Scalar& operator[](int i) { return (&m_floats[0])[i]; }
//TF2SIMD_FORCE_INLINE const tf2Scalar& operator[](int i) const { return (&m_floats[0])[i]; }
///operator tf2Scalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.
TF2SIMD_FORCE_INLINE operator tf2Scalar *() { return &m_floats[0]; }
TF2SIMD_FORCE_INLINE operator const tf2Scalar *() const { return &m_floats[0]; }
TF2SIMD_FORCE_INLINE bool operator==(const QuadWord& other) const
{
return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0]));
}
TF2SIMD_FORCE_INLINE bool operator!=(const QuadWord& other) const
{
return !(*this == other);
}
/**@brief Set x,y,z and zero w
* @param x Value of x
* @param y Value of y
* @param z Value of z
*/
TF2SIMD_FORCE_INLINE void setValue(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z)
{
m_floats[0]=x;
m_floats[1]=y;
m_floats[2]=z;
m_floats[3] = 0.f;
}
/* void getValue(tf2Scalar *m) const
{
m[0] = m_floats[0];
m[1] = m_floats[1];
m[2] = m_floats[2];
}
*/
/**@brief Set the values
* @param x Value of x
* @param y Value of y
* @param z Value of z
* @param w Value of w
*/
TF2SIMD_FORCE_INLINE void setValue(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z,const tf2Scalar& w)
{
m_floats[0]=x;
m_floats[1]=y;
m_floats[2]=z;
m_floats[3]=w;
}
/**@brief No initialization constructor */
TF2SIMD_FORCE_INLINE QuadWord()
// :m_floats[0](tf2Scalar(0.)),m_floats[1](tf2Scalar(0.)),m_floats[2](tf2Scalar(0.)),m_floats[3](tf2Scalar(0.))
{
}
/**@brief Three argument constructor (zeros w)
* @param x Value of x
* @param y Value of y
* @param z Value of z
*/
TF2SIMD_FORCE_INLINE QuadWord(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z)
{
m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = 0.0f;
}
/**@brief Initializing constructor
* @param x Value of x
* @param y Value of y
* @param z Value of z
* @param w Value of w
*/
TF2SIMD_FORCE_INLINE QuadWord(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z,const tf2Scalar& w)
{
m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = w;
}
/**@brief Set each element to the max of the current values and the values of another QuadWord
* @param other The other QuadWord to compare with
*/
TF2SIMD_FORCE_INLINE void setMax(const QuadWord& other)
{
tf2SetMax(m_floats[0], other.m_floats[0]);
tf2SetMax(m_floats[1], other.m_floats[1]);
tf2SetMax(m_floats[2], other.m_floats[2]);
tf2SetMax(m_floats[3], other.m_floats[3]);
}
/**@brief Set each element to the min of the current values and the values of another QuadWord
* @param other The other QuadWord to compare with
*/
TF2SIMD_FORCE_INLINE void setMin(const QuadWord& other)
{
tf2SetMin(m_floats[0], other.m_floats[0]);
tf2SetMin(m_floats[1], other.m_floats[1]);
tf2SetMin(m_floats[2], other.m_floats[2]);
tf2SetMin(m_floats[3], other.m_floats[3]);
}
};
}
#endif //TF2SIMD_QUADWORD_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/Quaternion.h | /*
Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef TF2_QUATERNION_H_
#define TF2_QUATERNION_H_
#include "Vector3.h"
#include "QuadWord.h"
namespace tf2
{
/**@brief The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x3, Vector3 and Transform. */
class Quaternion : public QuadWord {
public:
/**@brief No initialization constructor */
Quaternion() {}
// template <typename tf2Scalar>
// explicit Quaternion(const tf2Scalar *v) : Tuple4<tf2Scalar>(v) {}
/**@brief Constructor from scalars */
Quaternion(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z, const tf2Scalar& w)
: QuadWord(x, y, z, w)
{}
/**@brief Axis angle Constructor
* @param axis The axis which the rotation is around
* @param angle The magnitude of the rotation around the angle (Radians) */
Quaternion(const Vector3& axis, const tf2Scalar& angle)
{
setRotation(axis, angle);
}
/**@brief Constructor from Euler angles
* @param yaw Angle around Y unless TF2_EULER_DEFAULT_ZYX defined then Z
* @param pitch Angle around X unless TF2_EULER_DEFAULT_ZYX defined then Y
* @param roll Angle around Z unless TF2_EULER_DEFAULT_ZYX defined then X */
Quaternion(const tf2Scalar& yaw, const tf2Scalar& pitch, const tf2Scalar& roll) __attribute__((deprecated))
{
#ifndef TF2_EULER_DEFAULT_ZYX
setEuler(yaw, pitch, roll);
#else
setRPY(roll, pitch, yaw);
#endif
}
/**@brief Set the rotation using axis angle notation
* @param axis The axis around which to rotate
* @param angle The magnitude of the rotation in Radians */
void setRotation(const Vector3& axis, const tf2Scalar& angle)
{
tf2Scalar d = axis.length();
tf2Assert(d != tf2Scalar(0.0));
tf2Scalar s = tf2Sin(angle * tf2Scalar(0.5)) / d;
setValue(axis.x() * s, axis.y() * s, axis.z() * s,
tf2Cos(angle * tf2Scalar(0.5)));
}
/**@brief Set the quaternion using Euler angles
* @param yaw Angle around Y
* @param pitch Angle around X
* @param roll Angle around Z */
void setEuler(const tf2Scalar& yaw, const tf2Scalar& pitch, const tf2Scalar& roll)
{
tf2Scalar halfYaw = tf2Scalar(yaw) * tf2Scalar(0.5);
tf2Scalar halfPitch = tf2Scalar(pitch) * tf2Scalar(0.5);
tf2Scalar halfRoll = tf2Scalar(roll) * tf2Scalar(0.5);
tf2Scalar cosYaw = tf2Cos(halfYaw);
tf2Scalar sinYaw = tf2Sin(halfYaw);
tf2Scalar cosPitch = tf2Cos(halfPitch);
tf2Scalar sinPitch = tf2Sin(halfPitch);
tf2Scalar cosRoll = tf2Cos(halfRoll);
tf2Scalar sinRoll = tf2Sin(halfRoll);
setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
}
/**@brief Set the quaternion using fixed axis RPY
* @param roll Angle around X
* @param pitch Angle around Y
* @param yaw Angle around Z*/
void setRPY(const tf2Scalar& roll, const tf2Scalar& pitch, const tf2Scalar& yaw)
{
tf2Scalar halfYaw = tf2Scalar(yaw) * tf2Scalar(0.5);
tf2Scalar halfPitch = tf2Scalar(pitch) * tf2Scalar(0.5);
tf2Scalar halfRoll = tf2Scalar(roll) * tf2Scalar(0.5);
tf2Scalar cosYaw = tf2Cos(halfYaw);
tf2Scalar sinYaw = tf2Sin(halfYaw);
tf2Scalar cosPitch = tf2Cos(halfPitch);
tf2Scalar sinPitch = tf2Sin(halfPitch);
tf2Scalar cosRoll = tf2Cos(halfRoll);
tf2Scalar sinRoll = tf2Sin(halfRoll);
setValue(sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, //x
cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, //y
cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, //z
cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); //formerly yzx
}
/**@brief Set the quaternion using euler angles
* @param yaw Angle around Z
* @param pitch Angle around Y
* @param roll Angle around X */
void setEulerZYX(const tf2Scalar& yaw, const tf2Scalar& pitch, const tf2Scalar& roll) __attribute__((deprecated))
{
setRPY(roll, pitch, yaw);
}
/**@brief Add two quaternions
* @param q The quaternion to add to this one */
TF2SIMD_FORCE_INLINE Quaternion& operator+=(const Quaternion& q)
{
m_floats[0] += q.x(); m_floats[1] += q.y(); m_floats[2] += q.z(); m_floats[3] += q.m_floats[3];
return *this;
}
/**@brief Sutf2ract out a quaternion
* @param q The quaternion to sutf2ract from this one */
Quaternion& operator-=(const Quaternion& q)
{
m_floats[0] -= q.x(); m_floats[1] -= q.y(); m_floats[2] -= q.z(); m_floats[3] -= q.m_floats[3];
return *this;
}
/**@brief Scale this quaternion
* @param s The scalar to scale by */
Quaternion& operator*=(const tf2Scalar& s)
{
m_floats[0] *= s; m_floats[1] *= s; m_floats[2] *= s; m_floats[3] *= s;
return *this;
}
/**@brief Multiply this quaternion by q on the right
* @param q The other quaternion
* Equivilant to this = this * q */
Quaternion& operator*=(const Quaternion& q)
{
setValue(m_floats[3] * q.x() + m_floats[0] * q.m_floats[3] + m_floats[1] * q.z() - m_floats[2] * q.y(),
m_floats[3] * q.y() + m_floats[1] * q.m_floats[3] + m_floats[2] * q.x() - m_floats[0] * q.z(),
m_floats[3] * q.z() + m_floats[2] * q.m_floats[3] + m_floats[0] * q.y() - m_floats[1] * q.x(),
m_floats[3] * q.m_floats[3] - m_floats[0] * q.x() - m_floats[1] * q.y() - m_floats[2] * q.z());
return *this;
}
/**@brief Return the dot product between this quaternion and another
* @param q The other quaternion */
tf2Scalar dot(const Quaternion& q) const
{
return m_floats[0] * q.x() + m_floats[1] * q.y() + m_floats[2] * q.z() + m_floats[3] * q.m_floats[3];
}
/**@brief Return the length squared of the quaternion */
tf2Scalar length2() const
{
return dot(*this);
}
/**@brief Return the length of the quaternion */
tf2Scalar length() const
{
return tf2Sqrt(length2());
}
/**@brief Normalize the quaternion
* Such that x^2 + y^2 + z^2 +w^2 = 1 */
Quaternion& normalize()
{
return *this /= length();
}
/**@brief Return a scaled version of this quaternion
* @param s The scale factor */
TF2SIMD_FORCE_INLINE Quaternion
operator*(const tf2Scalar& s) const
{
return Quaternion(x() * s, y() * s, z() * s, m_floats[3] * s);
}
/**@brief Return an inversely scaled versionof this quaternion
* @param s The inverse scale factor */
Quaternion operator/(const tf2Scalar& s) const
{
tf2Assert(s != tf2Scalar(0.0));
return *this * (tf2Scalar(1.0) / s);
}
/**@brief Inversely scale this quaternion
* @param s The scale factor */
Quaternion& operator/=(const tf2Scalar& s)
{
tf2Assert(s != tf2Scalar(0.0));
return *this *= tf2Scalar(1.0) / s;
}
/**@brief Return a normalized version of this quaternion */
Quaternion normalized() const
{
return *this / length();
}
/**@brief Return the ***half*** angle between this quaternion and the other
* @param q The other quaternion */
tf2Scalar angle(const Quaternion& q) const
{
tf2Scalar s = tf2Sqrt(length2() * q.length2());
tf2Assert(s != tf2Scalar(0.0));
return tf2Acos(dot(q) / s);
}
/**@brief Return the angle between this quaternion and the other along the shortest path
* @param q The other quaternion */
tf2Scalar angleShortestPath(const Quaternion& q) const
{
tf2Scalar s = tf2Sqrt(length2() * q.length2());
tf2Assert(s != tf2Scalar(0.0));
if (dot(q) < 0) // Take care of long angle case see http://en.wikipedia.org/wiki/Slerp
return tf2Acos(dot(-q) / s) * tf2Scalar(2.0);
else
return tf2Acos(dot(q) / s) * tf2Scalar(2.0);
}
/**@brief Return the angle of rotation represented by this quaternion */
tf2Scalar getAngle() const
{
tf2Scalar s = tf2Scalar(2.) * tf2Acos(m_floats[3]);
return s;
}
/**@brief Return the angle of rotation represented by this quaternion along the shortest path*/
tf2Scalar getAngleShortestPath() const
{
tf2Scalar s;
if (dot(*this) < 0)
s = tf2Scalar(2.) * tf2Acos(m_floats[3]);
else
s = tf2Scalar(2.) * tf2Acos(-m_floats[3]);
return s;
}
/**@brief Return the axis of the rotation represented by this quaternion */
Vector3 getAxis() const
{
tf2Scalar s_squared = tf2Scalar(1.) - tf2Pow(m_floats[3], tf2Scalar(2.));
if (s_squared < tf2Scalar(10.) * TF2SIMD_EPSILON) //Check for divide by zero
return Vector3(1.0, 0.0, 0.0); // Arbitrary
tf2Scalar s = tf2Sqrt(s_squared);
return Vector3(m_floats[0] / s, m_floats[1] / s, m_floats[2] / s);
}
/**@brief Return the inverse of this quaternion */
Quaternion inverse() const
{
return Quaternion(-m_floats[0], -m_floats[1], -m_floats[2], m_floats[3]);
}
/**@brief Return the sum of this quaternion and the other
* @param q2 The other quaternion */
TF2SIMD_FORCE_INLINE Quaternion
operator+(const Quaternion& q2) const
{
const Quaternion& q1 = *this;
return Quaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_floats[3] + q2.m_floats[3]);
}
/**@brief Return the difference between this quaternion and the other
* @param q2 The other quaternion */
TF2SIMD_FORCE_INLINE Quaternion
operator-(const Quaternion& q2) const
{
const Quaternion& q1 = *this;
return Quaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_floats[3] - q2.m_floats[3]);
}
/**@brief Return the negative of this quaternion
* This simply negates each element */
TF2SIMD_FORCE_INLINE Quaternion operator-() const
{
const Quaternion& q2 = *this;
return Quaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_floats[3]);
}
/**@todo document this and it's use */
TF2SIMD_FORCE_INLINE Quaternion farthest( const Quaternion& qd) const
{
Quaternion diff,sum;
diff = *this - qd;
sum = *this + qd;
if( diff.dot(diff) > sum.dot(sum) )
return qd;
return (-qd);
}
/**@todo document this and it's use */
TF2SIMD_FORCE_INLINE Quaternion nearest( const Quaternion& qd) const
{
Quaternion diff,sum;
diff = *this - qd;
sum = *this + qd;
if( diff.dot(diff) < sum.dot(sum) )
return qd;
return (-qd);
}
/**@brief Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion
* @param q The other quaternion to interpolate with
* @param t The ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q.
* Slerp interpolates assuming constant velocity. */
Quaternion slerp(const Quaternion& q, const tf2Scalar& t) const
{
tf2Scalar theta = angleShortestPath(q) / tf2Scalar(2.0);
if (theta != tf2Scalar(0.0))
{
tf2Scalar d = tf2Scalar(1.0) / tf2Sin(theta);
tf2Scalar s0 = tf2Sin((tf2Scalar(1.0) - t) * theta);
tf2Scalar s1 = tf2Sin(t * theta);
if (dot(q) < 0) // Take care of long angle case see http://en.wikipedia.org/wiki/Slerp
return Quaternion((m_floats[0] * s0 + -q.x() * s1) * d,
(m_floats[1] * s0 + -q.y() * s1) * d,
(m_floats[2] * s0 + -q.z() * s1) * d,
(m_floats[3] * s0 + -q.m_floats[3] * s1) * d);
else
return Quaternion((m_floats[0] * s0 + q.x() * s1) * d,
(m_floats[1] * s0 + q.y() * s1) * d,
(m_floats[2] * s0 + q.z() * s1) * d,
(m_floats[3] * s0 + q.m_floats[3] * s1) * d);
}
else
{
return *this;
}
}
static const Quaternion& getIdentity()
{
static const Quaternion identityQuat(tf2Scalar(0.),tf2Scalar(0.),tf2Scalar(0.),tf2Scalar(1.));
return identityQuat;
}
TF2SIMD_FORCE_INLINE const tf2Scalar& getW() const { return m_floats[3]; }
};
/**@brief Return the negative of a quaternion */
TF2SIMD_FORCE_INLINE Quaternion
operator-(const Quaternion& q)
{
return Quaternion(-q.x(), -q.y(), -q.z(), -q.w());
}
/**@brief Return the product of two quaternions */
TF2SIMD_FORCE_INLINE Quaternion
operator*(const Quaternion& q1, const Quaternion& q2) {
return Quaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(),
q1.w() * q2.y() + q1.y() * q2.w() + q1.z() * q2.x() - q1.x() * q2.z(),
q1.w() * q2.z() + q1.z() * q2.w() + q1.x() * q2.y() - q1.y() * q2.x(),
q1.w() * q2.w() - q1.x() * q2.x() - q1.y() * q2.y() - q1.z() * q2.z());
}
TF2SIMD_FORCE_INLINE Quaternion
operator*(const Quaternion& q, const Vector3& w)
{
return Quaternion( q.w() * w.x() + q.y() * w.z() - q.z() * w.y(),
q.w() * w.y() + q.z() * w.x() - q.x() * w.z(),
q.w() * w.z() + q.x() * w.y() - q.y() * w.x(),
-q.x() * w.x() - q.y() * w.y() - q.z() * w.z());
}
TF2SIMD_FORCE_INLINE Quaternion
operator*(const Vector3& w, const Quaternion& q)
{
return Quaternion( w.x() * q.w() + w.y() * q.z() - w.z() * q.y(),
w.y() * q.w() + w.z() * q.x() - w.x() * q.z(),
w.z() * q.w() + w.x() * q.y() - w.y() * q.x(),
-w.x() * q.x() - w.y() * q.y() - w.z() * q.z());
}
/**@brief Calculate the dot product between two quaternions */
TF2SIMD_FORCE_INLINE tf2Scalar
dot(const Quaternion& q1, const Quaternion& q2)
{
return q1.dot(q2);
}
/**@brief Return the length of a quaternion */
TF2SIMD_FORCE_INLINE tf2Scalar
length(const Quaternion& q)
{
return q.length();
}
/**@brief Return the ***half*** angle between two quaternions*/
TF2SIMD_FORCE_INLINE tf2Scalar
angle(const Quaternion& q1, const Quaternion& q2)
{
return q1.angle(q2);
}
/**@brief Return the shortest angle between two quaternions*/
TF2SIMD_FORCE_INLINE tf2Scalar
angleShortestPath(const Quaternion& q1, const Quaternion& q2)
{
return q1.angleShortestPath(q2);
}
/**@brief Return the inverse of a quaternion*/
TF2SIMD_FORCE_INLINE Quaternion
inverse(const Quaternion& q)
{
return q.inverse();
}
/**@brief Return the result of spherical linear interpolation betwen two quaternions
* @param q1 The first quaternion
* @param q2 The second quaternion
* @param t The ration between q1 and q2. t = 0 return q1, t=1 returns q2
* Slerp assumes constant velocity between positions. */
TF2SIMD_FORCE_INLINE Quaternion
slerp(const Quaternion& q1, const Quaternion& q2, const tf2Scalar& t)
{
return q1.slerp(q2, t);
}
TF2SIMD_FORCE_INLINE Vector3
quatRotate(const Quaternion& rotation, const Vector3& v)
{
Quaternion q = rotation * v;
q *= rotation.inverse();
return Vector3(q.getX(),q.getY(),q.getZ());
}
TF2SIMD_FORCE_INLINE Quaternion
shortestArcQuat(const Vector3& v0, const Vector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized
{
Vector3 c = v0.cross(v1);
tf2Scalar d = v0.dot(v1);
if (d < -1.0 + TF2SIMD_EPSILON)
{
Vector3 n,unused;
tf2PlaneSpace1(v0,n,unused);
return Quaternion(n.x(),n.y(),n.z(),0.0f); // just pick any vector that is orthogonal to v0
}
tf2Scalar s = tf2Sqrt((1.0f + d) * 2.0f);
tf2Scalar rs = 1.0f / s;
return Quaternion(c.getX()*rs,c.getY()*rs,c.getZ()*rs,s * 0.5f);
}
TF2SIMD_FORCE_INLINE Quaternion
shortestArcQuatNormalize2(Vector3& v0,Vector3& v1)
{
v0.normalize();
v1.normalize();
return shortestArcQuat(v0,v1);
}
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/Scalar.h | /*
Copyright (c) 2003-2009 Erwin Coumans http://bullet.googlecode.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef TF2_SCALAR_H
#define TF2_SCALAR_H
#ifdef TF2_MANAGED_CODE
//Aligned data types not supported in managed code
#pragma unmanaged
#endif
#include <math.h>
#include <stdlib.h>//size_t for MSVC 6.0
#include <cstdlib>
#include <cfloat>
#include <float.h>
#if defined(DEBUG) || defined (_DEBUG)
#define TF2_DEBUG
#endif
#ifdef _WIN32
#if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
#define TF2SIMD_FORCE_INLINE inline
#define ATTRIBUTE_ALIGNED16(a) a
#define ATTRIBUTE_ALIGNED64(a) a
#define ATTRIBUTE_ALIGNED128(a) a
#else
//#define TF2_HAS_ALIGNED_ALLOCATOR
#pragma warning(disable : 4324) // disable padding warning
// #pragma warning(disable:4530) // Disable the exception disable but used in MSCV Stl warning.
// #pragma warning(disable:4996) //Turn off warnings about deprecated C routines
// #pragma warning(disable:4786) // Disable the "debug name too long" warning
#define TF2SIMD_FORCE_INLINE __forceinline
#define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a
#define ATTRIBUTE_ALIGNED64(a) __declspec(align(64)) a
#define ATTRIBUTE_ALIGNED128(a) __declspec (align(128)) a
#ifdef _XBOX
#define TF2_USE_VMX128
#include <ppcintrinsics.h>
#define TF2_HAVE_NATIVE_FSEL
#define tf2Fsel(a,b,c) __fsel((a),(b),(c))
#else
#endif//_XBOX
#endif //__MINGW32__
#include <assert.h>
#ifdef TF2_DEBUG
#define tf2Assert assert
#else
#define tf2Assert(x)
#endif
//tf2FullAssert is optional, slows down a lot
#define tf2FullAssert(x)
#define tf2Likely(_c) _c
#define tf2Unlikely(_c) _c
#else
#if defined (__CELLOS_LV2__)
#define TF2SIMD_FORCE_INLINE inline
#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
#define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
#ifndef assert
#include <assert.h>
#endif
#ifdef TF2_DEBUG
#define tf2Assert assert
#else
#define tf2Assert(x)
#endif
//tf2FullAssert is optional, slows down a lot
#define tf2FullAssert(x)
#define tf2Likely(_c) _c
#define tf2Unlikely(_c) _c
#else
#ifdef USE_LIBSPE2
#define TF2SIMD_FORCE_INLINE __inline
#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
#define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
#ifndef assert
#include <assert.h>
#endif
#ifdef TF2_DEBUG
#define tf2Assert assert
#else
#define tf2Assert(x)
#endif
//tf2FullAssert is optional, slows down a lot
#define tf2FullAssert(x)
#define tf2Likely(_c) __builtin_expect((_c), 1)
#define tf2Unlikely(_c) __builtin_expect((_c), 0)
#else
//non-windows systems
#define TF2SIMD_FORCE_INLINE inline
///@todo: check out alignment methods for other platforms/compilers
///#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
///#define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
///#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
#define ATTRIBUTE_ALIGNED16(a) a
#define ATTRIBUTE_ALIGNED64(a) a
#define ATTRIBUTE_ALIGNED128(a) a
#ifndef assert
#include <assert.h>
#endif
#if defined(DEBUG) || defined (_DEBUG)
#define tf2Assert assert
#else
#define tf2Assert(x)
#endif
//tf2FullAssert is optional, slows down a lot
#define tf2FullAssert(x)
#define tf2Likely(_c) _c
#define tf2Unlikely(_c) _c
#endif // LIBSPE2
#endif //__CELLOS_LV2__
#endif
///The tf2Scalar type abstracts floating point numbers, to easily switch between double and single floating point precision.
typedef double tf2Scalar;
//this number could be bigger in double precision
#define TF2_LARGE_FLOAT 1e30
#define TF2_DECLARE_ALIGNED_ALLOCATOR() \
TF2SIMD_FORCE_INLINE void* operator new(size_t sizeInBytes) { return tf2AlignedAlloc(sizeInBytes,16); } \
TF2SIMD_FORCE_INLINE void operator delete(void* ptr) { tf2AlignedFree(ptr); } \
TF2SIMD_FORCE_INLINE void* operator new(size_t, void* ptr) { return ptr; } \
TF2SIMD_FORCE_INLINE void operator delete(void*, void*) { } \
TF2SIMD_FORCE_INLINE void* operator new[](size_t sizeInBytes) { return tf2AlignedAlloc(sizeInBytes,16); } \
TF2SIMD_FORCE_INLINE void operator delete[](void* ptr) { tf2AlignedFree(ptr); } \
TF2SIMD_FORCE_INLINE void* operator new[](size_t, void* ptr) { return ptr; } \
TF2SIMD_FORCE_INLINE void operator delete[](void*, void*) { } \
TF2SIMD_FORCE_INLINE tf2Scalar tf2Sqrt(tf2Scalar x) { return sqrt(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Fabs(tf2Scalar x) { return fabs(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Cos(tf2Scalar x) { return cos(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Sin(tf2Scalar x) { return sin(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Tan(tf2Scalar x) { return tan(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Acos(tf2Scalar x) { if (x<tf2Scalar(-1)) x=tf2Scalar(-1); if (x>tf2Scalar(1)) x=tf2Scalar(1); return acos(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Asin(tf2Scalar x) { if (x<tf2Scalar(-1)) x=tf2Scalar(-1); if (x>tf2Scalar(1)) x=tf2Scalar(1); return asin(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Atan(tf2Scalar x) { return atan(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Atan2(tf2Scalar x, tf2Scalar y) { return atan2(x, y); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Exp(tf2Scalar x) { return exp(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Log(tf2Scalar x) { return log(x); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Pow(tf2Scalar x,tf2Scalar y) { return pow(x,y); }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Fmod(tf2Scalar x,tf2Scalar y) { return fmod(x,y); }
#define TF2SIMD_2_PI tf2Scalar(6.283185307179586232)
#define TF2SIMD_PI (TF2SIMD_2_PI * tf2Scalar(0.5))
#define TF2SIMD_HALF_PI (TF2SIMD_2_PI * tf2Scalar(0.25))
#define TF2SIMD_RADS_PER_DEG (TF2SIMD_2_PI / tf2Scalar(360.0))
#define TF2SIMD_DEGS_PER_RAD (tf2Scalar(360.0) / TF2SIMD_2_PI)
#define TF2SIMDSQRT12 tf2Scalar(0.7071067811865475244008443621048490)
#define tf2RecipSqrt(x) ((tf2Scalar)(tf2Scalar(1.0)/tf2Sqrt(tf2Scalar(x)))) /* reciprocal square root */
#define TF2SIMD_EPSILON DBL_EPSILON
#define TF2SIMD_INFINITY DBL_MAX
TF2SIMD_FORCE_INLINE tf2Scalar tf2Atan2Fast(tf2Scalar y, tf2Scalar x)
{
tf2Scalar coeff_1 = TF2SIMD_PI / 4.0f;
tf2Scalar coeff_2 = 3.0f * coeff_1;
tf2Scalar abs_y = tf2Fabs(y);
tf2Scalar angle;
if (x >= 0.0f) {
tf2Scalar r = (x - abs_y) / (x + abs_y);
angle = coeff_1 - coeff_1 * r;
} else {
tf2Scalar r = (x + abs_y) / (abs_y - x);
angle = coeff_2 - coeff_1 * r;
}
return (y < 0.0f) ? -angle : angle;
}
TF2SIMD_FORCE_INLINE bool tf2FuzzyZero(tf2Scalar x) { return tf2Fabs(x) < TF2SIMD_EPSILON; }
TF2SIMD_FORCE_INLINE bool tf2Equal(tf2Scalar a, tf2Scalar eps) {
return (((a) <= eps) && !((a) < -eps));
}
TF2SIMD_FORCE_INLINE bool tf2GreaterEqual (tf2Scalar a, tf2Scalar eps) {
return (!((a) <= eps));
}
TF2SIMD_FORCE_INLINE int tf2IsNegative(tf2Scalar x) {
return x < tf2Scalar(0.0) ? 1 : 0;
}
TF2SIMD_FORCE_INLINE tf2Scalar tf2Radians(tf2Scalar x) { return x * TF2SIMD_RADS_PER_DEG; }
TF2SIMD_FORCE_INLINE tf2Scalar tf2Degrees(tf2Scalar x) { return x * TF2SIMD_DEGS_PER_RAD; }
#define TF2_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
#ifndef tf2Fsel
TF2SIMD_FORCE_INLINE tf2Scalar tf2Fsel(tf2Scalar a, tf2Scalar b, tf2Scalar c)
{
return a >= 0 ? b : c;
}
#endif
#define tf2Fsels(a,b,c) (tf2Scalar)tf2Fsel(a,b,c)
TF2SIMD_FORCE_INLINE bool tf2MachineIsLittleEndian()
{
long int i = 1;
const char *p = (const char *) &i;
if (p[0] == 1) // Lowest address contains the least significant byte
return true;
else
return false;
}
///tf2Select avoids branches, which makes performance much better for consoles like Playstation 3 and XBox 360
///Thanks Phil Knight. See also http://www.cellperformance.com/articles/2006/04/more_techniques_for_eliminatin_1.html
TF2SIMD_FORCE_INLINE unsigned tf2Select(unsigned condition, unsigned valueIfConditionNonZero, unsigned valueIfConditionZero)
{
// Set testNz to 0xFFFFFFFF if condition is nonzero, 0x00000000 if condition is zero
// Rely on positive value or'ed with its negative having sign bit on
// and zero value or'ed with its negative (which is still zero) having sign bit off
// Use arithmetic shift right, shifting the sign bit through all 32 bits
unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31);
unsigned testEqz = ~testNz;
return ((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz));
}
TF2SIMD_FORCE_INLINE int tf2Select(unsigned condition, int valueIfConditionNonZero, int valueIfConditionZero)
{
unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31);
unsigned testEqz = ~testNz;
return static_cast<int>((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz));
}
TF2SIMD_FORCE_INLINE float tf2Select(unsigned condition, float valueIfConditionNonZero, float valueIfConditionZero)
{
#ifdef TF2_HAVE_NATIVE_FSEL
return (float)tf2Fsel((tf2Scalar)condition - tf2Scalar(1.0f), valueIfConditionNonZero, valueIfConditionZero);
#else
return (condition != 0) ? valueIfConditionNonZero : valueIfConditionZero;
#endif
}
template<typename T> TF2SIMD_FORCE_INLINE void tf2Swap(T& a, T& b)
{
T tmp = a;
a = b;
b = tmp;
}
//PCK: endian swapping functions
TF2SIMD_FORCE_INLINE unsigned tf2SwapEndian(unsigned val)
{
return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24));
}
TF2SIMD_FORCE_INLINE unsigned short tf2SwapEndian(unsigned short val)
{
return static_cast<unsigned short>(((val & 0xff00) >> 8) | ((val & 0x00ff) << 8));
}
TF2SIMD_FORCE_INLINE unsigned tf2SwapEndian(int val)
{
return tf2SwapEndian((unsigned)val);
}
TF2SIMD_FORCE_INLINE unsigned short tf2SwapEndian(short val)
{
return tf2SwapEndian((unsigned short) val);
}
///tf2SwapFloat uses using char pointers to swap the endianness
////tf2SwapFloat/tf2SwapDouble will NOT return a float, because the machine might 'correct' invalid floating point values
///Not all values of sign/exponent/mantissa are valid floating point numbers according to IEEE 754.
///When a floating point unit is faced with an invalid value, it may actually change the value, or worse, throw an exception.
///In most systems, running user mode code, you wouldn't get an exception, but instead the hardware/os/runtime will 'fix' the number for you.
///so instead of returning a float/double, we return integer/long long integer
TF2SIMD_FORCE_INLINE unsigned int tf2SwapEndianFloat(float d)
{
unsigned int a = 0;
unsigned char *dst = (unsigned char *)&a;
unsigned char *src = (unsigned char *)&d;
dst[0] = src[3];
dst[1] = src[2];
dst[2] = src[1];
dst[3] = src[0];
return a;
}
// unswap using char pointers
TF2SIMD_FORCE_INLINE float tf2UnswapEndianFloat(unsigned int a)
{
float d = 0.0f;
unsigned char *src = (unsigned char *)&a;
unsigned char *dst = (unsigned char *)&d;
dst[0] = src[3];
dst[1] = src[2];
dst[2] = src[1];
dst[3] = src[0];
return d;
}
// swap using char pointers
TF2SIMD_FORCE_INLINE void tf2SwapEndianDouble(double d, unsigned char* dst)
{
unsigned char *src = (unsigned char *)&d;
dst[0] = src[7];
dst[1] = src[6];
dst[2] = src[5];
dst[3] = src[4];
dst[4] = src[3];
dst[5] = src[2];
dst[6] = src[1];
dst[7] = src[0];
}
// unswap using char pointers
TF2SIMD_FORCE_INLINE double tf2UnswapEndianDouble(const unsigned char *src)
{
double d = 0.0;
unsigned char *dst = (unsigned char *)&d;
dst[0] = src[7];
dst[1] = src[6];
dst[2] = src[5];
dst[3] = src[4];
dst[4] = src[3];
dst[5] = src[2];
dst[6] = src[1];
dst[7] = src[0];
return d;
}
// returns normalized value in range [-TF2SIMD_PI, TF2SIMD_PI]
TF2SIMD_FORCE_INLINE tf2Scalar tf2NormalizeAngle(tf2Scalar angleInRadians)
{
angleInRadians = tf2Fmod(angleInRadians, TF2SIMD_2_PI);
if(angleInRadians < -TF2SIMD_PI)
{
return angleInRadians + TF2SIMD_2_PI;
}
else if(angleInRadians > TF2SIMD_PI)
{
return angleInRadians - TF2SIMD_2_PI;
}
else
{
return angleInRadians;
}
}
///rudimentary class to provide type info
struct tf2TypedObject
{
tf2TypedObject(int objectType)
:m_objectType(objectType)
{
}
int m_objectType;
inline int getObjectType() const
{
return m_objectType;
}
};
#endif //TF2SIMD___SCALAR_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/Transform.h | /*
Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef tf2_Transform_H
#define tf2_Transform_H
#include "Matrix3x3.h"
namespace tf2
{
#define TransformData TransformDoubleData
/**@brief The Transform class supports rigid transforms with only translation and rotation and no scaling/shear.
*It can be used in combination with Vector3, Quaternion and Matrix3x3 linear algebra classes. */
class Transform {
///Storage for the rotation
Matrix3x3 m_basis;
///Storage for the translation
Vector3 m_origin;
public:
/**@brief No initialization constructor */
Transform() {}
/**@brief Constructor from Quaternion (optional Vector3 )
* @param q Rotation from quaternion
* @param c Translation from Vector (default 0,0,0) */
explicit TF2SIMD_FORCE_INLINE Transform(const Quaternion& q,
const Vector3& c = Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0)))
: m_basis(q),
m_origin(c)
{}
/**@brief Constructor from Matrix3x3 (optional Vector3)
* @param b Rotation from Matrix
* @param c Translation from Vector default (0,0,0)*/
explicit TF2SIMD_FORCE_INLINE Transform(const Matrix3x3& b,
const Vector3& c = Vector3(tf2Scalar(0), tf2Scalar(0), tf2Scalar(0)))
: m_basis(b),
m_origin(c)
{}
/**@brief Copy constructor */
TF2SIMD_FORCE_INLINE Transform (const Transform& other)
: m_basis(other.m_basis),
m_origin(other.m_origin)
{
}
/**@brief Assignment Operator */
TF2SIMD_FORCE_INLINE Transform& operator=(const Transform& other)
{
m_basis = other.m_basis;
m_origin = other.m_origin;
return *this;
}
/**@brief Set the current transform as the value of the product of two transforms
* @param t1 Transform 1
* @param t2 Transform 2
* This = Transform1 * Transform2 */
TF2SIMD_FORCE_INLINE void mult(const Transform& t1, const Transform& t2) {
m_basis = t1.m_basis * t2.m_basis;
m_origin = t1(t2.m_origin);
}
/* void multInverseLeft(const Transform& t1, const Transform& t2) {
Vector3 v = t2.m_origin - t1.m_origin;
m_basis = tf2MultTransposeLeft(t1.m_basis, t2.m_basis);
m_origin = v * t1.m_basis;
}
*/
/**@brief Return the transform of the vector */
TF2SIMD_FORCE_INLINE Vector3 operator()(const Vector3& x) const
{
return Vector3(m_basis[0].dot(x) + m_origin.x(),
m_basis[1].dot(x) + m_origin.y(),
m_basis[2].dot(x) + m_origin.z());
}
/**@brief Return the transform of the vector */
TF2SIMD_FORCE_INLINE Vector3 operator*(const Vector3& x) const
{
return (*this)(x);
}
/**@brief Return the transform of the Quaternion */
TF2SIMD_FORCE_INLINE Quaternion operator*(const Quaternion& q) const
{
return getRotation() * q;
}
/**@brief Return the basis matrix for the rotation */
TF2SIMD_FORCE_INLINE Matrix3x3& getBasis() { return m_basis; }
/**@brief Return the basis matrix for the rotation */
TF2SIMD_FORCE_INLINE const Matrix3x3& getBasis() const { return m_basis; }
/**@brief Return the origin vector translation */
TF2SIMD_FORCE_INLINE Vector3& getOrigin() { return m_origin; }
/**@brief Return the origin vector translation */
TF2SIMD_FORCE_INLINE const Vector3& getOrigin() const { return m_origin; }
/**@brief Return a quaternion representing the rotation */
Quaternion getRotation() const {
Quaternion q;
m_basis.getRotation(q);
return q;
}
/**@brief Set from an array
* @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */
void setFromOpenGLMatrix(const tf2Scalar *m)
{
m_basis.setFromOpenGLSubMatrix(m);
m_origin.setValue(m[12],m[13],m[14]);
}
/**@brief Fill an array representation
* @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */
void getOpenGLMatrix(tf2Scalar *m) const
{
m_basis.getOpenGLSubMatrix(m);
m[12] = m_origin.x();
m[13] = m_origin.y();
m[14] = m_origin.z();
m[15] = tf2Scalar(1.0);
}
/**@brief Set the translational element
* @param origin The vector to set the translation to */
TF2SIMD_FORCE_INLINE void setOrigin(const Vector3& origin)
{
m_origin = origin;
}
TF2SIMD_FORCE_INLINE Vector3 invXform(const Vector3& inVec) const;
/**@brief Set the rotational element by Matrix3x3 */
TF2SIMD_FORCE_INLINE void setBasis(const Matrix3x3& basis)
{
m_basis = basis;
}
/**@brief Set the rotational element by Quaternion */
TF2SIMD_FORCE_INLINE void setRotation(const Quaternion& q)
{
m_basis.setRotation(q);
}
/**@brief Set this transformation to the identity */
void setIdentity()
{
m_basis.setIdentity();
m_origin.setValue(tf2Scalar(0.0), tf2Scalar(0.0), tf2Scalar(0.0));
}
/**@brief Multiply this Transform by another(this = this * another)
* @param t The other transform */
Transform& operator*=(const Transform& t)
{
m_origin += m_basis * t.m_origin;
m_basis *= t.m_basis;
return *this;
}
/**@brief Return the inverse of this transform */
Transform inverse() const
{
Matrix3x3 inv = m_basis.transpose();
return Transform(inv, inv * -m_origin);
}
/**@brief Return the inverse of this transform times the other transform
* @param t The other transform
* return this.inverse() * the other */
Transform inverseTimes(const Transform& t) const;
/**@brief Return the product of this transform and the other */
Transform operator*(const Transform& t) const;
/**@brief Return an identity transform */
static const Transform& getIdentity()
{
static const Transform identityTransform(Matrix3x3::getIdentity());
return identityTransform;
}
void serialize(struct TransformData& dataOut) const;
void serializeFloat(struct TransformFloatData& dataOut) const;
void deSerialize(const struct TransformData& dataIn);
void deSerializeDouble(const struct TransformDoubleData& dataIn);
void deSerializeFloat(const struct TransformFloatData& dataIn);
};
TF2SIMD_FORCE_INLINE Vector3
Transform::invXform(const Vector3& inVec) const
{
Vector3 v = inVec - m_origin;
return (m_basis.transpose() * v);
}
TF2SIMD_FORCE_INLINE Transform
Transform::inverseTimes(const Transform& t) const
{
Vector3 v = t.getOrigin() - m_origin;
return Transform(m_basis.transposeTimes(t.m_basis),
v * m_basis);
}
TF2SIMD_FORCE_INLINE Transform
Transform::operator*(const Transform& t) const
{
return Transform(m_basis * t.m_basis,
(*this)(t.m_origin));
}
/**@brief Test if two transforms have all elements equal */
TF2SIMD_FORCE_INLINE bool operator==(const Transform& t1, const Transform& t2)
{
return ( t1.getBasis() == t2.getBasis() &&
t1.getOrigin() == t2.getOrigin() );
}
///for serialization
struct TransformFloatData
{
Matrix3x3FloatData m_basis;
Vector3FloatData m_origin;
};
struct TransformDoubleData
{
Matrix3x3DoubleData m_basis;
Vector3DoubleData m_origin;
};
TF2SIMD_FORCE_INLINE void Transform::serialize(TransformData& dataOut) const
{
m_basis.serialize(dataOut.m_basis);
m_origin.serialize(dataOut.m_origin);
}
TF2SIMD_FORCE_INLINE void Transform::serializeFloat(TransformFloatData& dataOut) const
{
m_basis.serializeFloat(dataOut.m_basis);
m_origin.serializeFloat(dataOut.m_origin);
}
TF2SIMD_FORCE_INLINE void Transform::deSerialize(const TransformData& dataIn)
{
m_basis.deSerialize(dataIn.m_basis);
m_origin.deSerialize(dataIn.m_origin);
}
TF2SIMD_FORCE_INLINE void Transform::deSerializeFloat(const TransformFloatData& dataIn)
{
m_basis.deSerializeFloat(dataIn.m_basis);
m_origin.deSerializeFloat(dataIn.m_origin);
}
TF2SIMD_FORCE_INLINE void Transform::deSerializeDouble(const TransformDoubleData& dataIn)
{
m_basis.deSerializeDouble(dataIn.m_basis);
m_origin.deSerializeDouble(dataIn.m_origin);
}
}
#endif
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/include/tf2/LinearMath/Vector3.h | /*
Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef TF2_VECTOR3_H
#define TF2_VECTOR3_H
#include "Scalar.h"
#include "MinMax.h"
namespace tf2
{
#define Vector3Data Vector3DoubleData
#define Vector3DataName "Vector3DoubleData"
/**@brief tf2::Vector3 can be used to represent 3D points and vectors.
* It has an un-used w component to suit 16-byte alignment when tf2::Vector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user
* Ideally, this class should be replaced by a platform optimized TF2SIMD version that keeps the data in registers
*/
ATTRIBUTE_ALIGNED16(class) Vector3
{
public:
#if defined (__SPU__) && defined (__CELLOS_LV2__)
tf2Scalar m_floats[4];
public:
TF2SIMD_FORCE_INLINE const vec_float4& get128() const
{
return *((const vec_float4*)&m_floats[0]);
}
public:
#else //__CELLOS_LV2__ __SPU__
#ifdef TF2_USE_SSE // _WIN32
union {
__m128 mVec128;
tf2Scalar m_floats[4];
};
TF2SIMD_FORCE_INLINE __m128 get128() const
{
return mVec128;
}
TF2SIMD_FORCE_INLINE void set128(__m128 v128)
{
mVec128 = v128;
}
#else
tf2Scalar m_floats[4];
#endif
#endif //__CELLOS_LV2__ __SPU__
public:
/**@brief No initialization constructor */
TF2SIMD_FORCE_INLINE Vector3() {}
/**@brief Constructor from scalars
* @param x X value
* @param y Y value
* @param z Z value
*/
TF2SIMD_FORCE_INLINE Vector3(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z)
{
m_floats[0] = x;
m_floats[1] = y;
m_floats[2] = z;
m_floats[3] = tf2Scalar(0.);
}
/**@brief Add a vector to this one
* @param The vector to add to this one */
TF2SIMD_FORCE_INLINE Vector3& operator+=(const Vector3& v)
{
m_floats[0] += v.m_floats[0]; m_floats[1] += v.m_floats[1];m_floats[2] += v.m_floats[2];
return *this;
}
/**@brief Sutf2ract a vector from this one
* @param The vector to sutf2ract */
TF2SIMD_FORCE_INLINE Vector3& operator-=(const Vector3& v)
{
m_floats[0] -= v.m_floats[0]; m_floats[1] -= v.m_floats[1];m_floats[2] -= v.m_floats[2];
return *this;
}
/**@brief Scale the vector
* @param s Scale factor */
TF2SIMD_FORCE_INLINE Vector3& operator*=(const tf2Scalar& s)
{
m_floats[0] *= s; m_floats[1] *= s;m_floats[2] *= s;
return *this;
}
/**@brief Inversely scale the vector
* @param s Scale factor to divide by */
TF2SIMD_FORCE_INLINE Vector3& operator/=(const tf2Scalar& s)
{
tf2FullAssert(s != tf2Scalar(0.0));
return *this *= tf2Scalar(1.0) / s;
}
/**@brief Return the dot product
* @param v The other vector in the dot product */
TF2SIMD_FORCE_INLINE tf2Scalar dot(const Vector3& v) const
{
return m_floats[0] * v.m_floats[0] + m_floats[1] * v.m_floats[1] +m_floats[2] * v.m_floats[2];
}
/**@brief Return the length of the vector squared */
TF2SIMD_FORCE_INLINE tf2Scalar length2() const
{
return dot(*this);
}
/**@brief Return the length of the vector */
TF2SIMD_FORCE_INLINE tf2Scalar length() const
{
return tf2Sqrt(length2());
}
/**@brief Return the distance squared between the ends of this and another vector
* This is symantically treating the vector like a point */
TF2SIMD_FORCE_INLINE tf2Scalar distance2(const Vector3& v) const;
/**@brief Return the distance between the ends of this and another vector
* This is symantically treating the vector like a point */
TF2SIMD_FORCE_INLINE tf2Scalar distance(const Vector3& v) const;
/**@brief Normalize this vector
* x^2 + y^2 + z^2 = 1 */
TF2SIMD_FORCE_INLINE Vector3& normalize()
{
return *this /= length();
}
/**@brief Return a normalized version of this vector */
TF2SIMD_FORCE_INLINE Vector3 normalized() const;
/**@brief Rotate this vector
* @param wAxis The axis to rotate about
* @param angle The angle to rotate by */
TF2SIMD_FORCE_INLINE Vector3 rotate( const Vector3& wAxis, const tf2Scalar angle ) const;
/**@brief Return the angle between this and another vector
* @param v The other vector */
TF2SIMD_FORCE_INLINE tf2Scalar angle(const Vector3& v) const
{
tf2Scalar s = tf2Sqrt(length2() * v.length2());
tf2FullAssert(s != tf2Scalar(0.0));
return tf2Acos(dot(v) / s);
}
/**@brief Return a vector will the absolute values of each element */
TF2SIMD_FORCE_INLINE Vector3 absolute() const
{
return Vector3(
tf2Fabs(m_floats[0]),
tf2Fabs(m_floats[1]),
tf2Fabs(m_floats[2]));
}
/**@brief Return the cross product between this and another vector
* @param v The other vector */
TF2SIMD_FORCE_INLINE Vector3 cross(const Vector3& v) const
{
return Vector3(
m_floats[1] * v.m_floats[2] -m_floats[2] * v.m_floats[1],
m_floats[2] * v.m_floats[0] - m_floats[0] * v.m_floats[2],
m_floats[0] * v.m_floats[1] - m_floats[1] * v.m_floats[0]);
}
TF2SIMD_FORCE_INLINE tf2Scalar triple(const Vector3& v1, const Vector3& v2) const
{
return m_floats[0] * (v1.m_floats[1] * v2.m_floats[2] - v1.m_floats[2] * v2.m_floats[1]) +
m_floats[1] * (v1.m_floats[2] * v2.m_floats[0] - v1.m_floats[0] * v2.m_floats[2]) +
m_floats[2] * (v1.m_floats[0] * v2.m_floats[1] - v1.m_floats[1] * v2.m_floats[0]);
}
/**@brief Return the axis with the smallest value
* Note return values are 0,1,2 for x, y, or z */
TF2SIMD_FORCE_INLINE int minAxis() const
{
return m_floats[0] < m_floats[1] ? (m_floats[0] <m_floats[2] ? 0 : 2) : (m_floats[1] <m_floats[2] ? 1 : 2);
}
/**@brief Return the axis with the largest value
* Note return values are 0,1,2 for x, y, or z */
TF2SIMD_FORCE_INLINE int maxAxis() const
{
return m_floats[0] < m_floats[1] ? (m_floats[1] <m_floats[2] ? 2 : 1) : (m_floats[0] <m_floats[2] ? 2 : 0);
}
TF2SIMD_FORCE_INLINE int furthestAxis() const
{
return absolute().minAxis();
}
TF2SIMD_FORCE_INLINE int closestAxis() const
{
return absolute().maxAxis();
}
TF2SIMD_FORCE_INLINE void setInterpolate3(const Vector3& v0, const Vector3& v1, tf2Scalar rt)
{
tf2Scalar s = tf2Scalar(1.0) - rt;
m_floats[0] = s * v0.m_floats[0] + rt * v1.m_floats[0];
m_floats[1] = s * v0.m_floats[1] + rt * v1.m_floats[1];
m_floats[2] = s * v0.m_floats[2] + rt * v1.m_floats[2];
//don't do the unused w component
// m_co[3] = s * v0[3] + rt * v1[3];
}
/**@brief Return the linear interpolation between this and another vector
* @param v The other vector
* @param t The ration of this to v (t = 0 => return this, t=1 => return other) */
TF2SIMD_FORCE_INLINE Vector3 lerp(const Vector3& v, const tf2Scalar& t) const
{
return Vector3(m_floats[0] + (v.m_floats[0] - m_floats[0]) * t,
m_floats[1] + (v.m_floats[1] - m_floats[1]) * t,
m_floats[2] + (v.m_floats[2] -m_floats[2]) * t);
}
/**@brief Elementwise multiply this vector by the other
* @param v The other vector */
TF2SIMD_FORCE_INLINE Vector3& operator*=(const Vector3& v)
{
m_floats[0] *= v.m_floats[0]; m_floats[1] *= v.m_floats[1];m_floats[2] *= v.m_floats[2];
return *this;
}
/**@brief Return the x value */
TF2SIMD_FORCE_INLINE const tf2Scalar& getX() const { return m_floats[0]; }
/**@brief Return the y value */
TF2SIMD_FORCE_INLINE const tf2Scalar& getY() const { return m_floats[1]; }
/**@brief Return the z value */
TF2SIMD_FORCE_INLINE const tf2Scalar& getZ() const { return m_floats[2]; }
/**@brief Set the x value */
TF2SIMD_FORCE_INLINE void setX(tf2Scalar x) { m_floats[0] = x;};
/**@brief Set the y value */
TF2SIMD_FORCE_INLINE void setY(tf2Scalar y) { m_floats[1] = y;};
/**@brief Set the z value */
TF2SIMD_FORCE_INLINE void setZ(tf2Scalar z) {m_floats[2] = z;};
/**@brief Set the w value */
TF2SIMD_FORCE_INLINE void setW(tf2Scalar w) { m_floats[3] = w;};
/**@brief Return the x value */
TF2SIMD_FORCE_INLINE const tf2Scalar& x() const { return m_floats[0]; }
/**@brief Return the y value */
TF2SIMD_FORCE_INLINE const tf2Scalar& y() const { return m_floats[1]; }
/**@brief Return the z value */
TF2SIMD_FORCE_INLINE const tf2Scalar& z() const { return m_floats[2]; }
/**@brief Return the w value */
TF2SIMD_FORCE_INLINE const tf2Scalar& w() const { return m_floats[3]; }
//TF2SIMD_FORCE_INLINE tf2Scalar& operator[](int i) { return (&m_floats[0])[i]; }
//TF2SIMD_FORCE_INLINE const tf2Scalar& operator[](int i) const { return (&m_floats[0])[i]; }
///operator tf2Scalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.
TF2SIMD_FORCE_INLINE operator tf2Scalar *() { return &m_floats[0]; }
TF2SIMD_FORCE_INLINE operator const tf2Scalar *() const { return &m_floats[0]; }
TF2SIMD_FORCE_INLINE bool operator==(const Vector3& other) const
{
return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0]));
}
TF2SIMD_FORCE_INLINE bool operator!=(const Vector3& other) const
{
return !(*this == other);
}
/**@brief Set each element to the max of the current values and the values of another Vector3
* @param other The other Vector3 to compare with
*/
TF2SIMD_FORCE_INLINE void setMax(const Vector3& other)
{
tf2SetMax(m_floats[0], other.m_floats[0]);
tf2SetMax(m_floats[1], other.m_floats[1]);
tf2SetMax(m_floats[2], other.m_floats[2]);
tf2SetMax(m_floats[3], other.w());
}
/**@brief Set each element to the min of the current values and the values of another Vector3
* @param other The other Vector3 to compare with
*/
TF2SIMD_FORCE_INLINE void setMin(const Vector3& other)
{
tf2SetMin(m_floats[0], other.m_floats[0]);
tf2SetMin(m_floats[1], other.m_floats[1]);
tf2SetMin(m_floats[2], other.m_floats[2]);
tf2SetMin(m_floats[3], other.w());
}
TF2SIMD_FORCE_INLINE void setValue(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z)
{
m_floats[0]=x;
m_floats[1]=y;
m_floats[2]=z;
m_floats[3] = tf2Scalar(0.);
}
void getSkewSymmetricMatrix(Vector3* v0,Vector3* v1,Vector3* v2) const
{
v0->setValue(0. ,-z() ,y());
v1->setValue(z() ,0. ,-x());
v2->setValue(-y() ,x() ,0.);
}
void setZero()
{
setValue(tf2Scalar(0.),tf2Scalar(0.),tf2Scalar(0.));
}
TF2SIMD_FORCE_INLINE bool isZero() const
{
return m_floats[0] == tf2Scalar(0) && m_floats[1] == tf2Scalar(0) && m_floats[2] == tf2Scalar(0);
}
TF2SIMD_FORCE_INLINE bool fuzzyZero() const
{
return length2() < TF2SIMD_EPSILON;
}
TF2SIMD_FORCE_INLINE void serialize(struct Vector3Data& dataOut) const;
TF2SIMD_FORCE_INLINE void deSerialize(const struct Vector3Data& dataIn);
TF2SIMD_FORCE_INLINE void serializeFloat(struct Vector3FloatData& dataOut) const;
TF2SIMD_FORCE_INLINE void deSerializeFloat(const struct Vector3FloatData& dataIn);
TF2SIMD_FORCE_INLINE void serializeDouble(struct Vector3DoubleData& dataOut) const;
TF2SIMD_FORCE_INLINE void deSerializeDouble(const struct Vector3DoubleData& dataIn);
};
/**@brief Return the sum of two vectors (Point symantics)*/
TF2SIMD_FORCE_INLINE Vector3
operator+(const Vector3& v1, const Vector3& v2)
{
return Vector3(v1.m_floats[0] + v2.m_floats[0], v1.m_floats[1] + v2.m_floats[1], v1.m_floats[2] + v2.m_floats[2]);
}
/**@brief Return the elementwise product of two vectors */
TF2SIMD_FORCE_INLINE Vector3
operator*(const Vector3& v1, const Vector3& v2)
{
return Vector3(v1.m_floats[0] * v2.m_floats[0], v1.m_floats[1] * v2.m_floats[1], v1.m_floats[2] * v2.m_floats[2]);
}
/**@brief Return the difference between two vectors */
TF2SIMD_FORCE_INLINE Vector3
operator-(const Vector3& v1, const Vector3& v2)
{
return Vector3(v1.m_floats[0] - v2.m_floats[0], v1.m_floats[1] - v2.m_floats[1], v1.m_floats[2] - v2.m_floats[2]);
}
/**@brief Return the negative of the vector */
TF2SIMD_FORCE_INLINE Vector3
operator-(const Vector3& v)
{
return Vector3(-v.m_floats[0], -v.m_floats[1], -v.m_floats[2]);
}
/**@brief Return the vector scaled by s */
TF2SIMD_FORCE_INLINE Vector3
operator*(const Vector3& v, const tf2Scalar& s)
{
return Vector3(v.m_floats[0] * s, v.m_floats[1] * s, v.m_floats[2] * s);
}
/**@brief Return the vector scaled by s */
TF2SIMD_FORCE_INLINE Vector3
operator*(const tf2Scalar& s, const Vector3& v)
{
return v * s;
}
/**@brief Return the vector inversely scaled by s */
TF2SIMD_FORCE_INLINE Vector3
operator/(const Vector3& v, const tf2Scalar& s)
{
tf2FullAssert(s != tf2Scalar(0.0));
return v * (tf2Scalar(1.0) / s);
}
/**@brief Return the vector inversely scaled by s */
TF2SIMD_FORCE_INLINE Vector3
operator/(const Vector3& v1, const Vector3& v2)
{
return Vector3(v1.m_floats[0] / v2.m_floats[0],v1.m_floats[1] / v2.m_floats[1],v1.m_floats[2] / v2.m_floats[2]);
}
/**@brief Return the dot product between two vectors */
TF2SIMD_FORCE_INLINE tf2Scalar
tf2Dot(const Vector3& v1, const Vector3& v2)
{
return v1.dot(v2);
}
/**@brief Return the distance squared between two vectors */
TF2SIMD_FORCE_INLINE tf2Scalar
tf2Distance2(const Vector3& v1, const Vector3& v2)
{
return v1.distance2(v2);
}
/**@brief Return the distance between two vectors */
TF2SIMD_FORCE_INLINE tf2Scalar
tf2Distance(const Vector3& v1, const Vector3& v2)
{
return v1.distance(v2);
}
/**@brief Return the angle between two vectors */
TF2SIMD_FORCE_INLINE tf2Scalar
tf2Angle(const Vector3& v1, const Vector3& v2)
{
return v1.angle(v2);
}
/**@brief Return the cross product of two vectors */
TF2SIMD_FORCE_INLINE Vector3
tf2Cross(const Vector3& v1, const Vector3& v2)
{
return v1.cross(v2);
}
TF2SIMD_FORCE_INLINE tf2Scalar
tf2Triple(const Vector3& v1, const Vector3& v2, const Vector3& v3)
{
return v1.triple(v2, v3);
}
/**@brief Return the linear interpolation between two vectors
* @param v1 One vector
* @param v2 The other vector
* @param t The ration of this to v (t = 0 => return v1, t=1 => return v2) */
TF2SIMD_FORCE_INLINE Vector3
lerp(const Vector3& v1, const Vector3& v2, const tf2Scalar& t)
{
return v1.lerp(v2, t);
}
TF2SIMD_FORCE_INLINE tf2Scalar Vector3::distance2(const Vector3& v) const
{
return (v - *this).length2();
}
TF2SIMD_FORCE_INLINE tf2Scalar Vector3::distance(const Vector3& v) const
{
return (v - *this).length();
}
TF2SIMD_FORCE_INLINE Vector3 Vector3::normalized() const
{
return *this / length();
}
TF2SIMD_FORCE_INLINE Vector3 Vector3::rotate( const Vector3& wAxis, const tf2Scalar angle ) const
{
// wAxis must be a unit lenght vector
Vector3 o = wAxis * wAxis.dot( *this );
Vector3 x = *this - o;
Vector3 y;
y = wAxis.cross( *this );
return ( o + x * tf2Cos( angle ) + y * tf2Sin( angle ) );
}
class tf2Vector4 : public Vector3
{
public:
TF2SIMD_FORCE_INLINE tf2Vector4() {}
TF2SIMD_FORCE_INLINE tf2Vector4(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z,const tf2Scalar& w)
: Vector3(x,y,z)
{
m_floats[3] = w;
}
TF2SIMD_FORCE_INLINE tf2Vector4 absolute4() const
{
return tf2Vector4(
tf2Fabs(m_floats[0]),
tf2Fabs(m_floats[1]),
tf2Fabs(m_floats[2]),
tf2Fabs(m_floats[3]));
}
tf2Scalar getW() const { return m_floats[3];}
TF2SIMD_FORCE_INLINE int maxAxis4() const
{
int maxIndex = -1;
tf2Scalar maxVal = tf2Scalar(-TF2_LARGE_FLOAT);
if (m_floats[0] > maxVal)
{
maxIndex = 0;
maxVal = m_floats[0];
}
if (m_floats[1] > maxVal)
{
maxIndex = 1;
maxVal = m_floats[1];
}
if (m_floats[2] > maxVal)
{
maxIndex = 2;
maxVal =m_floats[2];
}
if (m_floats[3] > maxVal)
{
maxIndex = 3;
}
return maxIndex;
}
TF2SIMD_FORCE_INLINE int minAxis4() const
{
int minIndex = -1;
tf2Scalar minVal = tf2Scalar(TF2_LARGE_FLOAT);
if (m_floats[0] < minVal)
{
minIndex = 0;
minVal = m_floats[0];
}
if (m_floats[1] < minVal)
{
minIndex = 1;
minVal = m_floats[1];
}
if (m_floats[2] < minVal)
{
minIndex = 2;
minVal =m_floats[2];
}
if (m_floats[3] < minVal)
{
minIndex = 3;
}
return minIndex;
}
TF2SIMD_FORCE_INLINE int closestAxis4() const
{
return absolute4().maxAxis4();
}
/**@brief Set x,y,z and zero w
* @param x Value of x
* @param y Value of y
* @param z Value of z
*/
/* void getValue(tf2Scalar *m) const
{
m[0] = m_floats[0];
m[1] = m_floats[1];
m[2] =m_floats[2];
}
*/
/**@brief Set the values
* @param x Value of x
* @param y Value of y
* @param z Value of z
* @param w Value of w
*/
TF2SIMD_FORCE_INLINE void setValue(const tf2Scalar& x, const tf2Scalar& y, const tf2Scalar& z,const tf2Scalar& w)
{
m_floats[0]=x;
m_floats[1]=y;
m_floats[2]=z;
m_floats[3]=w;
}
};
///tf2SwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
TF2SIMD_FORCE_INLINE void tf2SwapScalarEndian(const tf2Scalar& sourceVal, tf2Scalar& destVal)
{
unsigned char* dest = (unsigned char*) &destVal;
unsigned char* src = (unsigned char*) &sourceVal;
dest[0] = src[7];
dest[1] = src[6];
dest[2] = src[5];
dest[3] = src[4];
dest[4] = src[3];
dest[5] = src[2];
dest[6] = src[1];
dest[7] = src[0];
}
///tf2SwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
TF2SIMD_FORCE_INLINE void tf2SwapVector3Endian(const Vector3& sourceVec, Vector3& destVec)
{
for (int i=0;i<4;i++)
{
tf2SwapScalarEndian(sourceVec[i],destVec[i]);
}
}
///tf2UnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
TF2SIMD_FORCE_INLINE void tf2UnSwapVector3Endian(Vector3& vector)
{
Vector3 swappedVec;
for (int i=0;i<4;i++)
{
tf2SwapScalarEndian(vector[i],swappedVec[i]);
}
vector = swappedVec;
}
TF2SIMD_FORCE_INLINE void tf2PlaneSpace1 (const Vector3& n, Vector3& p, Vector3& q)
{
if (tf2Fabs(n.z()) > TF2SIMDSQRT12) {
// choose p in y-z plane
tf2Scalar a = n[1]*n[1] + n[2]*n[2];
tf2Scalar k = tf2RecipSqrt (a);
p.setValue(0,-n[2]*k,n[1]*k);
// set q = n x p
q.setValue(a*k,-n[0]*p[2],n[0]*p[1]);
}
else {
// choose p in x-y plane
tf2Scalar a = n.x()*n.x() + n.y()*n.y();
tf2Scalar k = tf2RecipSqrt (a);
p.setValue(-n.y()*k,n.x()*k,0);
// set q = n x p
q.setValue(-n.z()*p.y(),n.z()*p.x(),a*k);
}
}
struct Vector3FloatData
{
float m_floats[4];
};
struct Vector3DoubleData
{
double m_floats[4];
};
TF2SIMD_FORCE_INLINE void Vector3::serializeFloat(struct Vector3FloatData& dataOut) const
{
///could also do a memcpy, check if it is worth it
for (int i=0;i<4;i++)
dataOut.m_floats[i] = float(m_floats[i]);
}
TF2SIMD_FORCE_INLINE void Vector3::deSerializeFloat(const struct Vector3FloatData& dataIn)
{
for (int i=0;i<4;i++)
m_floats[i] = tf2Scalar(dataIn.m_floats[i]);
}
TF2SIMD_FORCE_INLINE void Vector3::serializeDouble(struct Vector3DoubleData& dataOut) const
{
///could also do a memcpy, check if it is worth it
for (int i=0;i<4;i++)
dataOut.m_floats[i] = double(m_floats[i]);
}
TF2SIMD_FORCE_INLINE void Vector3::deSerializeDouble(const struct Vector3DoubleData& dataIn)
{
for (int i=0;i<4;i++)
m_floats[i] = tf2Scalar(dataIn.m_floats[i]);
}
TF2SIMD_FORCE_INLINE void Vector3::serialize(struct Vector3Data& dataOut) const
{
///could also do a memcpy, check if it is worth it
for (int i=0;i<4;i++)
dataOut.m_floats[i] = m_floats[i];
}
TF2SIMD_FORCE_INLINE void Vector3::deSerialize(const struct Vector3Data& dataIn)
{
for (int i=0;i<4;i++)
m_floats[i] = dataIn.m_floats[i];
}
}
#endif //TF2_VECTOR3_H
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/src/static_cache.cpp | /*
* 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, Inc. 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.
*/
/** \author Tully Foote */
#include "tf2/time_cache.h"
#include "tf2/exceptions.h"
#include "tf2/LinearMath/Transform.h"
using namespace tf2;
bool StaticCache::getData(ros::Time time, TransformStorage & data_out, std::string* error_str) //returns false if data not available
{
data_out = storage_;
data_out.stamp_ = time;
return true;
};
bool StaticCache::insertData(const TransformStorage& new_data)
{
storage_ = new_data;
return true;
};
void StaticCache::clearList() { return; };
unsigned int StaticCache::getListLength() { return 1; };
CompactFrameID StaticCache::getParent(ros::Time time, std::string* error_str)
{
return storage_.frame_id_;
}
P_TimeAndFrameID StaticCache::getLatestTimeAndParent()
{
return std::make_pair(ros::Time(), storage_.frame_id_);
}
ros::Time StaticCache::getLatestTimestamp()
{
return ros::Time();
};
ros::Time StaticCache::getOldestTimestamp()
{
return ros::Time();
};
| 0 |
apollo_public_repos/apollo-platform/ros/geometry2/tf2 | apollo_public_repos/apollo-platform/ros/geometry2/tf2/src/buffer_core.cpp | /*
* Copyright (c) 2010, 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, Inc. 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.
*/
/** \author Tully Foote */
#include "tf2/buffer_core.h"
#include "tf2/time_cache.h"
#include "tf2/exceptions.h"
#include "tf2_msgs/TF2Error.h"
#include <assert.h>
#include <console_bridge/console.h>
#include "tf2/LinearMath/Transform.h"
namespace tf2
{
/** \brief convert Transform msg to Transform */
void transformMsgToTF2(const geometry_msgs::Transform& msg, tf2::Transform& tf2)
{tf2 = tf2::Transform(tf2::Quaternion(msg.rotation.x, msg.rotation.y, msg.rotation.z, msg.rotation.w), tf2::Vector3(msg.translation.x, msg.translation.y, msg.translation.z));}
/** \brief convert Transform to Transform msg*/
void transformTF2ToMsg(const tf2::Transform& tf2, geometry_msgs::Transform& msg)
{
msg.translation.x = tf2.getOrigin().x();
msg.translation.y = tf2.getOrigin().y();
msg.translation.z = tf2.getOrigin().z();
msg.rotation.x = tf2.getRotation().x();
msg.rotation.y = tf2.getRotation().y();
msg.rotation.z = tf2.getRotation().z();
msg.rotation.w = tf2.getRotation().w();
}
/** \brief convert Transform to Transform msg*/
void transformTF2ToMsg(const tf2::Transform& tf2, geometry_msgs::TransformStamped& msg, ros::Time stamp, const std::string& frame_id, const std::string& child_frame_id)
{
transformTF2ToMsg(tf2, msg.transform);
msg.header.stamp = stamp;
msg.header.frame_id = frame_id;
msg.child_frame_id = child_frame_id;
}
void transformTF2ToMsg(const tf2::Quaternion& orient, const tf2::Vector3& pos, geometry_msgs::Transform& msg)
{
msg.translation.x = pos.x();
msg.translation.y = pos.y();
msg.translation.z = pos.z();
msg.rotation.x = orient.x();
msg.rotation.y = orient.y();
msg.rotation.z = orient.z();
msg.rotation.w = orient.w();
}
void transformTF2ToMsg(const tf2::Quaternion& orient, const tf2::Vector3& pos, geometry_msgs::TransformStamped& msg, ros::Time stamp, const std::string& frame_id, const std::string& child_frame_id)
{
transformTF2ToMsg(orient, pos, msg.transform);
msg.header.stamp = stamp;
msg.header.frame_id = frame_id;
msg.child_frame_id = child_frame_id;
}
void setIdentity(geometry_msgs::Transform& tx)
{
tx.translation.x = 0;
tx.translation.y = 0;
tx.translation.z = 0;
tx.rotation.x = 0;
tx.rotation.y = 0;
tx.rotation.z = 0;
tx.rotation.w = 1;
}
bool startsWithSlash(const std::string& frame_id)
{
if (frame_id.size() > 0)
if (frame_id[0] == '/')
return true;
return false;
}
std::string stripSlash(const std::string& in)
{
std::string out = in;
if (startsWithSlash(in))
out.erase(0,1);
return out;
}
bool BufferCore::warnFrameId(const char* function_name_arg, const std::string& frame_id) const
{
if (frame_id.size() == 0)
{
std::stringstream ss;
ss << "Invalid argument passed to "<< function_name_arg <<" in tf2 frame_ids cannot be empty";
logWarn("%s",ss.str().c_str());
return true;
}
if (startsWithSlash(frame_id))
{
std::stringstream ss;
ss << "Invalid argument \"" << frame_id << "\" passed to "<< function_name_arg <<" in tf2 frame_ids cannot start with a '/' like: ";
logWarn("%s",ss.str().c_str());
return true;
}
return false;
}
CompactFrameID BufferCore::validateFrameId(const char* function_name_arg, const std::string& frame_id) const
{
if (frame_id.empty())
{
std::stringstream ss;
ss << "Invalid argument passed to "<< function_name_arg <<" in tf2 frame_ids cannot be empty";
throw tf2::InvalidArgumentException(ss.str().c_str());
}
if (startsWithSlash(frame_id))
{
std::stringstream ss;
ss << "Invalid argument \"" << frame_id << "\" passed to "<< function_name_arg <<" in tf2 frame_ids cannot start with a '/' like: ";
throw tf2::InvalidArgumentException(ss.str().c_str());
}
CompactFrameID id = lookupFrameNumber(frame_id);
if (id == 0)
{
std::stringstream ss;
ss << "\"" << frame_id << "\" passed to "<< function_name_arg <<" does not exist. ";
throw tf2::LookupException(ss.str().c_str());
}
return id;
}
BufferCore::BufferCore(ros::Duration cache_time)
: cache_time_(cache_time)
, transformable_callbacks_counter_(0)
, transformable_requests_counter_(0)
, using_dedicated_thread_(false)
{
frameIDs_["NO_PARENT"] = 0;
frames_.push_back(TimeCacheInterfacePtr());
frameIDs_reverse.push_back("NO_PARENT");
}
BufferCore::~BufferCore()
{
}
void BufferCore::clear()
{
//old_tf_.clear();
boost::mutex::scoped_lock lock(frame_mutex_);
if ( frames_.size() > 1 )
{
for (std::vector<TimeCacheInterfacePtr>::iterator cache_it = frames_.begin() + 1; cache_it != frames_.end(); ++cache_it)
{
if (*cache_it)
(*cache_it)->clearList();
}
}
}
bool BufferCore::setTransform(const geometry_msgs::TransformStamped& transform_in, const std::string& authority, bool is_static)
{
/////BACKEARDS COMPATABILITY
/* tf::StampedTransform tf_transform;
tf::transformStampedMsgToTF(transform_in, tf_transform);
if (!old_tf_.setTransform(tf_transform, authority))
{
printf("Warning old setTransform Failed but was not caught\n");
}*/
/////// New implementation
geometry_msgs::TransformStamped stripped = transform_in;
stripped.header.frame_id = stripSlash(stripped.header.frame_id);
stripped.child_frame_id = stripSlash(stripped.child_frame_id);
bool error_exists = false;
if (stripped.child_frame_id == stripped.header.frame_id)
{
logError("TF_SELF_TRANSFORM: Ignoring transform from authority \"%s\" with frame_id and child_frame_id \"%s\" because they are the same", authority.c_str(), stripped.child_frame_id.c_str());
error_exists = true;
}
if (stripped.child_frame_id == "")
{
logError("TF_NO_CHILD_FRAME_ID: Ignoring transform from authority \"%s\" because child_frame_id not set ", authority.c_str());
error_exists = true;
}
if (stripped.header.frame_id == "")
{
logError("TF_NO_FRAME_ID: Ignoring transform with child_frame_id \"%s\" from authority \"%s\" because frame_id not set", stripped.child_frame_id.c_str(), authority.c_str());
error_exists = true;
}
if (std::isnan(stripped.transform.translation.x) || std::isnan(stripped.transform.translation.y) || std::isnan(stripped.transform.translation.z)||
std::isnan(stripped.transform.rotation.x) || std::isnan(stripped.transform.rotation.y) || std::isnan(stripped.transform.rotation.z) || std::isnan(stripped.transform.rotation.w))
{
logError("TF_NAN_INPUT: Ignoring transform for child_frame_id \"%s\" from authority \"%s\" because of a nan value in the transform (%f %f %f) (%f %f %f %f)",
stripped.child_frame_id.c_str(), authority.c_str(),
stripped.transform.translation.x, stripped.transform.translation.y, stripped.transform.translation.z,
stripped.transform.rotation.x, stripped.transform.rotation.y, stripped.transform.rotation.z, stripped.transform.rotation.w
);
error_exists = true;
}
if (error_exists)
return false;
{
boost::mutex::scoped_lock lock(frame_mutex_);
CompactFrameID frame_number = lookupOrInsertFrameNumber(stripped.child_frame_id);
TimeCacheInterfacePtr frame = getFrame(frame_number);
if (frame == NULL)
frame = allocateFrame(frame_number, is_static);
if (frame->insertData(TransformStorage(stripped, lookupOrInsertFrameNumber(stripped.header.frame_id), frame_number)))
{
frame_authority_[frame_number] = authority;
}
else
{
logWarn("TF_OLD_DATA ignoring data from the past for frame %s at time %g according to authority %s\nPossible reasons are listed at http://wiki.ros.org/tf/Errors%%20explained", stripped.child_frame_id.c_str(), stripped.header.stamp.toSec(), authority.c_str());
return false;
}
}
testTransformableRequests();
return true;
}
TimeCacheInterfacePtr BufferCore::allocateFrame(CompactFrameID cfid, bool is_static)
{
TimeCacheInterfacePtr frame_ptr = frames_[cfid];
if (is_static) {
frames_[cfid] = TimeCacheInterfacePtr(new StaticCache());
} else {
frames_[cfid] = TimeCacheInterfacePtr(new TimeCache(cache_time_));
}
return frames_[cfid];
}
enum WalkEnding
{
Identity,
TargetParentOfSource,
SourceParentOfTarget,
FullPath,
};
// TODO for Jade: Merge walkToTopParent functions; this is now a stub to preserve ABI
template<typename F>
int BufferCore::walkToTopParent(F& f, ros::Time time, CompactFrameID target_id, CompactFrameID source_id, std::string* error_string) const
{
return walkToTopParent(f, time, target_id, source_id, error_string, NULL);
}
template<typename F>
int BufferCore::walkToTopParent(F& f, ros::Time time, CompactFrameID target_id,
CompactFrameID source_id, std::string* error_string, std::vector<CompactFrameID>
*frame_chain) const
{
if (frame_chain)
frame_chain->clear();
// Short circuit if zero length transform to allow lookups on non existant links
if (source_id == target_id)
{
f.finalize(Identity, time);
return tf2_msgs::TF2Error::NO_ERROR;
}
//If getting the latest get the latest common time
if (time == ros::Time())
{
int retval = getLatestCommonTime(target_id, source_id, time, error_string);
if (retval != tf2_msgs::TF2Error::NO_ERROR)
{
return retval;
}
}
// Walk the tree to its root from the source frame, accumulating the transform
CompactFrameID frame = source_id;
CompactFrameID top_parent = frame;
uint32_t depth = 0;
std::string extrapolation_error_string;
bool extrapolation_might_have_occurred = false;
while (frame != 0)
{
TimeCacheInterfacePtr cache = getFrame(frame);
if (frame_chain)
frame_chain->push_back(frame);
if (!cache)
{
// There will be no cache for the very root of the tree
top_parent = frame;
break;
}
CompactFrameID parent = f.gather(cache, time, &extrapolation_error_string);
if (parent == 0)
{
// Just break out here... there may still be a path from source -> target
top_parent = frame;
extrapolation_might_have_occurred = true;
break;
}
// Early out... target frame is a direct parent of the source frame
if (frame == target_id)
{
f.finalize(TargetParentOfSource, time);
return tf2_msgs::TF2Error::NO_ERROR;
}
f.accum(true);
top_parent = frame;
frame = parent;
++depth;
if (depth > MAX_GRAPH_DEPTH)
{
if (error_string)
{
std::stringstream ss;
ss << "The tf tree is invalid because it contains a loop." << std::endl
<< allFramesAsStringNoLock() << std::endl;
*error_string = ss.str();
}
return tf2_msgs::TF2Error::LOOKUP_ERROR;
}
}
// Now walk to the top parent from the target frame, accumulating its transform
frame = target_id;
depth = 0;
std::vector<CompactFrameID> reverse_frame_chain;
while (frame != top_parent)
{
TimeCacheInterfacePtr cache = getFrame(frame);
if (frame_chain)
reverse_frame_chain.push_back(frame);
if (!cache)
{
break;
}
CompactFrameID parent = f.gather(cache, time, error_string);
if (parent == 0)
{
if (error_string)
{
std::stringstream ss;
ss << *error_string << ", when looking up transform from frame [" << lookupFrameString(source_id) << "] to frame [" << lookupFrameString(target_id) << "]";
*error_string = ss.str();
}
return tf2_msgs::TF2Error::EXTRAPOLATION_ERROR;
}
// Early out... source frame is a direct parent of the target frame
if (frame == source_id)
{
f.finalize(SourceParentOfTarget, time);
if (frame_chain)
{
frame_chain->swap(reverse_frame_chain);
}
return tf2_msgs::TF2Error::NO_ERROR;
}
f.accum(false);
frame = parent;
++depth;
if (depth > MAX_GRAPH_DEPTH)
{
if (error_string)
{
std::stringstream ss;
ss << "The tf tree is invalid because it contains a loop." << std::endl
<< allFramesAsStringNoLock() << std::endl;
*error_string = ss.str();
}
return tf2_msgs::TF2Error::LOOKUP_ERROR;
}
}
if (frame != top_parent)
{
if (extrapolation_might_have_occurred)
{
if (error_string)
{
std::stringstream ss;
ss << extrapolation_error_string << ", when looking up transform from frame [" << lookupFrameString(source_id) << "] to frame [" << lookupFrameString(target_id) << "]";
*error_string = ss.str();
}
return tf2_msgs::TF2Error::EXTRAPOLATION_ERROR;
}
createConnectivityErrorString(source_id, target_id, error_string);
return tf2_msgs::TF2Error::CONNECTIVITY_ERROR;
}
f.finalize(FullPath, time);
if (frame_chain)
{
// Pruning: Compare the chains starting at the parent (end) until they differ
int m = reverse_frame_chain.size()-1;
int n = frame_chain->size()-1;
for (; m >= 0 && n >= 0; --m, --n)
{
if ((*frame_chain)[n] != reverse_frame_chain[m])
break;
}
// Erase all duplicate items from frame_chain
if (n > 0)
frame_chain->erase(frame_chain->begin() + (n-1), frame_chain->end());
if (m < reverse_frame_chain.size())
{
for (int i = m; i >= 0; --i)
{
frame_chain->push_back(reverse_frame_chain[i]);
}
}
}
return tf2_msgs::TF2Error::NO_ERROR;
}
struct TransformAccum
{
TransformAccum()
: source_to_top_quat(0.0, 0.0, 0.0, 1.0)
, source_to_top_vec(0.0, 0.0, 0.0)
, target_to_top_quat(0.0, 0.0, 0.0, 1.0)
, target_to_top_vec(0.0, 0.0, 0.0)
, result_quat(0.0, 0.0, 0.0, 1.0)
, result_vec(0.0, 0.0, 0.0)
{
}
CompactFrameID gather(TimeCacheInterfacePtr cache, ros::Time time, std::string* error_string)
{
if (!cache->getData(time, st, error_string))
{
return 0;
}
return st.frame_id_;
}
void accum(bool source)
{
if (source)
{
source_to_top_vec = quatRotate(st.rotation_, source_to_top_vec) + st.translation_;
source_to_top_quat = st.rotation_ * source_to_top_quat;
}
else
{
target_to_top_vec = quatRotate(st.rotation_, target_to_top_vec) + st.translation_;
target_to_top_quat = st.rotation_ * target_to_top_quat;
}
}
void finalize(WalkEnding end, ros::Time _time)
{
switch (end)
{
case Identity:
break;
case TargetParentOfSource:
result_vec = source_to_top_vec;
result_quat = source_to_top_quat;
break;
case SourceParentOfTarget:
{
tf2::Quaternion inv_target_quat = target_to_top_quat.inverse();
tf2::Vector3 inv_target_vec = quatRotate(inv_target_quat, -target_to_top_vec);
result_vec = inv_target_vec;
result_quat = inv_target_quat;
break;
}
case FullPath:
{
tf2::Quaternion inv_target_quat = target_to_top_quat.inverse();
tf2::Vector3 inv_target_vec = quatRotate(inv_target_quat, -target_to_top_vec);
result_vec = quatRotate(inv_target_quat, source_to_top_vec) + inv_target_vec;
result_quat = inv_target_quat * source_to_top_quat;
}
break;
};
time = _time;
}
TransformStorage st;
ros::Time time;
tf2::Quaternion source_to_top_quat;
tf2::Vector3 source_to_top_vec;
tf2::Quaternion target_to_top_quat;
tf2::Vector3 target_to_top_vec;
tf2::Quaternion result_quat;
tf2::Vector3 result_vec;
};
geometry_msgs::TransformStamped BufferCore::lookupTransform(const std::string& target_frame,
const std::string& source_frame,
const ros::Time& time) const
{
boost::mutex::scoped_lock lock(frame_mutex_);
if (target_frame == source_frame) {
geometry_msgs::TransformStamped identity;
identity.header.frame_id = target_frame;
identity.child_frame_id = source_frame;
identity.transform.rotation.w = 1;
if (time == ros::Time())
{
CompactFrameID target_id = lookupFrameNumber(target_frame);
TimeCacheInterfacePtr cache = getFrame(target_id);
if (cache)
identity.header.stamp = cache->getLatestTimestamp();
else
identity.header.stamp = time;
}
else
identity.header.stamp = time;
return identity;
}
//Identify case does not need to be validated above
CompactFrameID target_id = validateFrameId("lookupTransform argument target_frame", target_frame);
CompactFrameID source_id = validateFrameId("lookupTransform argument source_frame", source_frame);
std::string error_string;
TransformAccum accum;
int retval = walkToTopParent(accum, time, target_id, source_id, &error_string);
if (retval != tf2_msgs::TF2Error::NO_ERROR)
{
switch (retval)
{
case tf2_msgs::TF2Error::CONNECTIVITY_ERROR:
throw ConnectivityException(error_string);
case tf2_msgs::TF2Error::EXTRAPOLATION_ERROR:
throw ExtrapolationException(error_string);
case tf2_msgs::TF2Error::LOOKUP_ERROR:
throw LookupException(error_string);
default:
logError("Unknown error code: %d", retval);
assert(0);
}
}
geometry_msgs::TransformStamped output_transform;
transformTF2ToMsg(accum.result_quat, accum.result_vec, output_transform, accum.time, target_frame, source_frame);
return output_transform;
}
geometry_msgs::TransformStamped BufferCore::lookupTransform(const std::string& target_frame,
const ros::Time& target_time,
const std::string& source_frame,
const ros::Time& source_time,
const std::string& fixed_frame) const
{
validateFrameId("lookupTransform argument target_frame", target_frame);
validateFrameId("lookupTransform argument source_frame", source_frame);
validateFrameId("lookupTransform argument fixed_frame", fixed_frame);
geometry_msgs::TransformStamped output;
geometry_msgs::TransformStamped temp1 = lookupTransform(fixed_frame, source_frame, source_time);
geometry_msgs::TransformStamped temp2 = lookupTransform(target_frame, fixed_frame, target_time);
tf2::Transform tf1, tf2;
transformMsgToTF2(temp1.transform, tf1);
transformMsgToTF2(temp2.transform, tf2);
transformTF2ToMsg(tf2*tf1, output.transform);
output.header.stamp = temp2.header.stamp;
output.header.frame_id = target_frame;
output.child_frame_id = source_frame;
return output;
}
/*
geometry_msgs::Twist BufferCore::lookupTwist(const std::string& tracking_frame,
const std::string& observation_frame,
const ros::Time& time,
const ros::Duration& averaging_interval) const
{
try
{
geometry_msgs::Twist t;
old_tf_.lookupTwist(tracking_frame, observation_frame,
time, averaging_interval, t);
return t;
}
catch (tf::LookupException& ex)
{
throw tf2::LookupException(ex.what());
}
catch (tf::ConnectivityException& ex)
{
throw tf2::ConnectivityException(ex.what());
}
catch (tf::ExtrapolationException& ex)
{
throw tf2::ExtrapolationException(ex.what());
}
catch (tf::InvalidArgument& ex)
{
throw tf2::InvalidArgumentException(ex.what());
}
}
geometry_msgs::Twist BufferCore::lookupTwist(const std::string& tracking_frame,
const std::string& observation_frame,
const std::string& reference_frame,
const tf2::Point & reference_point,
const std::string& reference_point_frame,
const ros::Time& time,
const ros::Duration& averaging_interval) const
{
try{
geometry_msgs::Twist t;
old_tf_.lookupTwist(tracking_frame, observation_frame, reference_frame, reference_point, reference_point_frame,
time, averaging_interval, t);
return t;
}
catch (tf::LookupException& ex)
{
throw tf2::LookupException(ex.what());
}
catch (tf::ConnectivityException& ex)
{
throw tf2::ConnectivityException(ex.what());
}
catch (tf::ExtrapolationException& ex)
{
throw tf2::ExtrapolationException(ex.what());
}
catch (tf::InvalidArgument& ex)
{
throw tf2::InvalidArgumentException(ex.what());
}
}
*/
struct CanTransformAccum
{
CompactFrameID gather(TimeCacheInterfacePtr cache, ros::Time time, std::string* error_string)
{
return cache->getParent(time, error_string);
}
void accum(bool source)
{
}
void finalize(WalkEnding end, ros::Time _time)
{
}
TransformStorage st;
};
bool BufferCore::canTransformNoLock(CompactFrameID target_id, CompactFrameID source_id,
const ros::Time& time, std::string* error_msg) const
{
if (target_id == 0 || source_id == 0)
{
return false;
}
if (target_id == source_id)
{
return true;
}
CanTransformAccum accum;
if (walkToTopParent(accum, time, target_id, source_id, error_msg) == tf2_msgs::TF2Error::NO_ERROR)
{
return true;
}
return false;
}
bool BufferCore::canTransformInternal(CompactFrameID target_id, CompactFrameID source_id,
const ros::Time& time, std::string* error_msg) const
{
boost::mutex::scoped_lock lock(frame_mutex_);
return canTransformNoLock(target_id, source_id, time, error_msg);
}
bool BufferCore::canTransform(const std::string& target_frame, const std::string& source_frame,
const ros::Time& time, std::string* error_msg) const
{
// Short circuit if target_frame == source_frame
if (target_frame == source_frame)
return true;
if (warnFrameId("canTransform argument target_frame", target_frame))
return false;
if (warnFrameId("canTransform argument source_frame", source_frame))
return false;
boost::mutex::scoped_lock lock(frame_mutex_);
CompactFrameID target_id = lookupFrameNumber(target_frame);
CompactFrameID source_id = lookupFrameNumber(source_frame);
return canTransformNoLock(target_id, source_id, time, error_msg);
}
bool BufferCore::canTransform(const std::string& target_frame, const ros::Time& target_time,
const std::string& source_frame, const ros::Time& source_time,
const std::string& fixed_frame, std::string* error_msg) const
{
if (warnFrameId("canTransform argument target_frame", target_frame))
return false;
if (warnFrameId("canTransform argument source_frame", source_frame))
return false;
if (warnFrameId("canTransform argument fixed_frame", fixed_frame))
return false;
return canTransform(target_frame, fixed_frame, target_time) && canTransform(fixed_frame, source_frame, source_time, error_msg);
}
tf2::TimeCacheInterfacePtr BufferCore::getFrame(CompactFrameID frame_id) const
{
if (frame_id >= frames_.size())
return TimeCacheInterfacePtr();
else
{
return frames_[frame_id];
}
}
CompactFrameID BufferCore::lookupFrameNumber(const std::string& frameid_str) const
{
CompactFrameID retval;
M_StringToCompactFrameID::const_iterator map_it = frameIDs_.find(frameid_str);
if (map_it == frameIDs_.end())
{
retval = CompactFrameID(0);
}
else
retval = map_it->second;
return retval;
}
CompactFrameID BufferCore::lookupOrInsertFrameNumber(const std::string& frameid_str)
{
CompactFrameID retval = 0;
M_StringToCompactFrameID::iterator map_it = frameIDs_.find(frameid_str);
if (map_it == frameIDs_.end())
{
retval = CompactFrameID(frames_.size());
frames_.push_back(TimeCacheInterfacePtr());//Just a place holder for iteration
frameIDs_[frameid_str] = retval;
frameIDs_reverse.push_back(frameid_str);
}
else
retval = frameIDs_[frameid_str];
return retval;
}
const std::string& BufferCore::lookupFrameString(CompactFrameID frame_id_num) const
{
if (frame_id_num >= frameIDs_reverse.size())
{
std::stringstream ss;
ss << "Reverse lookup of frame id " << frame_id_num << " failed!";
throw tf2::LookupException(ss.str());
}
else
return frameIDs_reverse[frame_id_num];
}
void BufferCore::createConnectivityErrorString(CompactFrameID source_frame, CompactFrameID target_frame, std::string* out) const
{
if (!out)
{
return;
}
*out = std::string("Could not find a connection between '"+lookupFrameString(target_frame)+"' and '"+
lookupFrameString(source_frame)+"' because they are not part of the same tree."+
"Tf has two or more unconnected trees.");
}
std::string BufferCore::allFramesAsString() const
{
boost::mutex::scoped_lock lock(frame_mutex_);
return this->allFramesAsStringNoLock();
}
std::string BufferCore::allFramesAsStringNoLock() const
{
std::stringstream mstream;
TransformStorage temp;
// for (std::vector< TimeCache*>::iterator it = frames_.begin(); it != frames_.end(); ++it)
///regular transforms
for (unsigned int counter = 1; counter < frames_.size(); counter ++)
{
TimeCacheInterfacePtr frame_ptr = getFrame(CompactFrameID(counter));
if (frame_ptr == NULL)
continue;
CompactFrameID frame_id_num;
if( frame_ptr->getData(ros::Time(), temp))
frame_id_num = temp.frame_id_;
else
{
frame_id_num = 0;
}
mstream << "Frame "<< frameIDs_reverse[counter] << " exists with parent " << frameIDs_reverse[frame_id_num] << "." <<std::endl;
}
return mstream.str();
}
struct TimeAndFrameIDFrameComparator
{
TimeAndFrameIDFrameComparator(CompactFrameID id)
: id(id)
{}
bool operator()(const P_TimeAndFrameID& rhs) const
{
return rhs.second == id;
}
CompactFrameID id;
};
int BufferCore::getLatestCommonTime(CompactFrameID target_id, CompactFrameID source_id, ros::Time & time, std::string * error_string) const
{
// Error if one of the frames don't exist.
if (source_id == 0 || target_id == 0) return tf2_msgs::TF2Error::LOOKUP_ERROR;
if (source_id == target_id)
{
TimeCacheInterfacePtr cache = getFrame(source_id);
//Set time to latest timestamp of frameid in case of target and source frame id are the same
if (cache)
time = cache->getLatestTimestamp();
else
time = ros::Time();
return tf2_msgs::TF2Error::NO_ERROR;
}
std::vector<P_TimeAndFrameID> lct_cache;
// Walk the tree to its root from the source frame, accumulating the list of parent/time as well as the latest time
// in the target is a direct parent
CompactFrameID frame = source_id;
P_TimeAndFrameID temp;
uint32_t depth = 0;
ros::Time common_time = ros::TIME_MAX;
while (frame != 0)
{
TimeCacheInterfacePtr cache = getFrame(frame);
if (!cache)
{
// There will be no cache for the very root of the tree
break;
}
P_TimeAndFrameID latest = cache->getLatestTimeAndParent();
if (latest.second == 0)
{
// Just break out here... there may still be a path from source -> target
break;
}
if (!latest.first.isZero())
{
common_time = std::min(latest.first, common_time);
}
lct_cache.push_back(latest);
frame = latest.second;
// Early out... target frame is a direct parent of the source frame
if (frame == target_id)
{
time = common_time;
if (time == ros::TIME_MAX)
{
time = ros::Time();
}
return tf2_msgs::TF2Error::NO_ERROR;
}
++depth;
if (depth > MAX_GRAPH_DEPTH)
{
if (error_string)
{
std::stringstream ss;
ss<<"The tf tree is invalid because it contains a loop." << std::endl
<< allFramesAsStringNoLock() << std::endl;
*error_string = ss.str();
}
return tf2_msgs::TF2Error::LOOKUP_ERROR;
}
}
// Now walk to the top parent from the target frame, accumulating the latest time and looking for a common parent
frame = target_id;
depth = 0;
common_time = ros::TIME_MAX;
CompactFrameID common_parent = 0;
while (true)
{
TimeCacheInterfacePtr cache = getFrame(frame);
if (!cache)
{
break;
}
P_TimeAndFrameID latest = cache->getLatestTimeAndParent();
if (latest.second == 0)
{
break;
}
if (!latest.first.isZero())
{
common_time = std::min(latest.first, common_time);
}
std::vector<P_TimeAndFrameID>::iterator it = std::find_if(lct_cache.begin(), lct_cache.end(), TimeAndFrameIDFrameComparator(latest.second));
if (it != lct_cache.end()) // found a common parent
{
common_parent = it->second;
break;
}
frame = latest.second;
// Early out... source frame is a direct parent of the target frame
if (frame == source_id)
{
time = common_time;
if (time == ros::TIME_MAX)
{
time = ros::Time();
}
return tf2_msgs::TF2Error::NO_ERROR;
}
++depth;
if (depth > MAX_GRAPH_DEPTH)
{
if (error_string)
{
std::stringstream ss;
ss<<"The tf tree is invalid because it contains a loop." << std::endl
<< allFramesAsStringNoLock() << std::endl;
*error_string = ss.str();
}
return tf2_msgs::TF2Error::LOOKUP_ERROR;
}
}
if (common_parent == 0)
{
createConnectivityErrorString(source_id, target_id, error_string);
return tf2_msgs::TF2Error::CONNECTIVITY_ERROR;
}
// Loop through the source -> root list until we hit the common parent
{
std::vector<P_TimeAndFrameID>::iterator it = lct_cache.begin();
std::vector<P_TimeAndFrameID>::iterator end = lct_cache.end();
for (; it != end; ++it)
{
if (!it->first.isZero())
{
common_time = std::min(common_time, it->first);
}
if (it->second == common_parent)
{
break;
}
}
}
if (common_time == ros::TIME_MAX)
{
common_time = ros::Time();
}
time = common_time;
return tf2_msgs::TF2Error::NO_ERROR;
}
std::string BufferCore::allFramesAsYAML(double current_time) const
{
std::stringstream mstream;
boost::mutex::scoped_lock lock(frame_mutex_);
TransformStorage temp;
if (frames_.size() ==1)
mstream <<"[]";
mstream.precision(3);
mstream.setf(std::ios::fixed,std::ios::floatfield);
// for (std::vector< TimeCache*>::iterator it = frames_.begin(); it != frames_.end(); ++it)
for (unsigned int counter = 1; counter < frames_.size(); counter ++)//one referenced for 0 is no frame
{
CompactFrameID cfid = CompactFrameID(counter);
CompactFrameID frame_id_num;
TimeCacheInterfacePtr cache = getFrame(cfid);
if (!cache)
{
continue;
}
if(!cache->getData(ros::Time(), temp))
{
continue;
}
frame_id_num = temp.frame_id_;
std::string authority = "no recorded authority";
std::map<CompactFrameID, std::string>::const_iterator it = frame_authority_.find(cfid);
if (it != frame_authority_.end()) {
authority = it->second;
}
double rate = cache->getListLength() / std::max((cache->getLatestTimestamp().toSec() -
cache->getOldestTimestamp().toSec() ), 0.0001);
mstream << std::fixed; //fixed point notation
mstream.precision(3); //3 decimal places
mstream << frameIDs_reverse[cfid] << ": " << std::endl;
mstream << " parent: '" << frameIDs_reverse[frame_id_num] << "'" << std::endl;
mstream << " broadcaster: '" << authority << "'" << std::endl;
mstream << " rate: " << rate << std::endl;
mstream << " most_recent_transform: " << (cache->getLatestTimestamp()).toSec() << std::endl;
mstream << " oldest_transform: " << (cache->getOldestTimestamp()).toSec() << std::endl;
if ( current_time > 0 ) {
mstream << " transform_delay: " << current_time - cache->getLatestTimestamp().toSec() << std::endl;
}
mstream << " buffer_length: " << (cache->getLatestTimestamp() - cache->getOldestTimestamp()).toSec() << std::endl;
}
return mstream.str();
}
std::string BufferCore::allFramesAsYAML() const
{
return this->allFramesAsYAML(0.0);
}
TransformableCallbackHandle BufferCore::addTransformableCallback(const TransformableCallback& cb)
{
boost::mutex::scoped_lock lock(transformable_callbacks_mutex_);
TransformableCallbackHandle handle = ++transformable_callbacks_counter_;
while (!transformable_callbacks_.insert(std::make_pair(handle, cb)).second)
{
handle = ++transformable_callbacks_counter_;
}
return handle;
}
struct BufferCore::RemoveRequestByCallback
{
RemoveRequestByCallback(TransformableCallbackHandle handle)
: handle_(handle)
{}
bool operator()(const TransformableRequest& req)
{
return req.cb_handle == handle_;
}
TransformableCallbackHandle handle_;
};
void BufferCore::removeTransformableCallback(TransformableCallbackHandle handle)
{
{
boost::mutex::scoped_lock lock(transformable_callbacks_mutex_);
transformable_callbacks_.erase(handle);
}
{
boost::mutex::scoped_lock lock(transformable_requests_mutex_);
V_TransformableRequest::iterator it = std::remove_if(transformable_requests_.begin(), transformable_requests_.end(), RemoveRequestByCallback(handle));
transformable_requests_.erase(it, transformable_requests_.end());
}
}
TransformableRequestHandle BufferCore::addTransformableRequest(TransformableCallbackHandle handle, const std::string& target_frame, const std::string& source_frame, ros::Time time)
{
// shortcut if target == source
if (target_frame == source_frame)
{
return 0;
}
TransformableRequest req;
req.target_id = lookupFrameNumber(target_frame);
req.source_id = lookupFrameNumber(source_frame);
// First check if the request is already transformable. If it is, return immediately
if (canTransformInternal(req.target_id, req.source_id, time, 0))
{
return 0;
}
// Might not be transformable at all, ever (if it's too far in the past)
if (req.target_id && req.source_id)
{
ros::Time latest_time;
// TODO: This is incorrect, but better than nothing. Really we want the latest time for
// any of the frames
getLatestCommonTime(req.target_id, req.source_id, latest_time, 0);
if (!latest_time.isZero() && time + cache_time_ < latest_time)
{
return 0xffffffffffffffffULL;
}
}
req.cb_handle = handle;
req.time = time;
req.request_handle = ++transformable_requests_counter_;
if (req.request_handle == 0 || req.request_handle == 0xffffffffffffffffULL)
{
req.request_handle = 1;
}
if (req.target_id == 0)
{
req.target_string = target_frame;
}
if (req.source_id == 0)
{
req.source_string = source_frame;
}
boost::mutex::scoped_lock lock(transformable_requests_mutex_);
transformable_requests_.push_back(req);
return req.request_handle;
}
struct BufferCore::RemoveRequestByID
{
RemoveRequestByID(TransformableRequestHandle handle)
: handle_(handle)
{}
bool operator()(const TransformableRequest& req)
{
return req.request_handle == handle_;
}
TransformableCallbackHandle handle_;
};
void BufferCore::cancelTransformableRequest(TransformableRequestHandle handle)
{
boost::mutex::scoped_lock lock(transformable_requests_mutex_);
V_TransformableRequest::iterator it = std::remove_if(transformable_requests_.begin(), transformable_requests_.end(), RemoveRequestByID(handle));
if (it != transformable_requests_.end())
{
transformable_requests_.erase(it, transformable_requests_.end());
}
}
// backwards compability for tf methods
boost::signals2::connection BufferCore::_addTransformsChangedListener(boost::function<void(void)> callback)
{
boost::mutex::scoped_lock lock(transformable_requests_mutex_);
return _transforms_changed_.connect(callback);
}
void BufferCore::_removeTransformsChangedListener(boost::signals2::connection c)
{
boost::mutex::scoped_lock lock(transformable_requests_mutex_);
c.disconnect();
}
bool BufferCore::_frameExists(const std::string& frame_id_str) const
{
boost::mutex::scoped_lock lock(frame_mutex_);
return frameIDs_.count(frame_id_str);
}
bool BufferCore::_getParent(const std::string& frame_id, ros::Time time, std::string& parent) const
{
boost::mutex::scoped_lock lock(frame_mutex_);
CompactFrameID frame_number = lookupFrameNumber(frame_id);
TimeCacheInterfacePtr frame = getFrame(frame_number);
if (! frame)
return false;
CompactFrameID parent_id = frame->getParent(time, NULL);
if (parent_id == 0)
return false;
parent = lookupFrameString(parent_id);
return true;
};
void BufferCore::_getFrameStrings(std::vector<std::string> & vec) const
{
vec.clear();
boost::mutex::scoped_lock lock(frame_mutex_);
TransformStorage temp;
// for (std::vector< TimeCache*>::iterator it = frames_.begin(); it != frames_.end(); ++it)
for (unsigned int counter = 1; counter < frameIDs_reverse.size(); counter ++)
{
vec.push_back(frameIDs_reverse[counter]);
}
return;
}
void BufferCore::testTransformableRequests()
{
boost::mutex::scoped_lock lock(transformable_requests_mutex_);
V_TransformableRequest::iterator it = transformable_requests_.begin();
for (; it != transformable_requests_.end();)
{
TransformableRequest& req = *it;
// One or both of the frames may not have existed when the request was originally made.
if (req.target_id == 0)
{
req.target_id = lookupFrameNumber(req.target_string);
}
if (req.source_id == 0)
{
req.source_id = lookupFrameNumber(req.source_string);
}
ros::Time latest_time;
bool do_cb = false;
TransformableResult result = TransformAvailable;
// TODO: This is incorrect, but better than nothing. Really we want the latest time for
// any of the frames
getLatestCommonTime(req.target_id, req.source_id, latest_time, 0);
if (!latest_time.isZero() && req.time + cache_time_ < latest_time)
{
do_cb = true;
result = TransformFailure;
}
else if (canTransformInternal(req.target_id, req.source_id, req.time, 0))
{
do_cb = true;
result = TransformAvailable;
}
if (do_cb)
{
{
boost::mutex::scoped_lock lock2(transformable_callbacks_mutex_);
M_TransformableCallback::iterator it = transformable_callbacks_.find(req.cb_handle);
if (it != transformable_callbacks_.end())
{
const TransformableCallback& cb = it->second;
cb(req.request_handle, lookupFrameString(req.target_id), lookupFrameString(req.source_id), req.time, result);
}
}
if (transformable_requests_.size() > 1)
{
transformable_requests_[it - transformable_requests_.begin()] = transformable_requests_.back();
}
transformable_requests_.erase(transformable_requests_.end() - 1);
}
else
{
++it;
}
}
// unlock before allowing possible user callbacks to avoid potential detadlock (#91)
lock.unlock();
// Backwards compatability callback for tf
_transforms_changed_();
}
std::string BufferCore::_allFramesAsDot(double current_time) const
{
std::stringstream mstream;
mstream << "digraph G {" << std::endl;
boost::mutex::scoped_lock lock(frame_mutex_);
TransformStorage temp;
if (frames_.size() == 1) {
mstream <<"\"no tf data recieved\"";
}
mstream.precision(3);
mstream.setf(std::ios::fixed,std::ios::floatfield);
for (unsigned int counter = 1; counter < frames_.size(); counter ++) // one referenced for 0 is no frame
{
unsigned int frame_id_num;
TimeCacheInterfacePtr counter_frame = getFrame(counter);
if (!counter_frame) {
continue;
}
if(!counter_frame->getData(ros::Time(), temp)) {
continue;
} else {
frame_id_num = temp.frame_id_;
}
std::string authority = "no recorded authority";
std::map<unsigned int, std::string>::const_iterator it = frame_authority_.find(counter);
if (it != frame_authority_.end())
authority = it->second;
double rate = counter_frame->getListLength() / std::max((counter_frame->getLatestTimestamp().toSec() -
counter_frame->getOldestTimestamp().toSec()), 0.0001);
mstream << std::fixed; //fixed point notation
mstream.precision(3); //3 decimal places
mstream << "\"" << frameIDs_reverse[frame_id_num] << "\"" << " -> "
<< "\"" << frameIDs_reverse[counter] << "\"" << "[label=\""
//<< "Time: " << current_time.toSec() << "\\n"
<< "Broadcaster: " << authority << "\\n"
<< "Average rate: " << rate << " Hz\\n"
<< "Most recent transform: " << (counter_frame->getLatestTimestamp()).toSec() <<" ";
if (current_time > 0)
mstream << "( "<< current_time - counter_frame->getLatestTimestamp().toSec() << " sec old)";
mstream << "\\n"
// << "(time: " << getFrame(counter)->getLatestTimestamp().toSec() << ")\\n"
// << "Oldest transform: " << (current_time - getFrame(counter)->getOldestTimestamp()).toSec() << " sec old \\n"
// << "(time: " << (getFrame(counter)->getOldestTimestamp()).toSec() << ")\\n"
<< "Buffer length: " << (counter_frame->getLatestTimestamp()-counter_frame->getOldestTimestamp()).toSec() << " sec\\n"
<<"\"];" <<std::endl;
}
for (unsigned int counter = 1; counter < frames_.size(); counter ++)//one referenced for 0 is no frame
{
unsigned int frame_id_num;
TimeCacheInterfacePtr counter_frame = getFrame(counter);
if (!counter_frame) {
if (current_time > 0) {
mstream << "edge [style=invis];" <<std::endl;
mstream << " subgraph cluster_legend { style=bold; color=black; label =\"view_frames Result\";\n"
<< "\"Recorded at time: " << current_time << "\"[ shape=plaintext ] ;\n "
<< "}" << "->" << "\"" << frameIDs_reverse[counter] << "\";" << std::endl;
}
continue;
}
if (counter_frame->getData(ros::Time(), temp)) {
frame_id_num = temp.frame_id_;
} else {
frame_id_num = 0;
}
if(frameIDs_reverse[frame_id_num]=="NO_PARENT")
{
mstream << "edge [style=invis];" <<std::endl;
mstream << " subgraph cluster_legend { style=bold; color=black; label =\"view_frames Result\";\n";
if (current_time > 0)
mstream << "\"Recorded at time: " << current_time << "\"[ shape=plaintext ] ;\n ";
mstream << "}" << "->" << "\"" << frameIDs_reverse[counter] << "\";" << std::endl;
}
}
mstream << "}";
return mstream.str();
}
std::string BufferCore::_allFramesAsDot() const
{
return _allFramesAsDot(0.0);
}
void BufferCore::_chainAsVector(const std::string & target_frame, ros::Time target_time, const std::string & source_frame, ros::Time source_time, const std::string& fixed_frame, std::vector<std::string>& output) const
{
std::string error_string;
output.clear(); //empty vector
std::stringstream mstream;
boost::mutex::scoped_lock lock(frame_mutex_);
TransformAccum accum;
// Get source frame/time using getFrame
CompactFrameID source_id = lookupFrameNumber(source_frame);
CompactFrameID fixed_id = lookupFrameNumber(fixed_frame);
CompactFrameID target_id = lookupFrameNumber(target_frame);
std::vector<CompactFrameID> source_frame_chain;
int retval = walkToTopParent(accum, source_time, fixed_id, source_id, &error_string, &source_frame_chain);
if (retval != tf2_msgs::TF2Error::NO_ERROR)
{
switch (retval)
{
case tf2_msgs::TF2Error::CONNECTIVITY_ERROR:
throw ConnectivityException(error_string);
case tf2_msgs::TF2Error::EXTRAPOLATION_ERROR:
throw ExtrapolationException(error_string);
case tf2_msgs::TF2Error::LOOKUP_ERROR:
throw LookupException(error_string);
default:
logError("Unknown error code: %d", retval);
assert(0);
}
}
if (source_time != target_time)
{
std::vector<CompactFrameID> target_frame_chain;
retval = walkToTopParent(accum, target_time, target_id, fixed_id, &error_string, &target_frame_chain);
if (retval != tf2_msgs::TF2Error::NO_ERROR)
{
switch (retval)
{
case tf2_msgs::TF2Error::CONNECTIVITY_ERROR:
throw ConnectivityException(error_string);
case tf2_msgs::TF2Error::EXTRAPOLATION_ERROR:
throw ExtrapolationException(error_string);
case tf2_msgs::TF2Error::LOOKUP_ERROR:
throw LookupException(error_string);
default:
logError("Unknown error code: %d", retval);
assert(0);
}
}
int m = target_frame_chain.size()-1;
int n = source_frame_chain.size()-1;
for (; m >= 0 && n >= 0; --m, --n)
{
if (source_frame_chain[n] != target_frame_chain[m])
break;
}
// Erase all duplicate items from frame_chain
if (n > 0)
source_frame_chain.erase(source_frame_chain.begin() + (n-1), source_frame_chain.end());
if (m < target_frame_chain.size())
{
for (unsigned int i = 0; i <= m; ++i)
{
source_frame_chain.push_back(target_frame_chain[i]);
}
}
}
// Write each element of source_frame_chain as string
for (unsigned int i = 0; i < source_frame_chain.size(); ++i)
{
output.push_back(lookupFrameString(source_frame_chain[i]));
}
}
} // namespace tf2
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.