rospy publisher behaving different from rostopic pub
Hi,
I am trying to control my kinova mico manipulator arm through ROS python. I observed that when I use:
rostopic pub - r 10 /mico_arm_driver/in/cartesian_velocity geometry_msgs/TwistStamped "{header: {seq: 0, stamp: {secs: 0, nsecs: 0}, frame_id: ''},
twist: {linear: {x: 0.0, y: 0.0, z: 0.1}, angular: {x: 0.0, y: 0.0, z: 0.0}}}"
my manipulator moves smoothly. But, when I try to implement the same thing as python function, the movement is not smooth.
My function:
def worker(self):
carvel_pub = rosy.Publisher('/mico_arm_driver/in/cartesian_velocity', geometry_msgs.msg.TwistStamped, queue_size=10)
rate = rospy.Rate(10)
while not rosy.is_shutdown():
carvel_pub.publish(self._carvel_msg)
rate.sleep()
I am using ROS Hydro with Ubuntu 12.04. I have two subscribers. I have already tried changing queue_size to None to see if it is a slowdown problem caused due to multiple subscribers.
Any help is appreciated. Thanks!