Description
We followed moveit-2-journey-first-demonstrator/ to reproduce the first demonstrator of MoveIt2 with MARA robot. However, either the effort with the pre-built docker container or with the source build failed.
Your environment
- ROS Distro: dashing
- OS Version: Ubuntu 18.04
- RMW: FastRTPS
Problems
1. Failure with the docker container
At first, we tried the instructions using docker container acutronicrobotics/moveit2:dashing-alpha
.
At the first terminal:
ros2 launch mara_gazebo mara.launch.py
At the second terminal:
docker run --rm -it --net=host --name moveit2 acutronicrobotics/moveit2:dashing-alpha
At the third terminal:
docker exec -it moveit2 bash /root/run_execute.bash
We have paid attention to source the ROS2 environment, and changed the script in the docker so that both the gazebo mara and the docker container use the same RMW.
It seemed that the path planning managed to succeed, which printed:
[INFO] [moveit_ros_planning.move_group_interface]: Ready to take commands for planning group manipulator .
[INFO] [move_group_interface_demo]: Listening to joint states on topic 'joint_states'
current state! ok!
[INFO] [move_group_interface_demo]: Reference frame: world
[INFO] [move_group_interface_demo]: End effector link: ee_link
current state! ok!
[INFO] [move_group_interface_demo]: Visualizing plan 2 (joint space goal)
6 6 6
motor1 0.00000
motor2 0.00000
motor3 0.00001
motor4 0.00000
motor5 0.00000
motor6 -0.00000
0.00000 0.00000 0.00001 0.00000 0.00000 -0.00000
time_from_start 0 0
-0.04774 0.00000 0.07495 -0.00000 0.00001 -0.00000
time_from_start 0 387732368
-0.09547 0.00001 0.14989 -0.00000 0.00001 -0.00000
time_from_start 0 549350976
-0.14321 0.00001 0.22483 -0.00001 0.00002 -0.00000
time_from_start 0 673603846
-0.19094 0.00001 0.29977 -0.00001 0.00002 -0.00000
time_from_start 0 779779955
-0.23584 0.00001 0.37025 -0.00001 0.00002 -0.00000
time_from_start 0 868979284
-0.28074 0.00001 0.44074 -0.00001 0.00003 -0.00000
time_from_start 0 949730274
-0.31535 0.00001 0.49507 -0.00001 0.00003 -0.00000
time_from_start 1 8374859
-0.34996 0.00002 0.54941 -0.00002 0.00003 -0.00000
time_from_start 1 68796433
-0.36400 0.00002 0.57145 -0.00002 0.00003 -0.00000
time_from_start 1 94051680
-0.37804 0.00002 0.59350 -0.00002 0.00003 -0.00000
time_from_start 1 119559479
-0.39386 0.00002 0.61833 -0.00002 0.00003 -0.00000
time_from_start 1 148869276
-0.40967 0.00002 0.64316 -0.00002 0.00003 -0.00000
time_from_start 1 178768200
-0.44961 0.00002 0.70586 -0.00002 0.00003 -0.00000
time_from_start 1 258113284
-0.48954 0.00002 0.76855 -0.00002 0.00003 -0.00000
time_from_start 1 344891834
-0.53395 0.00002 0.83828 -0.00002 0.00003 -0.00000
time_from_start 1 453881888
-0.57836 0.00002 0.90801 -0.00003 0.00003 -0.00001
time_from_start 1 585777697
-0.60762 0.00002 0.95395 -0.00003 0.00003 -0.00001
time_from_start 1 698602412
-0.63687 0.00002 0.99988 -0.00003 0.00003 -0.00001
time_from_start 1 790660446
-0.65855 0.00002 1.03391 -0.00003 0.00003 -0.00001
time_from_start 1 851070226
-0.68022 0.00002 1.06795 -0.00003 0.00003 -0.00001
time_from_start 1 910287989
-0.69732 0.00002 1.09478 -0.00003 0.00003 -0.00001
time_from_start 1 954027427
-0.71441 0.00002 1.12162 -0.00003 0.00002 -0.00001
time_from_start 1 995471971
-0.73786 0.00002 1.15845 -0.00003 0.00002 -0.00001
time_from_start 2 49036601
-0.76131 0.00002 1.19527 -0.00003 0.00001 -0.00001
time_from_start 2 99496906
-0.79747 0.00002 1.25205 -0.00003 0.00001 -0.00001
time_from_start 2 183765961
-0.83363 0.00002 1.30884 -0.00003 -0.00000 -0.00002
time_from_start 2 279611802
-0.86794 0.00002 1.36273 -0.00003 -0.00001 -0.00002
time_from_start 2 387853104
-0.90226 0.00002 1.41662 -0.00003 -0.00002 -0.00002
time_from_start 2 528803751
-0.92017 0.00002 1.44475 -0.00003 -0.00002 -0.00002
time_from_start 2 625483932
-0.93809 0.00002 1.47289 -0.00003 -0.00003 -0.00002
time_from_start 2 735167723
-0.94780 0.00002 1.48814 -0.00003 -0.00003 -0.00002
time_from_start 2 832127566
-0.95751 0.00002 1.50339 -0.00003 -0.00003 -0.00002
time_from_start 2 897111693
-0.96811 0.00002 1.52004 -0.00003 -0.00004 -0.00002
time_from_start 2 954108144
-0.97871 0.00002 1.53669 -0.00003 -0.00004 -0.00003
time_from_start 3 12831644
-0.98932 0.00002 1.55334 -0.00003 -0.00005 -0.00003
time_from_start 3 88446753
-0.99992 0.00002 1.56999 -0.00003 -0.00005 -0.00003
time_from_start 3 274094882
However, the follow_joint_trajectoryaction_server failed to execute the trajectory, and the MARA robot in gazebo didn't move, which prints:
[INFO] [move_group]: Starting trajectory execution ...
[INFO] [follow_joint_trajectoryaction_server]: Received goal request with order
[INFO] [follow_joint_trajectoryaction_server]: handle_accepted and executing
moveit_controller_manager::MoveItControllerHandlePtr getControllerHandle follow_joint_trajectory[INFO] [moveit.SimpleControllerManager]: Goal accepted by server, waiting for result
handles[i]->waitForExecution(expected_trajectory_duration);
ActionBasedControllerHandleBase waitForExecution
done_ 0 timeout 0.00000
[WARN] [move_group]: Controller handle follow_joint_trajectory reports status 1
epart 0
execution_complete_ 0
ALEX waitForRobotToStop ?? 1
[INFO] [move_group]: Completed trajectory execution with status RUNNING ...
2 execution_complete_ 1
1 continuous_execution_queue_ 1
2 continuous_execution_queue_ 1
waitForExecution end
[INFO] [move_group]: Execution completed: RUNNING
[INFO] [follow_joint_trajectoryaction_server]: /hrim_actuation_servomotor_000000000001/trajectory_axis2: failed
[INFO] [follow_joint_trajectoryaction_server]: /hrim_actuation_servomotor_000000000001/trajectory_axis1: failed
[INFO] [follow_joint_trajectoryaction_server]: /hrim_actuation_servomotor_000000000002/trajectory_axis1: failed
[INFO] [follow_joint_trajectoryaction_server]: /hrim_actuation_servomotor_000000000002/trajectory_axis2: failed
[INFO] [follow_joint_trajectoryaction_server]: /hrim_actuation_servomotor_000000000003/trajectory_axis1: failed
[INFO] [follow_joint_trajectoryaction_server]: /hrim_actuation_servomotor_000000000003/trajectory_axis2: failed
[ERROR] [follow_joint_trajectoryaction_server]: Not all action server ready. Exit.
[INFO] [moveit.SimpleControllerManager]: Controller follow_joint_trajectory successfully finished
2. Failure with the source build
At the first terminal, run:
ros2 launch mara_gazebo mara.launch.py
At the second terminal, run:
gdb -ex run --args build/moveit_ros_move_group/move_group
At the third terminal, run:
ros2 launch <path_to_ros2_workspace_src>/moveit2/moveit_ros/planning/trajectory_execution_manager/test/test_app.launch.py
The URDF and SRDF in test_app.launch.py was edited to:
urdf = os.path.join(get_package_share_directory('mara_description'), 'urdf', 'mara_robot.urdf')
srdf = "<path_to_ros2_workspace_src>/moveit_resources/mara_moveit_config/config/mara.srdf"
After this step, the move_group
supposed to be initialized, but it finished with a segmentation fault rclcpp::Node::get_node_services_interface() () from /opt/ros/dashing/lib/librclcpp.so
in the second terminal, and printed:
[INFO] [moveit.rdf_loader]: Loaded robot model in 0.4196 seconds
[INFO] [robot_model]: Loading robot model 'mara'...
[WARN] [robot_model]: Skipping virtual joint 'fixed_base' because its child frame 'base_link' does not match the URDF frame 'world'
[INFO] [robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[INFO] [kinematics_plugin_loader]: Configuring kinematics solvers
[INFO] [kinematics_plugin_loader]: Loading settings for kinematics solvers from the ROS param server ...
[INFO] [kinematics_plugin_loader]: Looking for param manipulator.kinematics_solver
[INFO] [kinematics_plugin_loader]: Looking for param robot_description_kinematics.manipulator.kinematics_solver
[INFO] [kinematics_plugin_loader]: Using kinematics solver 'kdl_kinematics_plugin/KDLKinematicsPlugin' for group 'manipulator'.
[INFO] [kinematics_plugin_loader]: 1 param is kdl_kinematics_plugin/KDLKinematicsPlugin
[INFO] [kinematics_plugin_loader]: Looking for param endeffector.kinematics_solver
[INFO] [kinematics_plugin_loader]: Looking for param robot_description_kinematics.endeffector.kinematics_solver
[INFO] [kinematics_plugin_loader]: Using kinematics solver 'not' for group 'endeffector'.
[INFO] [kinematics_plugin_loader]: Using kinematics solver 'set' for group 'endeffector'.
[INFO] [kinematics_plugin_loader]: 1 param is not set
[INFO] [kinematics_plugin_loader]: Trying to allocate kinematics solver for group 'manipulator'
[INFO] [kinematics_plugin_loader]: Choosing tip frame of kinematic solver for groupbased on last link in chain
[INFO] [kinematics_plugin_loader]: Planning group 'manipulator' has tip(s): ee_link,
Link base_link had 1 children
Link base_robot had 1 children
Link motor1_link had 2 children
Link motor1_cover had 0 children
Link motor2_link had 1 children
Link motor3_link had 2 children
Link motor3_cover had 0 children
Link motor4_link had 1 children
Link motor5_link had 2 children
Link motor5_cover had 0 children
Link motor6_link had 2 children
Link ee_link had 0 children
Link tool0 had 0 children
Did anyone succeed to reproduce the first demonstrator of MoveIt2? Did I miss something?