2 """ For more info on the documentation go to https://www.decawave.com/sites/default/files/dwm1001-api-guide.pdf 5 from dwm1001_systemDefinitions
import SYS_DEFS
8 __author__ = SYS_DEFS.AUTHOR
9 __version__ = SYS_DEFS.VERSION
10 __maintainer__ = SYS_DEFS.MAINTAINER
11 __email__ = SYS_DEFS.EMAIL
12 __status__ = SYS_DEFS.STATUS
16 from localizer_dwm1001.msg
import Anchor
17 from localizer_dwm1001.msg
import Tag
18 from localizer_dwm1001.srv
import Anchor_0
19 from localizer_dwm1001.srv
import Tag_srv
20 from localizer_dwm1001.srv
import Anchor_1
21 from localizer_dwm1001.srv
import Anchor_2
22 from localizer_dwm1001.srv
import Anchor_3
23 from std_srvs.srv
import Trigger, TriggerResponse
33 return (anchor_0.x, anchor_0.y, anchor_0.z)
36 return (anchor_1.x, anchor_1.y, anchor_1.z)
39 return (anchor_2.x, anchor_2.y, anchor_2.z)
42 return (anchor_3.x, anchor_3.y, anchor_3.z)
45 return (tag.x, tag.y, tag.z)
72 rospy.init_node(
'dwm1001_service')
73 rospy.Subscriber(
"/dwm1001/anchor0", Anchor, Anchor0callback)
74 rospy.Subscriber(
"/dwm1001/anchor1", Anchor, Anchor1callback)
75 rospy.Subscriber(
"/dwm1001/anchor2", Anchor, Anchor2callback)
76 rospy.Subscriber(
"/dwm1001/anchor3", Anchor, Anchor3callback)
77 rospy.Subscriber(
"/dwm1001/tag", Tag, TagCallback)
78 rospy.Service(
'/Anchor_0', Anchor_0, triggerResponseAnchor0)
79 rospy.Service(
'/Anchor_1', Anchor_1, triggerResponseAnchor1)
80 rospy.Service(
'/Anchor_2', Anchor_2, triggerResponseAnchor2)
81 rospy.Service(
'/Anchor_3', Anchor_3, triggerResponseAnchor3)
82 rospy.Service(
'/Tag', Tag_srv, triggerResponseTag)
def triggerResponseAnchor2(request)
def triggerResponseTag(request)
def triggerResponseAnchor0(request)
def Anchor2callback(data)
def Anchor1callback(data)
def triggerResponseAnchor1(request)
def Anchor3callback(data)
def Anchor0callback(data)
def triggerResponseAnchor3(request)