doosan-robotics / doosan-robot

ROS for Doosan Robot
BSD 3-Clause "New" or "Revised" License
118 stars 59 forks source link

Moveit Python Interface Error - Didn't receive robot state (joint angles) with recent timestamp within 1 seconds. Check clock synchronization if your are running ROS across multiple machines! #170

Open ron007d opened 9 months ago

ron007d commented 9 months ago

I am using Gazebo simulation with the virtual mode

'roslaunch code`

roslaunch dsr_launcher dsr_moveit_gazebo.launch

After that python code is written

import rospy
import moveit_commander

rospy.init_node('python_moveit_interface_connection',anonymous=True)

robots = moveit_commander.RobotCommander(robot_description='/dsr01m1013/robot_description')

robots.get_group_names()
robot1 = moveit_commander.MoveGroupCommander('arm',robot_description='/dsr01m1013/robot_description',ns='/dsr01m1013')
robot1.get_current_pose()
[ INFO] [1695990254.119720196]: Loading robot model 'm1013'...
[ INFO] [1695990254.120230143]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ WARN] [1695990254.120272464]: Link base_0 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1695990254.120322118]: Link link3 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1695990254.120356268]: Link link6 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1695990254.129133901]: Kinematics solver doesn't support #attempts anymore, but only a timeout.
Please remove the parameter '/dsr01m1013/robot_description_kinematics/arm/kinematics_solver_attempts' from your configuration.

[ INFO] [1695990551.597761890, 317.863000000]: Didn't receive robot state (joint angles) with recent timestamp within 1 seconds.
Check clock synchronization if your are running ROS across multiple machines!
[ERROR] [1695990551.597858271, 317.863000000]: Failed to fetch current robot state

This fetch error

working method

ROS_NAMESPACE=/dsr01m1013 rosrun moveit_commander moveit_commander_cmdline.py robot_description:=/dsr01m1013/robot_description```

- ### Follow this commands
```bash
> use arm
> current
arm> current 
joints = [1.9999628722485343, 8.923588160408767e-05, -2.6135669480938544e-05, 9.106487055072358e-05, -1.547077114987636e-05, -3.382884072605187e-05]

link6 pose = [
header: 
  seq: 0
  stamp: 
    secs: 361
    nsecs: 416000000
  frame_id: "world"
pose: 
  position: 
    x: -0.03170976396135232
    y: -0.014252449153109867
    z: 1.4524999468560233
  orientation: 
    x: -0.00010572144141166976
    y: 6.790604595792981e-05
    z: 0.8414213705154562
    w: 0.5403795531398625 ]
link6 RPY = [1.5785977911237273e-08, 0.0002513026404363024, 1.9998163838914356]

Working

  1. Moveit python interface can give go() command
  2. plan() command not working
  3. `get_current_pose() not working
  4. get_current_joint_values not working

image

ron007d commented 9 months ago

Current fix