qboticslabs / mastering_ros

This repository contains exercise files of the book "Mastering ROS for Robotics Programming"
https://www.packtpub.com/hardware-and-creative/mastering-ros-robotics-programming
468 stars 282 forks source link

Problem of connecting gazebo and moveit #30

Open tomato1986 opened 6 years ago

tomato1986 commented 6 years ago

Hi I have a trouble about the code in chapter 4(P138) When I tried to run the code that makes gazebo and moveit run at the sametime and pressed "execute" button in motionplanning, but the robot in gazebo did not work. Moreover, motionplanning in moveit showed "failed".

The error message in the terminal showed "[ WARN] [1510766932.987760476, 51.584000000]: Failed to validate trajectory: couldn't receive full current joint state within 1s " Then, I guess sending command from moveit to gazebo has something wrong, but I cannot understand what was the problem.

qboticslabs commented 6 years ago

@tomato1986

It will be great if you can create your own moveit config package, this kind of problem will solve when you create new, also don't forget to add control configuration. The steps to create moveit config is mentioned in the book itself

tomato1986 commented 6 years ago

Thank you for response. "the steps to create moveit config is mentioned in the book itself" you mean about from P 134 to P137,right? If so, I have checked the codes are the same as P134~P137... So I am confusing what is problem.

qboticslabs commented 6 years ago

@tomato1986 One of the reason is the collision between the links of the arm. If there is a collision between links, there will not be any motion plan, but if you create a new package, I think we can solve it to some extent. Some readers have the same issue and solved by creating a new package.

tomato1986 commented 6 years ago

When I tried to run the robot only on Moveit, motion planning on moveit worked well.(From P130 to P132) In that case, what is the problem for using moveit and gazebo simultaneously?