ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Didn't received robot state (joint angles) with recent timestamp within 1 seconds. Check clock synchronization if your are running ROS across multiple machines!

asked 2020-04-15 06:27:24 -0500

Hey, I hope you guys are doing well. I am working on a ROS project where I am trying to move my robotic arm to a home position(joint values are predetermined in this case). When I am running my python script, my robotic arm is moving to the desired home position successfully, but I am seeing a warning in my ROS console.

[ INFO] [1586947342.064273003,905.936000000]: Didn't received robot state (joint angles) with recent timestamp within 1 seconds. Check clock synchronization if your are running ROS across multiple machines! 
[ WARN] [1586947342.064360828,905.936000000]: Failed to fetch current robot state. 
[ INFO] [1586947342.064687344, 905.936000000]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline. 
[ INFO] [1586947342.065116645, 905.936000000]: Planning attempt 1 of at most 1 
[ INFO] [1586947342.068064258,905.937000000]: Planner configuration 'arm_manipulator' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed. 
[ INFO] [1586947342.069221542, 905.937000000]: RRTConnect: Starting planning with 1 states already in data structure 
[ INFO] [1586947342.082138411, 905.942000000]: RRTConnect: Created 5 states (2 start
    + 3 goal) [ INFO] [1586947342.082347014, 905.942000000]: Solution found in 0.013422 seconds 
[ INFO] [1586947342.110171622, 905.954000000]: SimpleSetup: Path simplification took 0.027412 seconds and changed from 4 to 2 states 
[ INFO] [1586947348.470083785, 909.862000000]: Completed trajectory execution with status SUCCEEDED ...
[ INFO] [1586947348.608754743, 909.958000000]: Received event 'stop'

My python script:

    class MoveGroupPythonInteface(object):
        def __init__(self):
            super(MoveGroupPythonInteface, self).__init__()

            joint_state_topic = ['joint_states:=/ow5/joint_states']
            moveit_commander.roscpp_initialize(joint_state_topic)
            rospy.init_node('move_group_interface', anonymous=True)

            group_name = "arm_manipulator"
            self.move_group = moveit_commander.MoveGroupCommander(group_name)


        def go_to_home_pose(self):
            # Planning to home position
            joint_goal = self.move_group.get_current_joint_values()
            joint_goal[0] = 1.95118
            joint_goal[1] = 1.11642
            joint_goal[2] = -1.41584
            joint_goal[3] = -0.21243
            joint_goal[4] = 3.13971

            self.move_group.go(joint_goal, wait=True)
            self.move_group.stop()

    def main():
        try:
            interface = MoveGroupPythonInteface()
            interface.go_to_home_pose()

        except rospy.ROSInterruptException:
            return

    if __name__=='__main__':
        main()

Parameters details on running my launch files:

console 1:

SUMMARY
========

PARAMETERS
 * /ow5/arm_manipulator_controller/action_monitor_rate: 30
 * /ow5/arm_manipulator_controller/allow_partial_joints_goal: True
 * /ow5/arm_manipulator_controller/constraints/goal_time: 0.6
 * /ow5/arm_manipulator_controller/constraints/j1/goal: 0
 * /ow5/arm_manipulator_controller/constraints/j1/trajectory: 0.1
 * /ow5/arm_manipulator_controller/constraints/j2/goal: 0
 * /ow5/arm_manipulator_controller/constraints/j2/trajectory: 0.1
 * /ow5/arm_manipulator_controller/constraints/j3/goal: 0
 * /ow5/arm_manipulator_controller/constraints/j3/trajectory: 0.1
 * /ow5/arm_manipulator_controller/constraints/j4/goal: 0
 * /ow5/arm_manipulator_controller/constraints/j4/trajectory: 0.1
 * /ow5/arm_manipulator_controller/constraints/j5/goal: 0
 * /ow5/arm_manipulator_controller/constraints/j5/trajectory: 0.1
 * /ow5/arm_manipulator_controller/constraints/stopped_velocity_tolerance: 0.05
 * /ow5/arm_manipulator_controller/joints: ['j1', 'j2', 'j3'...
 * /ow5/arm_manipulator_controller/state_publish_rate: 50
 * /ow5/arm_manipulator_controller/stop_trajectory_duration: 0.5
 * /ow5/arm_manipulator_controller/type: position_controll...
 * /ow5/gripper_manipulator_controller/constraints/goal_time: 3.0
 * /ow5/gripper_manipulator_controller/constraints/j6/goal: 0.02
 * /ow5/gripper_manipulator_controller/constraints/j7/goal: 0.02
 * /ow5/gripper_manipulator_controller/joints: ['j6', 'j7']
 * /ow5/gripper_manipulator_controller/type: position_controll...
 * /ow5/joint_state_controller/publish_rate: 50
 * /ow5/joint_state_controller/type: joint_state_contr...
 * /ow5/joint_state_publisher/use_gui: False
 * /ow5/robot_description: <?xml version="1....
 * /ow5/tf_prefix: ow5_tf
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /sensor_stick/joint_state_controller/publish_rate: 50
 * /sensor_stick/joint_state_controller ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-12-30 12:16:47 -0500

Mike Scheutzow gravatar image

In my experience, the most common cause of this error message is that moveit_commander is subscribing to an invalid joint_states topic. If this is the cause, the fix is to remap to the correct topic name when you launch your python script.

This would be much easier to debug if the error message was a more precise "No messages received from <topic>".

edit flag offensive delete link more
0

answered 2020-04-15 08:09:09 -0500

bob-ROS gravatar image

Try this to see if you have timing issues:

ntpdate -q other_computer_ip

See this page:

http://wiki.ros.org/ROS/NetworkSetup

edit flag offensive delete link more

Comments

I don't think this is the reason behind above warning, in my case. Though on running above command, I got:

server 127.0.0.1, stratum 0, offset 0.000000, delay 0.00000
16 Apr 10:39:23 ntpdate[18305]: no server suitable for synchronization found
Anubhav Singh gravatar image Anubhav Singh  ( 2020-04-16 00:11:42 -0500 )edit

I think you used the loopback ip, you do have 2 different machines right?

bob-ROS gravatar image bob-ROS  ( 2020-04-16 01:46:42 -0500 )edit

No, I am using ros locally right now.

Anubhav Singh gravatar image Anubhav Singh  ( 2020-04-16 01:47:37 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-15 06:27:24 -0500

Seen: 1,121 times

Last updated: Dec 30 '21