Main Page
Namespaces
Classes
Files
File List
nodes
fake_mir_joint_publisher.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
import
rospy
3
from
sensor_msgs.msg
import
JointState
4
5
def
fake_mir_joint_publisher
():
6
rospy.init_node(
'fake_mir_joint_publisher'
)
7
pub = rospy.Publisher(
'joint_states'
, JointState, queue_size=10)
8
r = rospy.Rate(50.0)
9
while
not
rospy.is_shutdown():
10
js = JointState()
11
js.header.stamp = rospy.Time.now()
12
js.name = [
'left_wheel_joint'
,
'right_wheel_joint'
,
13
'fl_caster_rotation_joint'
,
'fl_caster_wheel_joint'
,
14
'fr_caster_rotation_joint'
,
'fr_caster_wheel_joint'
,
15
'bl_caster_rotation_joint'
,
'bl_caster_wheel_joint'
,
16
'br_caster_rotation_joint'
,
'br_caster_wheel_joint'
]
17
js.position = [0.0
for
_
in
js.name]
18
js.velocity = [0.0
for
_
in
js.name]
19
js.effort = [0.0
for
_
in
js.name]
20
pub.publish(js)
21
r.sleep()
22
23
24
if
__name__ ==
'__main__'
:
25
try
:
26
fake_mir_joint_publisher
()
27
except
rospy.ROSInterruptException:
28
pass
fake_mir_joint_publisher.fake_mir_joint_publisher
def fake_mir_joint_publisher()
Definition:
fake_mir_joint_publisher.py:5
fake_mir_joint_publisher
Definition:
fake_mir_joint_publisher.py:1
mir_driver
Author(s): Martin Günther
autogenerated on Wed May 8 2019 02:38:53