3 from sensor_msgs.msg
import JointState
6 rospy.init_node(
'fake_mir_joint_publisher')
7 prefix = rospy.get_param(
'~prefix',
'')
8 pub = rospy.Publisher(
'joint_states', JointState, queue_size=10)
10 while not rospy.is_shutdown():
12 js.header.stamp = rospy.Time.now()
13 js.name = [prefix +
'left_wheel_joint', prefix +
'right_wheel_joint',
14 prefix +
'fl_caster_rotation_joint', prefix +
'fl_caster_wheel_joint',
15 prefix +
'fr_caster_rotation_joint', prefix +
'fr_caster_wheel_joint',
16 prefix +
'bl_caster_rotation_joint', prefix +
'bl_caster_wheel_joint',
17 prefix +
'br_caster_rotation_joint', prefix +
'br_caster_wheel_joint']
18 js.position = [0.0
for _
in js.name]
19 js.velocity = [0.0
for _
in js.name]
20 js.effort = [0.0
for _
in js.name]
25 if __name__ ==
'__main__':
28 except rospy.ROSInterruptException:
def fake_mir_joint_publisher()