Commit a7530368 authored by Daniel Müller's avatar Daniel Müller
Browse files

Moved functions from robot.py to interfaces.py

parent 6eac4632
#!/usr/bin/python
import rospy
from std_msgs.msg import Bool
from geometry_msgs.msg import Pose
class MappingInterface:
@staticmethod
def do_mapping(active):
"""
This method instructs the mapping to change the map
:boolean: if True the mapping will change the map
"""
rospy.loginfo("[Robot] do mapping %s" % active)
msg = Bool(active)
do_mapping_pub = rospy.Publisher('/homer_mapping/do_mapping',
Bool, queue_size=10)
do_mapping_pub.publish(msg)
@staticmethod
def set_map_pose(pose):
"""
This changes the pose of Lisa to the given Pose
:pose: the geometry_msgs::Pose the mapping should set the Robot to
"""
set_map_pose_pub = rospy.Publisher("homer_mapping/userdef_pose",
Pose, queue_size=1)
set_map_pose_pub.publish(pose)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment