Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTC Task Execution Failure - Moveit2 Pick n Place MTC demo #881

Open
trentatsa opened this issue Mar 9, 2024 · 9 comments
Open

MTC Task Execution Failure - Moveit2 Pick n Place MTC demo #881

trentatsa opened this issue Mar 9, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@trentatsa
Copy link

Description

When running the moveit2_tutorials pick and place demo, the plan succeeds however the execution fails. The reason behind this is detection of collision 'object' and 'panda_leftfinger' duing the " approach object" trajectory execution. The reason behind this is that after the gripper opens in the demo, its seems like the trajectory execution does not use the latest planning scene i.e. it uses the planning scene when the gripper is still closed on startup. If I set the initail postion of the gripper to be open the demo pick and place runs successfully i.e. during the "approach object" and "retreat after place" the panda_leftfinger and panda_rightfinger are in the open position as seen by the trajectory execution. Im suspicious that it may be something to do with the ExecuteTaskSolutionCapability of move_group.

Your environment

  • ROS Distro: Iron
  • OS Version: Ubuntu 22.04

Steps to reproduce

add allow_nonzero_velocity_at_trajectory_end: true to the ros_controllers.yaml of moveit_resources_panda_moveit_config so that it as below. This is done otherwise you get the error:

panda_arm_controller:
  ros__parameters:
    allow_nonzero_velocity_at_trajectory_end: true
    command_interfaces:
      - position
    state_interfaces:
      - position
      - velocity
    joints:
      - panda_joint1
      - panda_joint2
      - panda_joint3
      - panda_joint4
      - panda_joint5
      - panda_joint6
      - panda_joint7

panda_hand_controller:
  ros__parameters:
    joint: panda_finger_joint1

This is done otherwise you get the following error in control:

[ros2_control_node-5] [ERROR] [1710009229.370527846] [panda_arm_controller]: Velocity of last trajectory point of joint panda_joint1 is not zero: 0.002099733316440
[move_group-4] [INFO] [1710009229.370758219] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: panda_arm_controller started execution
[move_group-4] [WARN] [1710009229.370770581] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Goal request rejected
[move_group-4] [ERROR] [1710009229.370775217] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Goal was rejected by server
[move_group-4] [ERROR] [1710009229.370808155] [move_group.moveit.trajectory_execution_manager]: Failed to send trajectory part 1 of 1 to controller panda_arm_controller
[move_group-4] [INFO] [1710009229.370833203] [move_group.moveit.trajectory_execution_manager]: Completed trajectory execution with status ABORTED ...

Run the following:
ros2 launch moveit2_tutorials mtc_demo.launch.py

and then run:
ros2 launch moveit2_tutorials pick_place_demo.launch.py

Execute any of the solutions:
Screenshot from 2024-03-09 19-20-50

Expected behaviour

The robot should execute the pick and place :)

Actual behaviour

The task execution fails on " approach object" task component due to collision detection.

Screenshot from 2024-03-09 19-26-28

Backtrace or Console output

[INFO] [launch]: All log files can be found below /home/trentpc/.ros/log/2024-03-09-19-25-56-756523-trentpc-199233
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rviz2-1]: process started with pid [199236]
[INFO] [static_transform_publisher-2]: process started with pid [199238]
[INFO] [robot_state_publisher-3]: process started with pid [199240]
[INFO] [move_group-4]: process started with pid [199242]
[INFO] [ros2_control_node-5]: process started with pid [199246]
[INFO] [ros2 run controller_manager spawner panda_arm_controller-6]: process started with pid [199268]
[INFO] [ros2 run controller_manager spawner panda_hand_controller-7]: process started with pid [199273]
[INFO] [ros2 run controller_manager spawner joint_state_broadcaster-8]: process started with pid [199275]
[static_transform_publisher-2] [INFO] [1710008757.252886439] [static_transform_publisher]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.000000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'world' to 'panda_link0'
[robot_state_publisher-3] [WARN] [1710008757.250215201] [kdl_parser]: The root link panda_link0 has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[robot_state_publisher-3] [INFO] [1710008757.250308943] [robot_state_publisher]: got segment panda_hand
[robot_state_publisher-3] [INFO] [1710008757.250364474] [robot_state_publisher]: got segment panda_leftfinger
[robot_state_publisher-3] [INFO] [1710008757.250371879] [robot_state_publisher]: got segment panda_link0
[robot_state_publisher-3] [INFO] [1710008757.250377022] [robot_state_publisher]: got segment panda_link1
[robot_state_publisher-3] [INFO] [1710008757.250381779] [robot_state_publisher]: got segment panda_link2
[robot_state_publisher-3] [INFO] [1710008757.250386506] [robot_state_publisher]: got segment panda_link3
[robot_state_publisher-3] [INFO] [1710008757.250391116] [robot_state_publisher]: got segment panda_link4
[robot_state_publisher-3] [INFO] [1710008757.250395653] [robot_state_publisher]: got segment panda_link5
[robot_state_publisher-3] [INFO] [1710008757.250400424] [robot_state_publisher]: got segment panda_link6
[robot_state_publisher-3] [INFO] [1710008757.250405100] [robot_state_publisher]: got segment panda_link7
[robot_state_publisher-3] [INFO] [1710008757.250410145] [robot_state_publisher]: got segment panda_link8
[robot_state_publisher-3] [INFO] [1710008757.250414968] [robot_state_publisher]: got segment panda_rightfinger
[ros2_control_node-5] [INFO] [1710008757.462211495] [controller_manager]: Subscribing to '/robot_description' topic for robot description.
[ros2_control_node-5] [INFO] [1710008757.462679861] [controller_manager]: update rate is 100 Hz
[ros2_control_node-5] [INFO] [1710008757.470028323] [controller_manager]: RT kernel is recommended for better performance
[ros2_control_node-5] [INFO] [1710008757.471951952] [controller_manager]: Received robot description from topic.
[ros2_control_node-5] [INFO] [1710008757.472221100] [resource_manager]: Loading hardware 'PandaFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473400064] [resource_manager]: Initialize hardware 'PandaFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473459708] [resource_manager]: Successful initialization of hardware 'PandaFakeSystem'
[ros2_control_node-5] [INFO] [1710008757.473480220] [resource_manager]: Loading hardware 'PandaHandFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473489249] [resource_manager]: Initialize hardware 'PandaHandFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473500852] [resource_manager]: Successful initialization of hardware 'PandaHandFakeSystem'
[ros2_control_node-5] [INFO] [1710008757.473535573] [resource_manager]: 'configure' hardware 'PandaHandFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473541623] [resource_manager]: Successful 'configure' of hardware 'PandaHandFakeSystem'
[ros2_control_node-5] [INFO] [1710008757.473546849] [resource_manager]: 'activate' hardware 'PandaHandFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473550998] [resource_manager]: Successful 'activate' of hardware 'PandaHandFakeSystem'
[ros2_control_node-5] [INFO] [1710008757.473555236] [resource_manager]: 'configure' hardware 'PandaFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473560001] [resource_manager]: Successful 'configure' of hardware 'PandaFakeSystem'
[ros2_control_node-5] [INFO] [1710008757.473565607] [resource_manager]: 'activate' hardware 'PandaFakeSystem' 
[ros2_control_node-5] [INFO] [1710008757.473569612] [resource_manager]: Successful 'activate' of hardware 'PandaFakeSystem'
[move_group-4] [INFO] [1710008757.500575226] [move_group.moveit.RDFLoader]: Loaded robot model in 0.0108574 seconds
[move_group-4] [INFO] [1710008757.500713543] [move_group.moveit.robot_model]: Loading robot model 'panda'...
[move_group-4] [WARN] [1710008757.530305149] [kdl_parser]: The root link panda_link0 has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[move_group-4] [INFO] [1710008757.530429111] [move_group.moveit.kdl_kinematics_plugin]: Joint weights for group 'panda_arm': 1 1 1 1 1 1 1
[move_group-4] [INFO] [1710008757.688096997] [move_group.moveit.planning_scene_monitor]: Publishing maintained planning scene on 'monitored_planning_scene'
[move_group-4] [INFO] [1710008757.688279952] [move_group.moveit.moveit_cpp]: Listening to 'joint_states' for joint states
[move_group-4] [INFO] [1710008757.697785528] [move_group.moveit.current_state_monitor]: Listening to joint states on topic 'joint_states'
[move_group-4] [INFO] [1710008757.702087787] [move_group.moveit.planning_scene_monitor]: Listening to '/attached_collision_object' for attached collision objects
[move_group-4] [INFO] [1710008757.702132623] [move_group.moveit.planning_scene_monitor]: Stopping existing planning scene publisher.
[move_group-4] [INFO] [1710008757.703089579] [move_group.moveit.planning_scene_monitor]: Stopped publishing maintained planning scene.
[move_group-4] [INFO] [1710008757.706346681] [move_group.moveit.planning_scene_monitor]: Publishing maintained planning scene on 'monitored_planning_scene'
[move_group-4] [INFO] [1710008757.706451771] [move_group.moveit.planning_scene_monitor]: Starting planning scene monitor
[move_group-4] [INFO] [1710008757.715763117] [move_group.moveit.planning_scene_monitor]: Listening to '/planning_scene'
[move_group-4] [INFO] [1710008757.715805256] [move_group.moveit.planning_scene_monitor]: Starting world geometry update monitor for collision objects, attached objects, octomap updates.
[move_group-4] [INFO] [1710008757.717144570] [move_group.moveit.planning_scene_monitor]: Listening to 'collision_object'
[move_group-4] [INFO] [1710008757.718616444] [move_group.moveit.planning_scene_monitor]: Listening to 'planning_scene_world' for planning scene world geometry
[move_group-4] [WARN] [1710008757.720390279] [move_group.moveit.occupancy_map_monitor]: Resolution not specified for Octomap. Assuming resolution = 0.1 instead
[move_group-4] [ERROR] [1710008757.720438421] [move_group.moveit.occupancy_map_monitor]: No 3D sensor plugin(s) defined for octomap updates
[move_group-4] [INFO] [1710008757.804440392] [move_group.moveit.planning_pipeline]: Successfully loaded planner 'OMPL'
[move_group-4] [INFO] [1710008757.823571572] [move_group]: Try loading adapter 'default_planning_request_adapters/ResolveConstraintFrames'
[move_group-4] [INFO] [1710008757.825063944] [move_group]: Loaded adapter 'default_planning_request_adapters/ResolveConstraintFrames'
[move_group-4] [INFO] [1710008757.825106920] [move_group]: Try loading adapter 'default_planning_request_adapters/ValidateWorkspaceBounds'
[move_group-4] [INFO] [1710008757.825470171] [move_group]: Loaded adapter 'default_planning_request_adapters/ValidateWorkspaceBounds'
[move_group-4] [INFO] [1710008757.825489617] [move_group]: Try loading adapter 'default_planning_request_adapters/CheckStartStateBounds'
[move_group-4] [INFO] [1710008757.825518260] [move_group]: Loaded adapter 'default_planning_request_adapters/CheckStartStateBounds'
[move_group-4] [INFO] [1710008757.825526844] [move_group]: Try loading adapter 'default_planning_request_adapters/CheckStartStateCollision'
[move_group-4] [INFO] [1710008757.825539783] [move_group]: Loaded adapter 'default_planning_request_adapters/CheckStartStateCollision'
[move_group-4] [INFO] [1710008757.843059813] [move_group]: Try loading adapter 'default_planning_response_adapters/AddTimeOptimalParameterization'
[move_group-4] [INFO] [1710008757.850008533] [move_group]: Loaded adapter 'default_planning_response_adapters/AddTimeOptimalParameterization'
[move_group-4] [INFO] [1710008757.850044567] [move_group]: Try loading adapter 'default_planning_response_adapters/ValidateSolution'
[move_group-4] [INFO] [1710008757.853300935] [move_group]: Loaded adapter 'default_planning_response_adapters/ValidateSolution'
[move_group-4] [INFO] [1710008757.853337456] [move_group]: Try loading adapter 'default_planning_response_adapters/DisplayMotionPath'
[move_group-4] [INFO] [1710008757.854549409] [move_group]: Loaded adapter 'default_planning_response_adapters/DisplayMotionPath'
[move_group-4] [INFO] [1710008757.866624940] [move_group.moveit.planning_pipeline]: Successfully loaded planner 'CHOMP'
[move_group-4] [INFO] [1710008757.872843129] [move_group]: Try loading adapter 'default_planning_request_adapters/ResolveConstraintFrames'
[move_group-4] [INFO] [1710008757.873555948] [move_group]: Loaded adapter 'default_planning_request_adapters/ResolveConstraintFrames'
[move_group-4] [INFO] [1710008757.873586269] [move_group]: Try loading adapter 'default_planning_request_adapters/ValidateWorkspaceBounds'
[move_group-4] [INFO] [1710008757.874208867] [move_group]: Loaded adapter 'default_planning_request_adapters/ValidateWorkspaceBounds'
[move_group-4] [INFO] [1710008757.874230422] [move_group]: Try loading adapter 'default_planning_request_adapters/CheckStartStateBounds'
[move_group-4] [INFO] [1710008757.874258039] [move_group]: Loaded adapter 'default_planning_request_adapters/CheckStartStateBounds'
[move_group-4] [INFO] [1710008757.874265595] [move_group]: Try loading adapter 'default_planning_request_adapters/CheckStartStateCollision'
[move_group-4] [INFO] [1710008757.874279928] [move_group]: Loaded adapter 'default_planning_request_adapters/CheckStartStateCollision'
[move_group-4] [INFO] [1710008757.880347402] [move_group]: Try loading adapter 'default_planning_response_adapters/AddTimeOptimalParameterization'
[move_group-4] [INFO] [1710008757.882219497] [move_group]: Loaded adapter 'default_planning_response_adapters/AddTimeOptimalParameterization'
[move_group-4] [INFO] [1710008757.891658664] [move_group.moveit.pilz_joint_limits_aggregator]: Reading limits from namespace robot_description_planning
[move_group-4] [WARN] [1710008757.895994224] [move_group.moveit.pilz_joint_limits_aggregator]: Multi-DOF-Joint 'virtual_joint' not supported.
[move_group-4] [WARN] [1710008757.896048641] [move_group.moveit.pilz_joint_limits_aggregator]: Multi-DOF-Joint 'virtual_joint' not supported.
[move_group-4] [INFO] [1710008757.918900995] [move_group.moveit.pilz_industrial_motion_planner]: Available plugins: pilz_industrial_motion_planner/PlanningContextLoaderCIRC pilz_industrial_motion_planner/PlanningContextLoaderLIN pilz_industrial_motion_planner/PlanningContextLoaderPTP 
[move_group-4] [INFO] [1710008757.918950241] [move_group.moveit.pilz_industrial_motion_planner]: About to load: pilz_industrial_motion_planner/PlanningContextLoaderCIRC
[move_group-4] [INFO] [1710008757.921088840] [move_group.moveit.pilz_industrial_motion_planner]: Registered Algorithm [CIRC]
[move_group-4] [INFO] [1710008757.921138913] [move_group.moveit.pilz_industrial_motion_planner]: About to load: pilz_industrial_motion_planner/PlanningContextLoaderLIN
[move_group-4] [INFO] [1710008757.922576675] [move_group.moveit.pilz_industrial_motion_planner]: Registered Algorithm [LIN]
[move_group-4] [INFO] [1710008757.922630352] [move_group.moveit.pilz_industrial_motion_planner]: About to load: pilz_industrial_motion_planner/PlanningContextLoaderPTP
[move_group-4] [INFO] [1710008757.924087869] [move_group.moveit.pilz_industrial_motion_planner]: Registered Algorithm [PTP]
[move_group-4] [INFO] [1710008757.927036991] [move_group.moveit.planning_pipeline]: Successfully loaded planner 'Pilz Industrial Motion Planner'
[move_group-4] [INFO] [1710008757.934522049] [move_group]: Try loading adapter 'default_planning_request_adapters/ValidateWorkspaceBounds'
[move_group-4] [INFO] [1710008757.935685758] [move_group]: Loaded adapter 'default_planning_request_adapters/ValidateWorkspaceBounds'
[move_group-4] [INFO] [1710008757.935711082] [move_group]: Try loading adapter 'default_planning_request_adapters/CheckStartStateBounds'
[move_group-4] [INFO] [1710008757.935742100] [move_group]: Loaded adapter 'default_planning_request_adapters/CheckStartStateBounds'
[move_group-4] [INFO] [1710008757.935750283] [move_group]: Try loading adapter 'default_planning_request_adapters/CheckStartStateCollision'
[move_group-4] [INFO] [1710008757.935765083] [move_group]: Loaded adapter 'default_planning_request_adapters/CheckStartStateCollision'
[move_group-4] [WARN] [1710008757.935772913] [move_group.moveit.planning_pipeline]: No planning response adapter names specified.
[move_group-4] [INFO] [1710008758.080914562] [move_group.moveit.moveit_simple_controller_manager]: Added FollowJointTrajectory controller for panda_arm_controller
[move_group-4] [INFO] [1710008758.081001314] [move_group.moveit.moveit_simple_controller_manager]: Max effort set to 0.0
[move_group-4] [INFO] [1710008758.086797353] [move_group.moveit.moveit_simple_controller_manager]: Added GripperCommand controller for panda_hand_controller
[move_group-4] [INFO] [1710008758.086966967] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008758.087014063] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008758.088684576] [move_group.moveit.trajectory_execution_manager]: Trajectory execution is managing controllers
[move_group-4] [INFO] [1710008758.088723261] [move_group]: MoveGroup debug mode is ON
[move_group-4] [INFO] [1710008758.156341855] [move_group.moveit.pilz_move_group_sequence_action]: initialize move group sequence action
[move_group-4] [INFO] [1710008758.164154683] [move_group.moveit.pilz_joint_limits_aggregator]: Reading limits from namespace robot_description_planning
[move_group-4] [WARN] [1710008758.164751331] [move_group.moveit.pilz_joint_limits_aggregator]: Multi-DOF-Joint 'virtual_joint' not supported.
[move_group-4] [WARN] [1710008758.165164563] [move_group.moveit.pilz_joint_limits_aggregator]: Multi-DOF-Joint 'virtual_joint' not supported.
[move_group-4] [INFO] [1710008758.165807774] [move_group.moveit.pilz_joint_limits_aggregator]: Reading limits from namespace robot_description_planning
[move_group-4] [WARN] [1710008758.166212168] [move_group.moveit.pilz_joint_limits_aggregator]: Multi-DOF-Joint 'virtual_joint' not supported.
[move_group-4] [WARN] [1710008758.166550451] [move_group.moveit.pilz_joint_limits_aggregator]: Multi-DOF-Joint 'virtual_joint' not supported.
[move_group-4] [INFO] [1710008758.168291514] [move_group.moveit.move_group]: 
[move_group-4] 
[move_group-4] ********************************************************
[move_group-4] * MoveGroup using: 
[move_group-4] *     - apply_planning_scene_service
[move_group-4] *     - clear_octomap_service
[move_group-4] *     - ExecuteTaskSolution
[move_group-4] *     - get_group_urdf
[move_group-4] *     - CartesianPathService
[move_group-4] *     - execute_trajectory_action
[move_group-4] *     - get_planning_scene_service
[move_group-4] *     - kinematics_service
[move_group-4] *     - move_action
[move_group-4] *     - motion_plan_service
[move_group-4] *     - query_planners_service
[move_group-4] *     - state_validation_service
[move_group-4] *     - SequenceAction
[move_group-4] *     - SequenceService
[move_group-4] ********************************************************
[move_group-4] 
[move_group-4] [INFO] [1710008758.169500854] [move_group.moveit.move_group_context]: MoveGroup context using pipeline ompl
[move_group-4] [INFO] [1710008758.169898378] [move_group.moveit.move_group_context]: MoveGroup context initialization complete
[move_group-4] Loading 'move_group/ApplyPlanningSceneService'...
[move_group-4] Loading 'move_group/ClearOctomapService'...
[move_group-4] Loading 'move_group/ExecuteTaskSolutionCapability'...
[move_group-4] Loading 'move_group/GetUrdfService'...
[move_group-4] Loading 'move_group/MoveGroupCartesianPathService'...
[move_group-4] Loading 'move_group/MoveGroupExecuteTrajectoryAction'...
[move_group-4] Loading 'move_group/MoveGroupGetPlanningSceneService'...
[move_group-4] Loading 'move_group/MoveGroupKinematicsService'...
[move_group-4] Loading 'move_group/MoveGroupMoveAction'...
[move_group-4] Loading 'move_group/MoveGroupPlanService'...
[move_group-4] Loading 'move_group/MoveGroupQueryPlannersService'...
[move_group-4] Loading 'move_group/MoveGroupStateValidationService'...
[move_group-4] Loading 'pilz_industrial_motion_planner/MoveGroupSequenceAction'...
[move_group-4] Loading 'pilz_industrial_motion_planner/MoveGroupSequenceService'...
[move_group-4] 
[move_group-4] You can start planning now!
[move_group-4] 
[ros2 run controller_manager spawner joint_state_broadcaster-8] 2024-03-09 19:25:58.205 [RTPS_TRANSPORT_SHM Error] Failed init_port fastrtps_port7421: open_and_lock_file failed -> Function open_port_internal
[ros2 run controller_manager spawner panda_hand_controller-7] 2024-03-09 19:25:58.291 [RTPS_TRANSPORT_SHM Error] Failed init_port fastrtps_port7421: open_and_lock_file failed -> Function open_port_internal
[ros2 run controller_manager spawner panda_arm_controller-6] 2024-03-09 19:25:58.359 [RTPS_TRANSPORT_SHM Error] Failed init_port fastrtps_port7421: open_and_lock_file failed -> Function open_port_internal
[rviz2-1] [INFO] [1710008758.406153342] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1710008758.406849606] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-1] [INFO] [1710008758.523709306] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [WARN] [1710008758.680798660] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rviz2-1] [INFO] [1710008758.698122547] [rviz2.RDFLoader]: Loaded robot model in 0.00491754 seconds
[rviz2-1] [INFO] [1710008758.698253736] [rviz2.robot_model]: Loading robot model 'panda'...
[ros2_control_node-5] [INFO] [1710008758.897741637] [controller_manager]: Loading controller 'joint_state_broadcaster'
[ros2 run controller_manager spawner joint_state_broadcaster-8] [INFO] [1710008758.931234616] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ros2_control_node-5] [INFO] [1710008758.932981298] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[ros2_control_node-5] [INFO] [1710008758.933115525] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[ros2 run controller_manager spawner joint_state_broadcaster-8] [INFO] [1710008758.973559217] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[ros2_control_node-5] [INFO] [1710008759.005456274] [controller_manager]: Loading controller 'panda_hand_controller'
[ros2 run controller_manager spawner panda_hand_controller-7] [INFO] [1710008759.061070152] [spawner_panda_hand_controller]: Loaded panda_hand_controller
[ros2_control_node-5] [INFO] [1710008759.064590188] [controller_manager]: Configuring controller 'panda_hand_controller'
[ros2_control_node-5] [INFO] [1710008759.064686148] [panda_hand_controller]: Action status changes will be monitored at 20Hz.
[ros2 run controller_manager spawner panda_hand_controller-7] [INFO] [1710008759.101156113] [spawner_panda_hand_controller]: Configured and activated panda_hand_controller
[rviz2-1] [INFO] [1710008759.107052945] [rviz2.RDFLoader]: Loaded robot model in 0.00397464 seconds
[rviz2-1] [INFO] [1710008759.107145527] [rviz2.robot_model]: Loading robot model 'panda'...
[rviz2-1] [WARN] [1710008759.135108337] [kdl_parser]: The root link panda_link0 has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[rviz2-1] [INFO] [1710008759.135947563] [rviz2.kdl_kinematics_plugin]: Joint weights for group 'panda_arm': 1 1 1 1 1 1 1
[rviz2-1] [INFO] [1710008759.212866548] [rviz2.planning_scene_monitor]: Starting planning scene monitor
[INFO] [ros2 run controller_manager spawner joint_state_broadcaster-8]: process has finished cleanly [pid 199275]
[rviz2-1] [INFO] [1710008759.217909642] [rviz2.planning_scene_monitor]: Listening to '/monitored_planning_scene'
[INFO] [ros2 run controller_manager spawner panda_hand_controller-7]: process has finished cleanly [pid 199273]
[ros2_control_node-5] [INFO] [1710008759.470372325] [controller_manager]: Loading controller 'panda_arm_controller'
[ros2 run controller_manager spawner panda_arm_controller-6] [INFO] [1710008759.511727446] [spawner_panda_arm_controller]: Loaded panda_arm_controller
[ros2_control_node-5] [INFO] [1710008759.513871566] [controller_manager]: Configuring controller 'panda_arm_controller'
[ros2_control_node-5] [INFO] [1710008759.514047651] [panda_arm_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[ros2_control_node-5] [INFO] [1710008759.514074396] [panda_arm_controller]: Command interfaces are [position] and state interfaces are [position velocity].
[ros2_control_node-5] [INFO] [1710008759.514085208] [panda_arm_controller]: Using 'splines' interpolation method.
[ros2_control_node-5] [INFO] [1710008759.517554111] [panda_arm_controller]: Action status changes will be monitored at 20.00 Hz.
[ros2 run controller_manager spawner panda_arm_controller-6] [INFO] [1710008759.552847018] [spawner_panda_arm_controller]: Configured and activated panda_arm_controller
[INFO] [ros2 run controller_manager spawner panda_arm_controller-6]: process has finished cleanly [pid 199268]
[move_group-4] [WARN] [1710008765.227532950] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '4' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.227747109] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '5' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.227845403] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '7' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.227944770] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '11' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.228119570] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '14' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.228331513] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '16' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.228443024] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '18' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.228565405] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '21' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.228688559] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '24' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [WARN] [1710008765.228900804] [moveit_task_constructor_visualization.execute_task_solution]: The trajectory of stage '25' from task '' does not have any controllers specified for trajectory execution. This might lead to unexpected controller selection.
[move_group-4] [INFO] [1710008765.228942204] [moveit_task_constructor_visualization.execute_task_solution]: Executing TaskSolution
[move_group-4] [INFO] [1710008765.229059854] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229098990] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229159527] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229174282] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229215862] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229230582] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229265019] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229290979] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229309803] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229335599] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229377619] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229390559] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229418029] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229466266] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229508402] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229534590] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229553623] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229579645] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229618802] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229632372] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.229686677] [move_group.moveit.trajectory_execution_manager]: Validating trajectory with allowed_start_tolerance 0.01
[move_group-4] [INFO] [1710008765.230704052] [move_group.moveit.trajectory_execution_manager]: Starting trajectory execution ...
[move_group-4] [INFO] [1710008765.230845959] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.230870080] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.231140605] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.231173834] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[ros2_control_node-5] [INFO] [1710008765.231602243] [panda_hand_controller]: Received & accepted new action goal
[move_group-4] [INFO] [1710008765.282491683] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.282629658] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008765.282743179] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: sending trajectory to panda_arm_controller
[ros2_control_node-5] [INFO] [1710008765.283211787] [panda_arm_controller]: Received new action goal
[ros2_control_node-5] [INFO] [1710008765.283303039] [panda_arm_controller]: Accepted new action goal
[move_group-4] [INFO] [1710008765.283492548] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: panda_arm_controller started execution
[move_group-4] [INFO] [1710008765.283549890] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Goal request accepted!
[ros2_control_node-5] [INFO] [1710008767.270263887] [panda_arm_controller]: Goal reached, success!
[move_group-4] [INFO] [1710008767.283805301] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Controller 'panda_arm_controller' successfully finished
[move_group-4] [INFO] [1710008767.284193584] [move_group.moveit.add_time_optimal_parameterization]: Trajectory component '4/19' is invalid
[move_group-4] [INFO] [1710008767.284244942] [move_group.moveit.moveit_collision_detection_fcl]: Found a contact between 'object' (type 'Object') and 'panda_leftfinger' (type 'Robot link'), which constitutes a collision. Contact information is not stored.
[move_group-4] [INFO] [1710008767.284258583] [move_group.moveit.moveit_collision_detection_fcl]: Collision checking is considered complete (collision was found and 0 contacts are stored)
[move_group-4] [INFO] [1710008767.284267993] [move_group.moveit.add_time_optimal_parameterization]: Upcoming trajectory component '4/19' is invalid
[move_group-4] [INFO] [1710008767.284283928] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008767.284300922] [move_group.moveit.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-4] [INFO] [1710008767.284427397] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: sending trajectory to panda_arm_controller
[ros2_control_node-5] [INFO] [1710008767.284600531] [panda_arm_controller]: Received new action goal
[ros2_control_node-5] [INFO] [1710008767.284630435] [panda_arm_controller]: Accepted new action goal
[move_group-4] [INFO] [1710008767.284758896] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: panda_arm_controller started execution
[move_group-4] [INFO] [1710008767.284769404] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Goal request accepted!
[move_group-4] [INFO] [1710008767.291016433] [move_group.moveit.add_time_optimal_parameterization]: Trajectory component '4/19' is invalid
[move_group-4] [INFO] [1710008767.291086856] [move_group.moveit.moveit_collision_detection_fcl]: Found a contact between 'object' (type 'Object') and 'panda_leftfinger' (type 'Robot link'), which constitutes a collision. Contact information is not stored.
[move_group-4] [INFO] [1710008767.291099803] [move_group.moveit.moveit_collision_detection_fcl]: Collision checking is considered complete (collision was found and 0 contacts are stored)
[move_group-4] [INFO] [1710008767.291137571] [move_group.moveit.add_time_optimal_parameterization]: Trajectory component '4/19' is invalid after scene update
[move_group-4] [INFO] [1710008767.291145811] [move_group.moveit.add_time_optimal_parameterization]: Stopping execution because the path to execute became invalid(probably the environment changed)
[move_group-4] [INFO] [1710008767.291178856] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Cancelling execution for panda_arm_controller
[ros2_control_node-5] [INFO] [1710008767.291491290] [panda_arm_controller]: Got request to cancel goal
[ros2_control_node-5] [INFO] [1710008767.291531323] [panda_arm_controller]: Canceling active action goal because cancel callback received.
[move_group-4] [INFO] [1710008767.291789315] [move_group.moveit.trajectory_execution_manager]: Stopped trajectory execution.
[move_group-4] [INFO] [1710008767.335170954] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Controller 'panda_arm_controller' successfully finished
[move_group-4] [INFO] [1710008767.335222492] [move_group.moveit.trajectory_execution_manager]: Completed trajectory execution with status PREEMPTED ...
@trentatsa trentatsa added the bug Something isn't working label Mar 9, 2024
@sea-bass
Copy link
Contributor

