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 
6  rospy.init_node('fake_mir_joint_publisher')
7  prefix = rospy.get_param('~prefix', '')
8  pub = rospy.Publisher('joint_states', JointState, queue_size=10)
9  r = rospy.Rate(50.0)
10  while not rospy.is_shutdown():
11  js = JointState()
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]
21  pub.publish(js)
22  r.sleep()
23 
24 
25 if __name__ == '__main__':
26  try:
28  except rospy.ROSInterruptException:
29  pass


mir_driver
Author(s): Martin Günther
autogenerated on Sun Feb 14 2021 03:40:16