Kinovarobotics / kinova-ros

ROS packages for Jaco2 and Mico robotic arms
BSD 3-Clause "New" or "Revised" License
365 stars 317 forks source link

Manipulator does not move with Moveit (possible problem with move group) #367

Closed Betancourt20 closed 2 years ago

Betancourt20 commented 2 years ago

Description

Simulation problem between Gazebo and Moveit When I launch the command provided by the readme, the program crashs, unless I add a line in the launch file as I'll explain above. So I look for the old version command (Melodic) and I realized that it works but the manipulator does not move when using Moveit and Rviz but in Rviz everthing seems good.

Version

ROS distribution : Ros Noetic and Ubunutu 20.04

Steps developed

I launch the virtual manipulator

$ roslaunch kinova_gazebo robot_launch.launch kinova_robotType:=j2n6s300 

Then I launch Moveit and Rviz

$ roslaunch j2n6s300_moveit_config j2n6s300_gazebo_demo.launch

Then I get the following error

RLException: unused args [controller_manager] for include of [/home/unknown/naomi_ws/src/kinova-ros/kinova_moveit/robot_configs/j2n6s300_moveit_config/launch/move_group_j2n6s300.launch]
The traceback for the exception was written to the log file

So I tried to look at the old version (melodic) and for sure there is many things that changed. But I added the following line in the file move_group_j2n6s300.launch just before to include the .xml (line 30)

 <arg name="controller_manager"/>

Than worked but gave many other problems as

[ INFO] [1638009102.293196389, 60.176000000]: waitForService: Service [/get_planning_scene] has not been advertised, waiting...
[ WARN] [1638009107.022277264, 62.655000000]: Waiting for j2n6s300/follow_joint_trajectory to come up
[ INFO] [1638009107.297301524, 62.801000000]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()?
[ INFO] [1638009107.297480926, 62.801000000]: Constructing new MoveGroup connection for group 'arm' in namespace ''
[ WARN] [1638009117.728839243, 68.655000000]: Waiting for j2n6s300/follow_joint_trajectory to come up
[ERROR] [1638009128.022738399, 74.655000000]: Action client not connected: j2n6s300/follow_joint_trajectory
[ WARN] [1638009137.310864211, 79.678000000]: Waiting for j2n6s300_gripper/gripper_command to come up
[ERROR] [1638009137.330358907, 79.684000000]: Unable to connect to move_group action server 'move_group' within allotted time (30s)
[ WARN] [1638009148.073755759, 85.678000000]: Waiting for j2n6s300_gripper/gripper_command to come up

Then I decided to use the old command (for sure not including the above added line, I deleted as in the newest version)

$ roslaunch j2n6s300_moveit_config j2n6s300_virtual_robot_demo.launch 

and it launched with almost any probem because that gaves some warnings and in addition the robot in gazebo is not moving

[ INFO] [1638009682.794385428, 37.727000000]: Fake execution of trajectory
[ INFO] [1638009688.974405598, 40.726000000]: Completed trajectory execution with status SUCCEEDED ...
[ WARN] [1638009689.989113081, 41.227000000]: Maybe failed to update robot state, time diff: 0.005s

Besides I looked in the rqt_graph and seems that is not any connection with Moveit and the trajectory tracking

Screenshot from 2021-11-27 10-47-16

I have been struggling with this issue, do you have any clue please? Thanks in advance

Julio

felixmaisonneuve commented 2 years ago

Hi @Betancourt20,

I created #368 that will fix the issue.

When moving to ROS Noetic, I did some cleanup in the launch to avoid some duplications that prevented to use Gazebo + MoveIt.

This should be merged soon, but you can modify your launch files manually if you want to test it.

Thank you for pointing this out.

Best, Felix

Betancourt20 commented 2 years ago

Hi @Betancourt20,

I created #368 that will fix the issue.

When moving to ROS Noetic, I did some cleanup in the launch to avoid some duplications that prevented to use Gazebo + MoveIt.

This should be merged soon, but you can modify your launch files manually if you want to test it.

Thank you for pointing this out.

Best, Felix

Thank you so much for your answer. I already tested the #368 solution as you proposed and everything works well. I'll close the issue as the problem was solved.

Best regards, Julio