Thanks for reporting this! Note that I've just added the allow_nonzero_velocity_at_trajectory_end: true to the MoveIt Panda config, so that part at least should be okay going forward.

moveit/moveit_resources#198

@sea-bass
Copy link
Contributor

I think I was able to reproduce this issue, have you recently checked out the MoveIt 2 tutorials?

As shown in moveit/moveit_task_constructor#540, I suspect there might have been some recent breaking changes in the moveit_task_constructor repo.

On your system could you:

  1. Go to the src/moveit_task_constructor folder in your repo
  2. Do git checkout ros2-old
  3. Rebuild your workspace
  4. Try again

And let us know if that resolves the issue?

@sea-bass
Copy link
Contributor

sea-bass commented Mar 11, 2024

And a different question -- when I run this demo on Rolling, the only "green" object that shows up is the cylinder, but not the larger cuboid at the bottom. Was this modification something you made, or are we running different versions of the tutorial? Wondering if this has any impact on the collision checks.

@trentatsa
Copy link
Author

Hi @sea-bass , I have tested it out. Still the same issue. With regards to the extra shape I took a screenshot from another demo (moveit_task_contructor pick_place demo) but the issue is the same.

Screenshot from 2024-03-11 14-36-18

Based on moveit/moveit_task_constructor#540 I would say that the issue is based on ExecuteTaskSolutionCapability plugin. More specifically it seems like after the gripper is opened, ExecuteTaskSolutionCapability plugin is causing movegroup to not get the latest joint states of the gripper or hand and hence detects a false collision. Like I said if i make the initial joint position of the gripper open, the task execution is successful. You can replicate this by changing changing the contents of pand_hand.ros2_control.xacro to the following:

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">

    <xacro:macro name="panda_hand_ros2_control" params="name prefix">
        <ros2_control name="${name}" type="system">
            <hardware>
                <plugin>mock_components/GenericSystem</plugin>
            </hardware>
            <joint name="${prefix}panda_finger_joint1">
                <command_interface name="position" />
                <state_interface name="position">
                  <param name="initial_value">0.035</param>
                </state_interface>
                <state_interface name="velocity">
                    <param name="initial_value">0.0</param>
                </state_interface>
            </joint>
            <joint name="${prefix}panda_finger_joint2">
                <param name="mimic">${prefix}panda_finger_joint1</param>
                <param name="multiplier">1</param>
                <command_interface name="position" />
                <state_interface name="position">
                  <param name="initial_value">0.035</param>
                </state_interface>
                <state_interface name="velocity">
                    <param name="initial_value">0.0</param>
                </state_interface>
            </joint>
        </ros2_control>
    </xacro:macro>

