IFRA-Cranfield / ros2_RobotSimulation

ROS2.0 Foxy and Humble repositories which provide ready-to-use ROS2.0 Gazebo + MoveIt!2 simulation packages for different Industrial and Collaborative Robots.
Apache License 2.0
168 stars 46 forks source link

Having problems with humble no plan execution #4

Closed FrGe2016 closed 1 year ago

FrGe2016 commented 1 year ago

Hi

I have installed the pakages using the various humble branches for all of them.

Unfortunately after the plan has been made nothing is happening when i try to execute. I have the following messages. with ros2 launch panda_ros2_moveit2 original.panda.launch.py

[move_group-11] [INFO] [1676858740.016299549] [moveit_move_group_default_capabilities.move_action_capability]: Motion plan was computed successfully. [rviz2-12] [INFO] [1676858740.016713319] [move_group_interface]: Planning request complete! [rviz2-12] [INFO] [1676858740.052927755] [move_group_interface]: time taken to generate plan: 0.0168374 seconds [move_group-11] [INFO] [1676858742.558244929] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Received goal request [move_group-11] [INFO] [1676858742.558383129] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Execution request received [move_group-11] [INFO] [1676858742.558423099] [moveit.plugins.moveit_simple_controller_manager]: Returned 3 controllers in list [move_group-11] [INFO] [1676858742.558447790] [moveit.plugins.moveit_simple_controller_manager]: Returned 3 controllers in list [move_group-11] [INFO] [1676858742.558531070] [moveit_ros.trajectory_execution_manager]: Validating trajectory with allowed_start_tolerance 0.01 [rviz2-12] [INFO] [1676858742.558380164] [move_group_interface]: Execute request accepted [move_group-11] [INFO] [1676858743.558678868] [moveit_ros.current_state_monitor]: Didn't received robot state (joint angles) with recent timestamp within 1.000000 seconds. [move_group-11] Check clock synchronization if your are running ROS across multiple machines! [move_group-11] [WARN] [1676858743.558720377] [moveit_ros.trajectory_execution_manager]: Failed to validate trajectory: couldn't receive full current joint state within 1s [move_group-11] [INFO] [1676858743.558759820] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Execution completed: ABORTED [rviz2-12] [INFO] [1676858743.559199775] [move_group_interface]: Execute request aborted [rviz2-12] [ERROR] [1676858743.659235852] [move_group_interface]: MoveGroupInterface::execute() failed or timeout reached

I have made the changes proposed in that post https://github.com/ros-planning/moveit2/issues/1480 but the i get a new problem [rviz2-12] [INFO] [1676859524.497266606] [move_group_interface]: Planning request accepted

[move_group-11] [WARN] [1676859525.598361714] [moveit_ros.current_state_monitor]: No state update received within 100ms of system clock [move_group-11] [WARN] [1676859526.599494855] [moveit_ros.current_state_monitor]: No state update received within 100ms of system clock

with every possible launch that i have tried ros2 launch panda_ros2_moveit2 panda.launch.py ros2 launch panda_ros2_moveit2 modified.panda.launch.py or simply ros2 launch panda_ros2_gazebo panda.launch.py

I never have/ joint_states published when i am tryng to echo them ros2 topic echo /joint_states

MikelBueno commented 1 year ago

Hi @FrGe2016,

