From 92d4b8e9340f7b4338603c9caa759380745306e6 Mon Sep 17 00:00:00 2001 From: gavanderhoorn Date: Thu, 15 Jan 2015 15:29:28 +0100 Subject: [PATCH] robot_simulator: set explicit queue size in Publishers. Fix #99. Queue size of 1 is most likely sufficient for these topics. --- industrial_robot_simulator/industrial_robot_simulator | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/industrial_robot_simulator/industrial_robot_simulator b/industrial_robot_simulator/industrial_robot_simulator index 39c1caad..362bd226 100755 --- a/industrial_robot_simulator/industrial_robot_simulator +++ b/industrial_robot_simulator/industrial_robot_simulator @@ -214,18 +214,18 @@ class IndustrialRobotSimulatorNode(): # retrieve update rate motion_update_rate = rospy.get_param('motion_update_rate', 100.); #set param to 0 to ignore interpolated motion - self.motion_ctrl = MotionControllerSimulator(num_joints, initial_joint_state, update_rate = motion_update_rate) + self.motion_ctrl = MotionControllerSimulator(num_joints, initial_joint_state, update_rate=motion_update_rate) # Published to joint states rospy.logdebug("Creating joint state publisher") - self.joint_state_pub = rospy.Publisher('joint_states', JointState) + self.joint_state_pub = rospy.Publisher('joint_states', JointState, queue_size=1) # Published to joint feedback rospy.logdebug("Creating joint feedback publisher") - self.joint_feedback_pub = rospy.Publisher('feedback_states', FollowJointTrajectoryFeedback) + self.joint_feedback_pub = rospy.Publisher('feedback_states', FollowJointTrajectoryFeedback, queue_size=1) rospy.logdebug("Creating robot status publisher") - self.robot_status_pub = rospy.Publisher('robot_status', RobotStatus) + self.robot_status_pub = rospy.Publisher('robot_status', RobotStatus, queue_size=1) # Subscribe to a joint trajectory rospy.logdebug("Creating joint trajectory subscriber")