fake_mir_joint_publisher.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import rospy
00003 from sensor_msgs.msg import JointState
00004 
00005 def fake_mir_joint_publisher():
00006     rospy.init_node('fake_mir_joint_publisher')
00007     pub = rospy.Publisher('joint_states', JointState, queue_size=10)
00008     r = rospy.Rate(50.0)
00009     while not rospy.is_shutdown():
00010         js = JointState()
00011         js.header.stamp = rospy.Time.now()
00012         js.name =  ['left_wheel_joint', 'right_wheel_joint',
00013                     'fl_caster_rotation_joint', 'fl_caster_wheel_joint',
00014                     'fr_caster_rotation_joint', 'fr_caster_wheel_joint',
00015                     'bl_caster_rotation_joint', 'bl_caster_wheel_joint',
00016                     'br_caster_rotation_joint', 'br_caster_wheel_joint']
00017         js.position = [0.0 for _ in js.name]
00018         js.velocity = [0.0 for _ in js.name]
00019         js.effort = [0.0 for _ in js.name]
00020         pub.publish(js)
00021         r.sleep()
00022 
00023 
00024 if __name__ == '__main__':
00025     try:
00026         fake_mir_joint_publisher()
00027     except rospy.ROSInterruptException:
00028         pass


mir_driver
Author(s): Martin Günther
autogenerated on Wed May 8 2019 02:53:33