Unfortunately, this ros2_RobotSimulation repository works with ROS2 Foxy, and not for ROS2 Humble (the ros2_control and ros2_controllers of both versions are different, and that is the main reason why it won't work).

As an example of components that change from one version to the other, ROS2 Humble Gazebo + MoveIt!2 simulations require the {use_sim_time:= True} parameter to be assigned, and the joint_state_publisher in Foxy is converted to joint_state_broadcaster in Humble.

However, I am planning to upload the ROS2 Humble packages soon.

Best regards, Mikel

FrGe2016 commented 1 year ago

Thanks for the reply. I lost many hours trying to make many exemples found on the internet work with humble + gazebo + moveit2. Please let me know when your new package will be uploaded. By then, i will work on other parts of my custom made robot.

Regards Francois

Le mar. 28 févr. 2023, à 04 h 29, Mikel Bueno Viso @.***> a écrit :

Hi @FrGe2016 https://github.com/FrGe2016,

Unfortunately, this ros2_RobotSimulation repository works with ROS2 Foxy, and not for ROS2 Humble (the ros2_control and ros2_controllers of both versions are different, and that is the main reason why it won't work).

As an example of components that change from one version to the other, ROS2 Humble Gazebo + MoveIt!2 simulations require the {use_sim_time:= True} parameter to be assigned, and the joint_state_publisher in Foxy is converted to joint_state_broadcaster in Humble.

However, I am planning to upload the ROS2 Humble packages soon.

Best regards, Mikel

— Reply to this email directly, view it on GitHub https://github.com/IFRA-Cranfield/ros2_RobotSimulation/issues/4#issuecomment-1447848880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEARAMJVNOIJUCYQCLQBV73WZXAOXANCNFSM6AAAAAAVBKLWTQ . You are receiving this because you were mentioned.Message ID: @.***>

bi3ri commented 1 year ago

@MikelBueno Thanks for your work and effort! An example with moveit2 and gazebo would also help me a lot!

Can you tell me why you chose Gazebo over the new Ignition simulation package?

FrGe2016 commented 1 year ago

I have always worked with gazebo classic ( gazebo 11 actualy) and most of the ROS2 tutorial use gazebo .

I dont remember how i finished with the gazebo version that i have. I explain. I upgrades from Ubuntu 22 to Ubuntu 20 I first installed and verified a few personal very specific ROS 1 packages in a Neotic Docker. I then had to remove all previous visions of ROS1 and ROS2. I never namely removed gazebo in the process. ( but i could have been done somehow) I then installed ROS2 humble desktop from apt.

It took me quite a while to convince my self to switch ROS2 with a significant learning curve. I have been waiting for enough packges and tutorials to be available and bug free.

I just learned that a new gazebo existed quit recently. To tell the truth, I did not came in my mind to change to the new gazebo "garden". Is there any recommendation in this way. What is the futur of gazebo classic ? ( any phase out planned ? ) What is the impact of the transition to the new version

Le ven. 3 mars 2023, à 04 h 30, Johannes Biermann @.***> a écrit :

@MikelBueno https://github.com/MikelBueno Thanks for your work and effort! An example with moveit2 and gazebo would also help me a lot!

Can you tell me why you chose Gazebo over the new Ignition simulation package?

— Reply to this email directly, view it on GitHub https://github.com/IFRA-Cranfield/ros2_RobotSimulation/issues/4#issuecomment-1453230577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEARAMMCBUQBQ54J7UJTIKLW2G22DANCNFSM6AAAAAAVBKLWTQ . You are receiving this because you were mentioned.Message ID: @.***>

MikelBueno commented 1 year ago

Hi both (@FrGe2016, @bi3ri),

Thanks for your comments :).

First of all, I am happy to share that I have just uploaded the ROS2 Humble repository for ros2_RobotSimulation. @FrGe2016 I would really appreciate it if you could test some of the packages and confirm they are working on your PC (I have uploaded the simplest set-up instructions to the README.md file as well). That would help me a lot to find some bugs in the code or documentation.

With regard to your question @bi3ri, I come from ROS1 and I have always used Gazebo, and that is the main reason why I still work with it. When something works, that's a good reason to continue using it :). But yes, you're right, it seems that Ignition will replace Gazebo in the future, therefore I might start testing some stuff with it (I still feel there is a lack of ROS2-Ignition documentation)... But for the moment, I will stick to Gazebo for ros2_RobotSimulation.

Best regards, Mikel

qboticslabs commented 1 year ago

@FrGe2016 You can also check the solution mentioned in the link. This worked for me.

FrGe2016 commented 1 year ago

Hi Mikel

I will try the package (starting today but not necessarily ending)

I will simply document the problems that apear ( not trying to solve them unless a solution is obvious and do not involve C++programming)

First the package build ros2_action fails ( i open a separate issue for this item)

FrGe2016 commented 1 year ago

Very interesting results of my first tests ( i will need the ros2_action to go further )

ros2 launch cr35ia_ros2_moveit2 cr35ia.launch.py

RVIZ start  ok
    Gazebo start    ok

    MoveIT2 move from the joint tab ok (simple rotation of joint_1 to -45 degres)   OK
    Planning ok
    Execution fails ( the gazebo model gets unstable and is destroyed)

    [move_group-9] [INFO] [1677936736.738234503] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Goal request accepted!
[gzserver-1] [WARN] [1677936738.225529876] [cr35ia_controller]: Aborted due to state tolerance violation
[move_group-9] [WARN] [1677936738.238852159] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Controller 'cr35ia_controller' 
failed with error   PATH_TOLERANCE_VIOLATED: 
[move_group-9] [WARN] [1677936738.238926861] [moveit_ros.trajectory_execution_manager]: Controller handle cr35ia_controller reports status ABORTED
[move_group-9] [INFO] [1677936738.238945860] [moveit_ros.trajectory_execution_manager]: Completed trajectory execution with status ABORTED ...
[move_group-9] [INFO] [1677936738.239010121] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Execution completed: ABORTED
[rviz2-8] [INFO] [1677936738.239329369] [move_group_interface]: Execute request aborted
[rviz2-8] [ERROR] [1677936738.337824938] [move_group_interface]: MoveGroupInterface::execute() failed or timeout reached

Same result with velocity and acceleration scalling down from 0.7 to 0.1

ros2 launch panda_ros2_moveit2 panda.launch.py

First I strugle to make the choice entry Proposed improvement to panda.launch.py ( this comment apply to all the other robots with options )    
    print("     + Option 1: PANDA ROBOT alone.")
    print("     + Option 2: PANDA ROBOT on top of a pedestal.")
    cell_layout = input ("  Please select an option number: ")

    Worked perfectly for many random valid Goal states with pan and execute

ros2 launch irb1200_ros2_moveit2 irb1200.launch.py ok for the execution ros2 launch irb120_ros2_moveit2 irb120.launch.py ok for the execution Same comment as Panda.launch for the option selection ros2 launch irb6640_ros2_moveit2 irb6640.launch.py the gazebo model is having vibrations a joint fell in the floor ? ros2 launch iiwa_ros2_moveit2 iiwa.launch.py Model Not finished yet ros2 launch ur3_ros2_moveit2 ur3.launch.py Model Not finished yet ros2 launch ur5_ros2_moveit2 ur5.launch.py Model Not finished yet ros2 launch ur10_ros2_moveit2 ur5.launch.py Model Not finished yet but more advanced ( Vibration in the gazebo model)

ghost commented 1 year ago

Hello, @MikelBueno, Sorry for interruption. I also got stuck on ROS 2 Humble with issue #11 . Could you confirm it and what's the problem on it? Thanks.

FrGe2016 commented 1 year ago

Fixed!

Le ven. 9 juin 2023, à 16 h 11, Sungsoo Park @.***> a écrit :

Hello, @MikelBueno https://github.com/MikelBueno, Sorry for interruption. I also got stuck on ROS 2 Humble with issue #11 https://github.com/IFRA-Cranfield/ros2_RobotSimulation/issues/11 . Could you confirm it and what's the problem on it? Thanks.

— Reply to this email directly, view it on GitHub https://github.com/IFRA-Cranfield/ros2_RobotSimulation/issues/4#issuecomment-1585077861, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEARAMOBR4Z3HTIGFUEHRJTXKN7OZANCNFSM6AAAAAAVBKLWTQ . You are receiving this because you were mentioned.Message ID: @.***>