joint_state_pruner.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- coding: utf-8 -*-
00003 
00004 import rospy
00005 from sensor_msgs.msg import JointState
00006 
00007 class JointStatePruner():
00008     def __init__(self):
00009         rospy.init_node('joint_state_pruner', anonymous=True)
00010         self.pruned_pub = rospy.Publisher("/joint_states_pruned", JointState)
00011         rospy.Subscriber("/joint_states", JointState, self.joint_state_callback)
00012         rospy.spin()
00013 
00014 
00015     def joint_state_callback(self,js):
00016         js.effort = []
00017         js.velocity = []
00018         self.pruned_pub.publish(js)
00019 
00020 if __name__ == '__main__':
00021     jsp = JointStatePruner()


jsk_topic_tools
Author(s): Kei Okada , Yusuke Furuta
autogenerated on Mon Oct 6 2014 10:56:17