example_blocked_goal_alternative.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 
17 
18 import rospy
19 import random
20 import math
21 from geometry_msgs.msg import Pose2D
22 from cob_map_accessibility_analysis.blocked_goal_alternative import BlockedGoalAlternative
23 
24 if __name__ == "__main__":
25 
26  rospy.init_node("blocked_goal_alternative_node")
28 
29  pose2d = Pose2D()
30  pose2d.x = random.uniform(-10.0, 10.0)
31  pose2d.y = random.uniform(-10.0, 10.0)
32  pose2d.theta = random.uniform(-math.pi, math.pi)
33 
34  rospy.loginfo("Incoming Nav Goal")
35  print(pose2d)
36 
37  (success, goal) = bga.check_nav_goal(pose2d)
38  if not success:
39  (success, goal) = bga.check_perimeter(pose2d)


cob_map_accessibility_analysis
Author(s): Richard Bormann
autogenerated on Sat Oct 24 2020 03:50:48