Thanks a lot!
Hi Manuel.....Maybe this post will help you: http://answers.ros.org/question/2151/how-do-i-publish-exactly-one-messageBenoitFrom: Manuel RodríguezSent: Friday, October 21, 2011 10:35 AMTo: User discussionsSubject: [ros-users] Problems publishing topicsHi all,I'm trying to publishing to a topic but I have an absurd problem:When I use this:it does not publish absolutly nothing.self.pub = rospy.Publisher('arm_controller/command', JointTrajectory)msg = JointTrajectory()self.pub.publish(msg)But, if I use the pub.publish inside an infinite loop, it works:self.pub = rospy.Publisher('arm_controller/command', JointTrajectory)msg = JointTrajectory()while True:self.pub.publish(msg)I can publish with -rostopic pub- without problems, so it's a code problem? What I should change?Best regardsmanuel
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users