</robot>

This will start the gripper at "open state" and from that point on no matter what happen to the state of the gripper, movegroup sees it as this position/state.

I think @henningkayser should be able to tell us whats going on here.

@rhaschke
Copy link
Contributor

This might be related to moveit/moveit#3538, which I strongly recommended for porting to ROS2.

@rhaschke
Copy link
Contributor

I've just added the allow_nonzero_velocity_at_trajectory_end: true

Nonzero velocities at the end of the trajectory are useful for servoing, but not for MTC: you want the robot to stop at a stage's end state. Otherwise end and new start will have different velocity vectors resulting in high jerk!

@sea-bass
Copy link
Contributor

Nonzero velocities at the end of the trajectory are useful for servoing, but not for MTC: you want the robot to stop at a stage's end state. Otherwise end and new start will have different velocity vectors resulting in high jerk!

Yep, I had to add this in unrelated to this PR to address a Servo issue.

Unsure why this pick and place demo is trying to set nonzero end velocities though, as I agree all these planned motions should stop at rest.

@trentatsa
Copy link
Author

@sea-bass @rhaschke so we dealing with two issues here:

  1. non zero velocitys at end of trajectory.
  2. MTC Task execution not getting getting updated planning scene using execution.

@rhaschke
Copy link
Contributor

Unsure why this pick and place demo is trying to set nonzero end velocities though

Obviously, the time parameterization is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants