From 27ffba2faf1b845b8cf922553535306840e37ff0 Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Fri, 5 Apr 2024 09:55:22 +0200 Subject: [PATCH 01/13] fix - same inactive and active controller is to be loaded --- templates/ros2_control/robot_ros2_control.launch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ros2_control/robot_ros2_control.launch.xml b/templates/ros2_control/robot_ros2_control.launch.xml index ff75915a..f9f7fadd 100644 --- a/templates/ros2_control/robot_ros2_control.launch.xml +++ b/templates/ros2_control/robot_ros2_control.launch.xml @@ -46,7 +46,7 @@ Authors: Riyan Jose, Manuel Muth, Dr. Denis default="joint_trajectory_controller" description="Robot controller to start. Choices are: [forward_position_controller, joint_trajectory_controller]."/> From 5013f7a4dfad09e9bb4613685c2b0a9865bb44bb Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Fri, 5 Apr 2024 15:35:40 +0200 Subject: [PATCH 02/13] set JTC as default active controller for bringup template * so that setup-moveit-package planning and execution works out of the box --- templates/ros2_control/robot_ros2_control.launch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ros2_control/robot_ros2_control.launch.xml b/templates/ros2_control/robot_ros2_control.launch.xml index f9f7fadd..ff75915a 100644 --- a/templates/ros2_control/robot_ros2_control.launch.xml +++ b/templates/ros2_control/robot_ros2_control.launch.xml @@ -46,7 +46,7 @@ Authors: Riyan Jose, Manuel Muth, Dr. Denis default="joint_trajectory_controller" description="Robot controller to start. Choices are: [forward_position_controller, joint_trajectory_controller]."/> From d5b20f474729f899aa1e6543924346fb5be7a93a Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Fri, 5 Apr 2024 10:23:26 +0200 Subject: [PATCH 03/13] add moveit template folder --- templates/moveit/configs_here_ryan | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 templates/moveit/configs_here_ryan diff --git a/templates/moveit/configs_here_ryan b/templates/moveit/configs_here_ryan new file mode 100644 index 00000000..e69de29b From b83dcf5f5ef8b7d62eea0e27a07fa96008e882e9 Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Fri, 5 Apr 2024 16:17:57 +0200 Subject: [PATCH 04/13] add setup-robot-moveit.bash script --- scripts/_RosTeamWs_Defines.bash | 1 + scripts/setup-robot-moveit.bash | 153 ++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100755 scripts/setup-robot-moveit.bash diff --git a/scripts/_RosTeamWs_Defines.bash b/scripts/_RosTeamWs_Defines.bash index 0e1524a0..0908bb5a 100755 --- a/scripts/_RosTeamWs_Defines.bash +++ b/scripts/_RosTeamWs_Defines.bash @@ -437,6 +437,7 @@ function set_framework_default_paths { PACKAGE_TEMPLATES="$FRAMEWORK_BASE_PATH/templates/package" ROBOT_DESCRIPTION_TEMPLATES="$FRAMEWORK_BASE_PATH/templates/robot_description" ROS2_CONTROL_TEMPLATES="$FRAMEWORK_BASE_PATH/templates/ros2_control" + MOVEIT_TEMPLATES="$FRAMEWORK_BASE_PATH/templates/moveit" ROS2_CONTROL_HW_ITF_TEMPLATES="$ROS2_CONTROL_TEMPLATES/hardware" ROS2_CONTROL_CONTROLLER_TEMPLATES="$ROS2_CONTROL_TEMPLATES/controller" LICENSE_TEMPLATES="$FRAMEWORK_BASE_PATH/templates/licenses" diff --git a/scripts/setup-robot-moveit.bash b/scripts/setup-robot-moveit.bash new file mode 100755 index 00000000..05308b6a --- /dev/null +++ b/scripts/setup-robot-moveit.bash @@ -0,0 +1,153 @@ +#!/bin/bash +# +# Copyright 2021 Denis Stogl (Stogl Robotics Consulting) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +usage="setup-robot-bringup ROBOT_NAME DESCRIPTION_PKG_NAME" + +# Load Framework defines +script_own_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +source $script_own_dir/../setup.bash +check_and_set_ros_distro_and_version "${ROS_DISTRO}" + +ROBOT_NAME=$1 +if [ -z "$ROBOT_NAME" ]; then + print_and_exit "ERROR: You should provide robot name! Nothing to do 😯" "$usage" +fi + +DESCR_PKG_NAME=$2 +if [ -z "$DESCR_PKG_NAME" ]; then + print_and_exit "ERROR: You should provide description package name! Nothing to do 😯" "$usage" +fi + +echo "Which launchfiles should be added? Choose from the following options:" +echo "1) xml" +echo "2) python" +echo "3) both" + +read -p "Enter your choice:" choice + +LAUNCH_FILE_TYPES=() + +case $choice in +1) + LAUNCH_FILE_TYPES+=(".xml") + ;; +2) + LAUNCH_FILE_TYPES+=(".py") + ;; +3) + LAUNCH_FILE_TYPES+=(".xml" ".py") + ;; +*) + print_and_exit "Invalid choice. Exiting." + ;; +esac + +if [ ! -f "package.xml" ]; then + print_and_exit "ERROR: 'package.xml' not found. You should execute this script at the top level of your package folder. Nothing to do 😯" "$usage" +fi +PKG_NAME="$(grep -Po '(?<=).*?(?=)' package.xml | sed -e 's/[[:space:]]//g')" + +echo "" +echo -e "${TERMINAL_COLOR_USER_NOTICE}ATTENTION: Setting up moveit package for robot '$ROBOT_NAME' in package '$PKG_NAME' in folder '$(pwd)' with robot description package '$DESCR_PKG_NAME'.${TERMINAL_COLOR_NC}" +echo -e "${TERMINAL_COLOR_USER_CONFIRMATION}If correct press , otherwise +C and start the script again from the package folder and/or with correct robot name.${TERMINAL_COLOR_NC}" +read + +# Remove include and src folders - in this package should be no source +RM_FOLDERS=("include" "src") + +for FOLDER in "${RM_FOLDERS[@]}"; do + if [[ -d $FOLDER && ! "$(ls -A $FOLDER)" ]]; then + rm -r $FOLDER + fi +done + +# Create folders +mkdir -p config +mkdir -p launch +mkdir -p rviz +mkdir -p srdf + +# Copy rviz files +mkdir -p rviz +ROBOT_RVIZ="rviz/moveit.rviz" +cp -n "$MOVEIT_TEMPLATES/moveit.rviz" $ROBOT_RVIZ + +# Copy config files +MOVE_GROUP_CONFIG_YAML="config/move_group.yaml" +OMPL_PLANNING_CONFIG_YAML="config/ompl_planning.yaml" +cp -n $MOVEIT_TEMPLATES/move_group.yaml $MOVE_GROUP_CONFIG_YAML +cp -n $MOVEIT_TEMPLATES/ompl_planning.yaml $OMPL_PLANNING_CONFIG_YAML + +# Copy SRDF/xacro files +ROBOT_SRDF="srdf/${ROBOT_NAME}.srdf.xacro" +ROBOT_SRDF_MACRO="srdf/${ROBOT_NAME}_macro.srdf.xacro" +cp -n "$MOVEIT_TEMPLATES/robot.srdf.xacro" $ROBOT_SRDF +cp -n "$MOVEIT_TEMPLATES/robot_macro.xacro" $ROBOT_SRDF_MACRO + + +# Copy launch files +for file_type in "${LAUNCH_FILE_TYPES[@]}"; do + # Construct the file paths + MOVEIT_LAUNCH="launch/moveit.launch${file_type}" + + # Copy the templates to the destination with the specified file type + cp -n "$MOVEIT_TEMPLATES/moveit.launch${file_type}" "${MOVEIT_LAUNCH}" +done + +# sed all needed files +FILES_TO_SED=($MOVEIT_LAUNCH $ROBOT_SRDF $ROBOT_SRDF_MACRO) + +for SED_FILE in "${FILES_TO_SED[@]}"; do + sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE + sed -i "s/\\\$MOVEIT_CONFIG_PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE + sed -i "s/\\\$ROBOT_NAME\\\$/${ROBOT_NAME}/g" $SED_FILE + sed -i "s/\\\$DESCR_PKG_NAME\\\$/${DESCR_PKG_NAME}/g" $SED_FILE +done + +# package.xml: Add dependencies if they not exist +DEP_PKGS=( + "xacro" + "$DESCR_PKG_NAME" + "moveit_ros_move_group" + "moveit_kinematics" + "moveit_planners" + "moveit_simple_controller_manager" + ) + +for DEP_PKG in "${DEP_PKGS[@]}"; do + if $(grep -q $DEP_PKG package.xml); then + echo "'$DEP_PKG' is already listed in package.xml" + else + append_to_string="ament_cmake<\/buildtool_depend>" + sed -i "s/$append_to_string/$append_to_string\\n\\n ${DEP_PKG}<\/exec_depend>/g" package.xml + fi +done + +# CMakeLists.txt: Add install paths of the files +prepend_to_string="if(BUILD_TESTING)" +sed -i "s/$prepend_to_string/install\(\\n DIRECTORY config launch rviz srdf\\n DESTINATION share\/\$\{PROJECT_NAME\}\\n\)\\n\\n$prepend_to_string/g" CMakeLists.txt + +# TODO: add README with general instructions + +# TODO: Add license checks + +# skip compilation, let the user choose which moveit packages to install, as MoveIt introduces +# breaking changes often. +echo "" +echo -e "${TERMINAL_COLOR_USER_NOTICE}NOTICE: To compile, install the required MoveIt package dependencies manually.${TERMINAL_COLOR_NC}" + +echo "" +echo -e "${TERMINAL_COLOR_USER_NOTICE}FINISHED: You can test the configuration by executing 'ros2 launch $PKG_NAME moveit.launch${LAUNCH_FILE_TYPES[*]}'${TERMINAL_COLOR_NC}" From 9b55d3923caafc4d5d62a41d590bdf7eb506877c Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Fri, 5 Apr 2024 16:18:30 +0200 Subject: [PATCH 05/13] add template files to moveit template folder --- templates/moveit/move_group.yaml | 79 +++++ templates/moveit/moveit.launch.py | 179 ++++++++++ templates/moveit/moveit.rviz | 443 ++++++++++++++++++++++++ templates/moveit/ompl_planning.yaml | 72 ++++ templates/moveit/robot.srdf.xacro | 10 + templates/moveit/robot_macro.srdf.xacro | 25 ++ 6 files changed, 808 insertions(+) create mode 100644 templates/moveit/move_group.yaml create mode 100644 templates/moveit/moveit.launch.py create mode 100644 templates/moveit/moveit.rviz create mode 100644 templates/moveit/ompl_planning.yaml create mode 100644 templates/moveit/robot.srdf.xacro create mode 100644 templates/moveit/robot_macro.srdf.xacro diff --git a/templates/moveit/move_group.yaml b/templates/moveit/move_group.yaml new file mode 100644 index 00000000..0264c560 --- /dev/null +++ b/templates/moveit/move_group.yaml @@ -0,0 +1,79 @@ +/**: + ros__parameters: +#-------- Moveit controllers + moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager + moveit_simple_controller_manager: + controller_names: + - joint_trajectory_controller # add or remove controllers as necessary + + joint_trajectory_controller: + type: FollowJointTrajectory + action_ns: follow_joint_trajectory + default: true + joints: + - joint1 + - joint2 + - joint3 + - joint4 + - joint5 + - joint6 + +#-------- kinematics + robot_description_kinematics: + myrobot_manipulator: + kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin + kinematics_solver_search_resolution: 0.005 + kinematics_solver_timeout: 0.005 + kinematics_solver_attempts: 3 + +#-------- joint limits + robot_description_planning: + default_velocity_scaling_factor: 0.1 + default_acceleration_scaling_factor: 0.1 + # Specific joint properties can be changed with the keys [max_position, min_position, max_velocity, max_acceleration] + # Joint limits can be turned off with [has_velocity_limits, has_acceleration_limits] + joint_limits: + joint1: + has_velocity_limits: true + max_velocity: 1.7453292519943295 + has_acceleration_limits: true + max_acceleration: 5.0 + joint2: + has_velocity_limits: true + max_velocity: 1.5707963267948966 + has_acceleration_limits: true + max_acceleration: 5.0 + joint3: + has_velocity_limits: true + max_velocity: 1.5707963267948966 + has_acceleration_limits: true + max_acceleration: 5.0 + joint4: + has_velocity_limits: true + max_velocity: 2.9670597283903604 + has_acceleration_limits: true + max_acceleration: 5.0 + joint5: + has_velocity_limits: true + max_velocity: 2.0943951023931953 + has_acceleration_limits: true + max_acceleration: 5.0 + joint6: + has_velocity_limits: true + max_velocity: 3.3161255787892263 + has_acceleration_limits: true + max_acceleration: 5.0 + +#-------- other + moveit_manage_controllers: false + trajectory_execution: + allowed_execution_duration_scaling: 1.2 + allowed_goal_duration_margin: 0.5 + allowed_start_tolerance: 0.01 + capabilities: move_group/MoveGroupExecuteTrajectoryAction + publish_planning_scene: True + publish_geometry_updates: True + publish_state_updates: True + publish_transforms_updates: True + + \ No newline at end of file diff --git a/templates/moveit/moveit.launch.py b/templates/moveit/moveit.launch.py new file mode 100644 index 00000000..ba31e8ad --- /dev/null +++ b/templates/moveit/moveit.launch.py @@ -0,0 +1,179 @@ +from launch.actions import DeclareLaunchArgument +from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution +from launch_ros.actions import Node +from launch_ros.substitutions import FindPackageShare +from launch import LaunchDescription +from launch.actions import OpaqueFunction + +def launch_setup(context, *args, **kwargs): + description_package = LaunchConfiguration("description_package") + description_file = LaunchConfiguration("description_file") + moveit_package = LaunchConfiguration("moveit_package") + semantic_description_file = LaunchConfiguration("semantic_description_file") + prefix = LaunchConfiguration("prefix") + use_mock_hardware = LaunchConfiguration("use_mock_hardware") + mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") + use_sim_time = LaunchConfiguration("use_sim_time") + logging_severity = LaunchConfiguration("severity") + + # -------------------------------------------------------# + # MoveIt2 MoveGroup setup # + # -------------------------------------------------------# + + # URDF + robot_description_content = Command( + [ + PathJoinSubstitution([FindExecutable(name="xacro")]), + " ", + PathJoinSubstitution( + [FindPackageShare(description_package), "urdf", description_file] + ), + " ", + "prefix:=", + prefix, + " ", + "use_mock_hardware:=", + use_mock_hardware, + " ", + "mock_sensor_commands:=", + mock_sensor_commands, + " ", + ] + ) + # SRDF + robot_description_semantic_content = Command( + [ + PathJoinSubstitution([FindExecutable(name="xacro")]), + " ", + PathJoinSubstitution( + [FindPackageShare(moveit_package), "srdf", semantic_description_file] + ), + ] + ) + + robot_description = {"robot_description": robot_description_content.perform(context)} + robot_description_semantic = {"robot_description_semantic": robot_description_semantic_content.perform(context)} + planning_config = PathJoinSubstitution([FindPackageShare(moveit_package), "config", "ompl_planning.yaml"]) + move_group_config = PathJoinSubstitution([FindPackageShare(moveit_package), "config", "move_group.yaml"]) + + # -------------------------------------------------------# + # Move Group Node # + # -------------------------------------------------------# + move_group_node = Node( + package="moveit_ros_move_group", + executable="move_group", + output="screen", + arguments=["--ros-args", "--log-level", logging_severity], + parameters=[ + robot_description, + robot_description_semantic, + planning_config, + move_group_config, + {"use_sim_time": use_sim_time}, + ], + ) + + # RViz + rviz_config = PathJoinSubstitution( + [FindPackageShare(moveit_package), "rviz", "moveit.rviz"] + ) + rviz_node = Node( + package="rviz2", + executable="rviz2", + output="log", + arguments=["-d", rviz_config, "--ros-args", "--log-level", "WARN"], + parameters=[ + robot_description, + robot_description_semantic, + planning_config, + move_group_config, + {"use_sim_time": use_sim_time}, + ], + ) + + return [ + move_group_node, + rviz_node, + ] + + +def generate_launch_description(): + # + # ------------- Declare arguments ------------- # + # + declared_arguments = [] + declared_arguments.append( + DeclareLaunchArgument( + "description_package", + default_value="myrobot_description", + description="Package with the robot URDF/XACRO files. \ + Usually the argument is not set, it enables use of a custom setup.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "description_file", + default_value="myrobot.urdf.xacro", + description="URDF/XACRO description file \ + Usually the argument is not set, it enables use of a custom setup.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "moveit_package", + default_value="myrobot_moveit", + description="MoveIt config package with robot SRDF/XACRO files. \ + Usually the argument is not set, it enables use of a custom setup.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "semantic_description_file", + default_value="myrobot.srdf.xacro", + description="MoveIt SRDF/XACRO description file with the robot.. \ + Usually the argument is not set, it enables use of a custom setup.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "prefix", + default_value='""', + description="Prefix of the joint names, useful for \ + multi-robot setup. If changed than also joint names in the controllers' configuration \ + have to be updated.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "use_mock_hardware", + default_value="true", + description="Start robot with mock hardware mirroring command to its states.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "mock_sensor_commands", + default_value="false", + description="Enable mock command interfaces for sensors used for simple simulations. \ + Used only if 'use_mock_hardware' parameter is true.", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "use_sim_time", + default_value="false", + description="Use simulation clock instead of world clock", + ) + ) + declared_arguments.append( + DeclareLaunchArgument( + "severity", + default_value="INFO", + choices=["INFO", "WARN", "ERROR", "DEBUG", "FATAL"], + description="Logging level for the nodes", + ) + ) + + return LaunchDescription( + declared_arguments + [OpaqueFunction(function=launch_setup)] + ) diff --git a/templates/moveit/moveit.rviz b/templates/moveit/moveit.rviz new file mode 100644 index 00000000..3177bc9a --- /dev/null +++ b/templates/moveit/moveit.rviz @@ -0,0 +1,443 @@ +Panels: + - Class: rviz_common/Displays + Help Height: 0 + Name: Displays + Property Tree Widget: + Expanded: + - /RobotModel1/Links1/link61 + - /TF1/Tree1 + - /TF1/Tree1/world1 + - /TF1/Tree1/world1/base_link1 + - /TF1/Tree1/world1/base_link1/link11 + - /MotionPlanning1 + Splitter Ratio: 0.5 + Tree Height: 438 + - Class: rviz_common/Selection + Name: Selection + - Class: rviz_common/Tool Properties + Expanded: + - /2D Goal Pose1 + - /Publish Point1 + Name: Tool Properties + Splitter Ratio: 0.5886790156364441 + - Class: rviz_common/Views + Expanded: + - /Current View1 + Name: Views + Splitter Ratio: 0.5 +Visualization Manager: + Class: "" + Displays: + - Alpha: 0.5 + Cell Size: 1 + Class: rviz_default_plugins/Grid + Color: 160; 160; 164 + Enabled: true + Line Style: + Line Width: 0.029999999329447746 + Value: Lines + Name: Grid + Normal Cell Count: 0 + Offset: + X: 0 + Y: 0 + Z: 0 + Plane: XY + Plane Cell Count: 10 + Reference Frame: + Value: true + - Alpha: 1 + Class: rviz_default_plugins/RobotModel + Collision Enabled: false + Description File: "" + Description Source: Topic + Description Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /robot_description + Enabled: true + Links: + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order + base: + Alpha: 1 + Show Axes: false + Show Trail: false + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + flange: + Alpha: 1 + Show Axes: false + Show Trail: false + link1: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link2: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link3: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link4: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link5: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link6: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + tool0: + Alpha: 1 + Show Axes: false + Show Trail: false + world: + Alpha: 1 + Show Axes: false + Show Trail: false + Mass Properties: + Inertia: false + Mass: false + Name: RobotModel + TF Prefix: "" + Update Interval: 0 + Value: true + Visual Enabled: true + - Class: rviz_default_plugins/TF + Enabled: true + Frame Timeout: 15 + Frames: + All Enabled: true + base: + Value: true + base_link: + Value: true + flange: + Value: true + link1: + Value: true + link2: + Value: true + link3: + Value: true + link4: + Value: true + link5: + Value: true + link6: + Value: true + tool0: + Value: true + world: + Value: true + Marker Scale: 1 + Name: TF + Show Arrows: true + Show Axes: true + Show Names: true + Tree: + world: + base_link: + base: + {} + link1: + link2: + link3: + link4: + link5: + link6: + tool0: + flange: + {} + Update Interval: 0 + Value: true + - Acceleration_Scaling_Factor: 0.1 + Class: moveit_rviz_plugin/MotionPlanning + Enabled: true + Move Group Namespace: "" + MoveIt_Allow_Approximate_IK: false + MoveIt_Allow_External_Program: false + MoveIt_Allow_Replanning: false + MoveIt_Allow_Sensor_Positioning: false + MoveIt_Planning_Attempts: 10 + MoveIt_Planning_Time: 5 + MoveIt_Use_Cartesian_Path: false + MoveIt_Use_Constraint_Aware_IK: false + MoveIt_Workspace: + Center: + X: 0 + Y: 0 + Z: 0 + Size: + X: 2 + Y: 2 + Z: 2 + Name: MotionPlanning + Planned Path: + Color Enabled: false + Interrupt Display: false + Links: + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order + base: + Alpha: 1 + Show Axes: false + Show Trail: false + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + flange: + Alpha: 1 + Show Axes: false + Show Trail: false + link1: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link2: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link3: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link4: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link5: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link6: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + tool0: + Alpha: 1 + Show Axes: false + Show Trail: false + world: + Alpha: 1 + Show Axes: false + Show Trail: false + Loop Animation: false + Robot Alpha: 0.5 + Robot Color: 150; 50; 150 + Show Robot Collision: false + Show Robot Visual: true + Show Trail: false + State Display Time: 3x + Trail Step Size: 1 + Trajectory Topic: /display_planned_path + Use Sim Time: false + Planning Metrics: + Payload: 1 + Show Joint Torques: false + Show Manipulability: false + Show Manipulability Index: false + Show Weight Limit: false + TextHeight: 0.07999999821186066 + Planning Request: + Colliding Link Color: 255; 0; 0 + Goal State Alpha: 1 + Goal State Color: 250; 128; 0 + Interactive Marker Size: 0 + Joint Violation Color: 255; 0; 255 + Planning Group: my_robot_manipulator + Query Goal State: true + Query Start State: false + Show Workspace: false + Start State Alpha: 1 + Start State Color: 0; 255; 0 + Planning Scene Topic: /monitored_planning_scene + Robot Description: robot_description + Scene Geometry: + Scene Alpha: 0.8999999761581421 + Scene Color: 50; 230; 50 + Scene Display Time: 0.009999999776482582 + Show Scene Geometry: true + Voxel Coloring: Z-Axis + Voxel Rendering: Occupied Voxels + Scene Robot: + Attached Body Color: 150; 50; 150 + Links: + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order + base: + Alpha: 1 + Show Axes: false + Show Trail: false + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + flange: + Alpha: 1 + Show Axes: false + Show Trail: false + link1: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link2: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link3: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link4: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link5: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + link6: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + tool0: + Alpha: 1 + Show Axes: false + Show Trail: false + world: + Alpha: 1 + Show Axes: false + Show Trail: false + Robot Alpha: 1 + Show Robot Collision: false + Show Robot Visual: true + Value: true + Velocity_Scaling_Factor: 0.1 + Enabled: true + Global Options: + Background Color: 48; 48; 48 + Fixed Frame: base_link + Frame Rate: 30 + Name: root + Tools: + - Class: rviz_default_plugins/Interact + Hide Inactive Objects: true + - Class: rviz_default_plugins/MoveCamera + - Class: rviz_default_plugins/Select + - Class: rviz_default_plugins/FocusCamera + - Class: rviz_default_plugins/Measure + Line color: 128; 128; 0 + - Class: rviz_default_plugins/SetInitialPose + Covariance x: 0.25 + Covariance y: 0.25 + Covariance yaw: 0.06853891909122467 + Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /initialpose + - Class: rviz_default_plugins/SetGoal + Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /goal_pose + - Class: rviz_default_plugins/PublishPoint + Single click: true + Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /clicked_point + Transformation: + Current: + Class: rviz_default_plugins/TF + Value: true + Views: + Current: + Class: rviz_default_plugins/Orbit + Distance: 2.962221622467041 + Enable Stereo Rendering: + Stereo Eye Separation: 0.05999999865889549 + Stereo Focal Distance: 1 + Swap Stereo Eyes: false + Value: false + Focal Point: + X: 0.8273206949234009 + Y: -0.11996828764677048 + Z: 0.4445207118988037 + Focal Shape Fixed Size: true + Focal Shape Size: 0.05000000074505806 + Invert Z Axis: false + Name: Current View + Near Clip Distance: 0.009999999776482582 + Pitch: 0.38039883971214294 + Target Frame: + Value: Orbit (rviz) + Yaw: 5.253565788269043 + Saved: ~ +Window Geometry: + "": + collapsed: false + " - Trajectory Slider": + collapsed: false + Displays: + collapsed: false + Height: 1016 + Hide Left Dock: false + Hide Right Dock: false + QMainWindow State: 000000ff00000000fd0000000400000000000001f30000039efc020000000afb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc0000003d00000210000000e60100001cfa000000010100000002fb0000000a005600690065007700730100000000ffffffff0000010000fffffffb000000100044006900730070006c0061007900730100000000000001f30000015600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000280020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000001600000016fbffffffff0100000253000001880000017d00ffffff00000001000001100000039efc0200000002fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000005870000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Selection: + collapsed: false + Tool Properties: + collapsed: false + Views: + collapsed: false + Width: 1920 + X: 1366 + Y: 27 diff --git a/templates/moveit/ompl_planning.yaml b/templates/moveit/ompl_planning.yaml new file mode 100644 index 00000000..d198a254 --- /dev/null +++ b/templates/moveit/ompl_planning.yaml @@ -0,0 +1,72 @@ +/**: + ros__parameters: + move_group: + planning_plugins: + - ompl_interface/OMPLPlanner + request_adapters: + - default_planning_request_adapters/ResolveConstraintFrames + - default_planning_request_adapters/ValidateWorkspaceBounds + - default_planning_request_adapters/CheckStartStateBounds + - default_planning_request_adapters/CheckStartStateCollision + response_adapters: + - default_planning_response_adapters/AddTimeOptimalParameterization + - default_planning_response_adapters/ValidateSolution + - default_planning_response_adapters/DisplayMotionPath + myrobot_manipulator: + planner_configs: + SBLkConfigDefault: + type: geometric::SBL + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + ESTkConfigDefault: + type: geometric::EST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0 setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + LBKPIECEkConfigDefault: + type: geometric::LBKPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + BKPIECEkConfigDefault: + type: geometric::BKPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 + failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + KPIECEkConfigDefault: + type: geometric::KPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 (0.0,1.] + failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + RRTkConfigDefault: + type: geometric::RRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + RRTConnectkConfigDefault: + type: geometric::RRTConnect + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + RRTstarkConfigDefault: + type: geometric::RRTstar + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + delay_collision_checking: 1 # Stop collision checking as soon as C-free parent found. default 1 + TRRTkConfigDefault: + type: geometric::TRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + max_states_failed: 10 # when to start increasing temp. default: 10 + temp_change_factor: 2.0 # how much to increase or decrease temp. default: 2.0 + min_temperature: 10e-10 # lower limit of temp change. default: 10e-10 + init_temperature: 10e-6 # initial temperature. default: 10e-6 + frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() + frountierNodeRatio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 + k_constant: 0.0 # value used to normalize expression. default: 0.0 set in setup() + PRMkConfigDefault: + type: geometric::PRM + max_nearest_neighbors: 10 # use k nearest neighbors. default: 10 + PRMstarkConfigDefault: + type: geometric::PRMstar + ##Note: commenting the following line lets moveit chose RRTConnect as default planner rather than LBKPIECE + #projection_evaluator: joints(shoulder_pan_joint,shoulder_lift_joint) + longest_valid_segment_fraction: 0.01 \ No newline at end of file diff --git a/templates/moveit/robot.srdf.xacro b/templates/moveit/robot.srdf.xacro new file mode 100644 index 00000000..677264bc --- /dev/null +++ b/templates/moveit/robot.srdf.xacro @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/templates/moveit/robot_macro.srdf.xacro b/templates/moveit/robot_macro.srdf.xacro new file mode 100644 index 00000000..4224afc9 --- /dev/null +++ b/templates/moveit/robot_macro.srdf.xacro @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + From 95838d887adf54aeb26e8d8887c556f430fdbfdd Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Mon, 8 Apr 2024 09:18:05 +0200 Subject: [PATCH 06/13] add variable names to template files for SED-ing --- scripts/setup-robot-moveit.bash | 1 - templates/moveit/move_group.yaml | 2 +- templates/moveit/moveit.launch.py | 8 ++++---- templates/moveit/moveit.rviz | 2 +- templates/moveit/ompl_planning.yaml | 2 +- templates/moveit/robot.srdf.xacro | 6 +++--- templates/moveit/robot_macro.srdf.xacro | 4 ++-- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/scripts/setup-robot-moveit.bash b/scripts/setup-robot-moveit.bash index 05308b6a..3d3c47f8 100755 --- a/scripts/setup-robot-moveit.bash +++ b/scripts/setup-robot-moveit.bash @@ -112,7 +112,6 @@ FILES_TO_SED=($MOVEIT_LAUNCH $ROBOT_SRDF $ROBOT_SRDF_MACRO) for SED_FILE in "${FILES_TO_SED[@]}"; do sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE - sed -i "s/\\\$MOVEIT_CONFIG_PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE sed -i "s/\\\$ROBOT_NAME\\\$/${ROBOT_NAME}/g" $SED_FILE sed -i "s/\\\$DESCR_PKG_NAME\\\$/${DESCR_PKG_NAME}/g" $SED_FILE done diff --git a/templates/moveit/move_group.yaml b/templates/moveit/move_group.yaml index 0264c560..908d6532 100644 --- a/templates/moveit/move_group.yaml +++ b/templates/moveit/move_group.yaml @@ -20,7 +20,7 @@ #-------- kinematics robot_description_kinematics: - myrobot_manipulator: + $ROBOT_NAME$_manipulator: kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin kinematics_solver_search_resolution: 0.005 kinematics_solver_timeout: 0.005 diff --git a/templates/moveit/moveit.launch.py b/templates/moveit/moveit.launch.py index ba31e8ad..5babd891 100644 --- a/templates/moveit/moveit.launch.py +++ b/templates/moveit/moveit.launch.py @@ -105,7 +105,7 @@ def generate_launch_description(): declared_arguments.append( DeclareLaunchArgument( "description_package", - default_value="myrobot_description", + default_value="$DESCR_PKG_NAME$", description="Package with the robot URDF/XACRO files. \ Usually the argument is not set, it enables use of a custom setup.", ) @@ -113,7 +113,7 @@ def generate_launch_description(): declared_arguments.append( DeclareLaunchArgument( "description_file", - default_value="myrobot.urdf.xacro", + default_value="$ROBOT_NAME$.urdf.xacro", description="URDF/XACRO description file \ Usually the argument is not set, it enables use of a custom setup.", ) @@ -121,7 +121,7 @@ def generate_launch_description(): declared_arguments.append( DeclareLaunchArgument( "moveit_package", - default_value="myrobot_moveit", + default_value="$PKG_NAME$", description="MoveIt config package with robot SRDF/XACRO files. \ Usually the argument is not set, it enables use of a custom setup.", ) @@ -129,7 +129,7 @@ def generate_launch_description(): declared_arguments.append( DeclareLaunchArgument( "semantic_description_file", - default_value="myrobot.srdf.xacro", + default_value="$ROBOT_NAME$.srdf.xacro", description="MoveIt SRDF/XACRO description file with the robot.. \ Usually the argument is not set, it enables use of a custom setup.", ) diff --git a/templates/moveit/moveit.rviz b/templates/moveit/moveit.rviz index 3177bc9a..cadc9425 100644 --- a/templates/moveit/moveit.rviz +++ b/templates/moveit/moveit.rviz @@ -276,7 +276,7 @@ Visualization Manager: Goal State Color: 250; 128; 0 Interactive Marker Size: 0 Joint Violation Color: 255; 0; 255 - Planning Group: my_robot_manipulator + Planning Group: $ROBOT_NAME$_manipulator Query Goal State: true Query Start State: false Show Workspace: false diff --git a/templates/moveit/ompl_planning.yaml b/templates/moveit/ompl_planning.yaml index d198a254..c90d7c9b 100644 --- a/templates/moveit/ompl_planning.yaml +++ b/templates/moveit/ompl_planning.yaml @@ -12,7 +12,7 @@ - default_planning_response_adapters/AddTimeOptimalParameterization - default_planning_response_adapters/ValidateSolution - default_planning_response_adapters/DisplayMotionPath - myrobot_manipulator: + $ROBOT_NAME$_manipulator: planner_configs: SBLkConfigDefault: type: geometric::SBL diff --git a/templates/moveit/robot.srdf.xacro b/templates/moveit/robot.srdf.xacro index 677264bc..27e021fe 100644 --- a/templates/moveit/robot.srdf.xacro +++ b/templates/moveit/robot.srdf.xacro @@ -1,10 +1,10 @@ - + - + - + diff --git a/templates/moveit/robot_macro.srdf.xacro b/templates/moveit/robot_macro.srdf.xacro index 4224afc9..0b01420b 100644 --- a/templates/moveit/robot_macro.srdf.xacro +++ b/templates/moveit/robot_macro.srdf.xacro @@ -1,8 +1,8 @@ - + - + From f96e93476f256bef8d20ab9fef72ad09892892df Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Mon, 8 Apr 2024 09:47:50 +0200 Subject: [PATCH 07/13] add setup-robot-moveit alias, minor refactor --- scripts/_Team_Defines.bash | 2 ++ scripts/setup-robot-moveit.bash | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/_Team_Defines.bash b/scripts/_Team_Defines.bash index f07dc05f..3a2ffba8 100644 --- a/scripts/_Team_Defines.bash +++ b/scripts/_Team_Defines.bash @@ -74,6 +74,8 @@ alias setup-robot-bringup=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/setup-robot-bringup. alias setup-robot-description=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/setup-robot-description.bash +alias setup-robot-moveit=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/setup-robot-moveit.bash + # ros2_control alias ros2_control_setup-hardware-interface-package=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/ros2_control/setup-hardware-interface-package.bash alias ros2_control_setup-controller-package=$RosTeamWS_FRAMEWORK_SCRIPTS_PATH/ros2_control/setup-controller-package.bash diff --git a/scripts/setup-robot-moveit.bash b/scripts/setup-robot-moveit.bash index 3d3c47f8..9d53f81f 100755 --- a/scripts/setup-robot-moveit.bash +++ b/scripts/setup-robot-moveit.bash @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -usage="setup-robot-bringup ROBOT_NAME DESCRIPTION_PKG_NAME" +usage="setup-robot-moveit ROBOT_NAME DESCRIPTION_PKG_NAME" # Load Framework defines script_own_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" @@ -66,7 +66,7 @@ echo -e "${TERMINAL_COLOR_USER_CONFIRMATION}If correct press , otherwise read # Remove include and src folders - in this package should be no source -RM_FOLDERS=("include" "src") +RM_FOLDERS=("src") for FOLDER in "${RM_FOLDERS[@]}"; do if [[ -d $FOLDER && ! "$(ls -A $FOLDER)" ]]; then @@ -95,7 +95,7 @@ cp -n $MOVEIT_TEMPLATES/ompl_planning.yaml $OMPL_PLANNING_CONFIG_YAML ROBOT_SRDF="srdf/${ROBOT_NAME}.srdf.xacro" ROBOT_SRDF_MACRO="srdf/${ROBOT_NAME}_macro.srdf.xacro" cp -n "$MOVEIT_TEMPLATES/robot.srdf.xacro" $ROBOT_SRDF -cp -n "$MOVEIT_TEMPLATES/robot_macro.xacro" $ROBOT_SRDF_MACRO +cp -n "$MOVEIT_TEMPLATES/robot_macro.srdf.xacro" $ROBOT_SRDF_MACRO # Copy launch files @@ -108,7 +108,7 @@ for file_type in "${LAUNCH_FILE_TYPES[@]}"; do done # sed all needed files -FILES_TO_SED=($MOVEIT_LAUNCH $ROBOT_SRDF $ROBOT_SRDF_MACRO) +FILES_TO_SED=($MOVEIT_LAUNCH $ROBOT_SRDF $ROBOT_SRDF_MACRO $MOVE_GROUP_CONFIG_YAML $OMPL_PLANNING_CONFIG_YAML) for SED_FILE in "${FILES_TO_SED[@]}"; do sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE @@ -143,10 +143,9 @@ sed -i "s/$prepend_to_string/install\(\\n DIRECTORY config launch rviz srdf\\n # TODO: Add license checks -# skip compilation, let the user choose which moveit packages to install, as MoveIt introduces +# skip compilation, let the user install MoveIt manually, as it can introduce # breaking changes often. -echo "" -echo -e "${TERMINAL_COLOR_USER_NOTICE}NOTICE: To compile, install the required MoveIt package dependencies manually.${TERMINAL_COLOR_NC}" echo "" -echo -e "${TERMINAL_COLOR_USER_NOTICE}FINISHED: You can test the configuration by executing 'ros2 launch $PKG_NAME moveit.launch${LAUNCH_FILE_TYPES[*]}'${TERMINAL_COLOR_NC}" +echo -e "${TERMINAL_COLOR_USER_NOTICE}FINISHED: You can test the configuration by first launching the ros2_control bringup, followed by +'ros2 launch $PKG_NAME moveit.launch${LAUNCH_FILE_TYPES[*]}'${TERMINAL_COLOR_NC}" From b0cf71ed6985f554f3f3da04d15dd257ca54b359 Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Mon, 8 Apr 2024 09:56:52 +0200 Subject: [PATCH 08/13] remove unecessary files --- templates/moveit/configs_here_ryan | 0 .../robot_srdf_examples.xacro | 47 ------------------- 2 files changed, 47 deletions(-) delete mode 100644 templates/moveit/configs_here_ryan delete mode 100644 templates/robot_description/robot_srdf_examples.xacro diff --git a/templates/moveit/configs_here_ryan b/templates/moveit/configs_here_ryan deleted file mode 100644 index e69de29b..00000000 diff --git a/templates/robot_description/robot_srdf_examples.xacro b/templates/robot_description/robot_srdf_examples.xacro deleted file mode 100644 index 8a7ef973..00000000 --- a/templates/robot_description/robot_srdf_examples.xacro +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TBA - - From 0a43ebdea8ca2a60a0af431e53304997247659f0 Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Mon, 8 Apr 2024 10:54:35 +0200 Subject: [PATCH 09/13] add .xml launch file --- scripts/setup-robot-moveit.bash | 14 +++--- templates/moveit/moveit.launch.py | 4 +- templates/moveit/moveit.launch.xml | 64 +++++++++++++++++++++++++ templates/moveit/robot_macro.srdf.xacro | 14 +++--- 4 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 templates/moveit/moveit.launch.xml diff --git a/scripts/setup-robot-moveit.bash b/scripts/setup-robot-moveit.bash index 9d53f81f..4937b7f7 100755 --- a/scripts/setup-robot-moveit.bash +++ b/scripts/setup-robot-moveit.bash @@ -105,15 +105,15 @@ for file_type in "${LAUNCH_FILE_TYPES[@]}"; do # Copy the templates to the destination with the specified file type cp -n "$MOVEIT_TEMPLATES/moveit.launch${file_type}" "${MOVEIT_LAUNCH}" -done -# sed all needed files -FILES_TO_SED=($MOVEIT_LAUNCH $ROBOT_SRDF $ROBOT_SRDF_MACRO $MOVE_GROUP_CONFIG_YAML $OMPL_PLANNING_CONFIG_YAML) + # sed all needed files + FILES_TO_SED=($MOVEIT_LAUNCH $ROBOT_SRDF $ROBOT_SRDF_MACRO $MOVE_GROUP_CONFIG_YAML $OMPL_PLANNING_CONFIG_YAML) -for SED_FILE in "${FILES_TO_SED[@]}"; do - sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE - sed -i "s/\\\$ROBOT_NAME\\\$/${ROBOT_NAME}/g" $SED_FILE - sed -i "s/\\\$DESCR_PKG_NAME\\\$/${DESCR_PKG_NAME}/g" $SED_FILE + for SED_FILE in "${FILES_TO_SED[@]}"; do + sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE + sed -i "s/\\\$ROBOT_NAME\\\$/${ROBOT_NAME}/g" $SED_FILE + sed -i "s/\\\$DESCR_PKG_NAME\\\$/${DESCR_PKG_NAME}/g" $SED_FILE + done done # package.xml: Add dependencies if they not exist diff --git a/templates/moveit/moveit.launch.py b/templates/moveit/moveit.launch.py index 5babd891..fde3701c 100644 --- a/templates/moveit/moveit.launch.py +++ b/templates/moveit/moveit.launch.py @@ -130,7 +130,7 @@ def generate_launch_description(): DeclareLaunchArgument( "semantic_description_file", default_value="$ROBOT_NAME$.srdf.xacro", - description="MoveIt SRDF/XACRO description file with the robot.. \ + description="MoveIt SRDF/XACRO description file with the robot. \ Usually the argument is not set, it enables use of a custom setup.", ) ) @@ -170,7 +170,7 @@ def generate_launch_description(): "severity", default_value="INFO", choices=["INFO", "WARN", "ERROR", "DEBUG", "FATAL"], - description="Logging level for the nodes", + description="Logging level for the nodes.", ) ) diff --git a/templates/moveit/moveit.launch.xml b/templates/moveit/moveit.launch.xml new file mode 100644 index 00000000..6bc259c4 --- /dev/null +++ b/templates/moveit/moveit.launch.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/moveit/robot_macro.srdf.xacro b/templates/moveit/robot_macro.srdf.xacro index 0b01420b..d8036b79 100644 --- a/templates/moveit/robot_macro.srdf.xacro +++ b/templates/moveit/robot_macro.srdf.xacro @@ -1,16 +1,16 @@ - + - - - - - - + + + + + From 955ed20946f7b45b7eadf348d5961d216e5f05af Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Mon, 8 Apr 2024 11:14:57 +0200 Subject: [PATCH 10/13] add README.md instructions --- scripts/setup-robot-moveit.bash | 7 +++- templates/moveit/append_to_MAIN_README.md | 15 ++++++++ templates/moveit/append_to_README.md | 44 +++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 templates/moveit/append_to_MAIN_README.md create mode 100644 templates/moveit/append_to_README.md diff --git a/scripts/setup-robot-moveit.bash b/scripts/setup-robot-moveit.bash index 4937b7f7..38ce3938 100755 --- a/scripts/setup-robot-moveit.bash +++ b/scripts/setup-robot-moveit.bash @@ -139,7 +139,12 @@ done prepend_to_string="if(BUILD_TESTING)" sed -i "s/$prepend_to_string/install\(\\n DIRECTORY config launch rviz srdf\\n DESTINATION share\/\$\{PROJECT_NAME\}\\n\)\\n\\n$prepend_to_string/g" CMakeLists.txt -# TODO: add README with general instructions +# extend README with general instructions +if [ -f README.md ]; then + cat $MOVEIT_TEMPLATES/append_to_README.md >>README.md + sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" README.md + sed -i "s/\\\$ROBOT_NAME\\\$/${ROBOT_NAME}/g" README.md +fi # TODO: Add license checks diff --git a/templates/moveit/append_to_MAIN_README.md b/templates/moveit/append_to_MAIN_README.md new file mode 100644 index 00000000..031fa4af --- /dev/null +++ b/templates/moveit/append_to_MAIN_README.md @@ -0,0 +1,15 @@ + + +## Moving the robot using MoveIt2 +> **NOTE:** If you are not familiar with MoveIt2, check the docs for some [useful examples](https://moveit.picknik.ai/main/doc/tutorials/getting_started/getting_started.html) + +To move the robot using Moveit2, we first bring up the robot with the mock hardware enabled: +``` +ros2 launch $ROBOT_NAME$.launch.xml use_mock_hardware:=true +``` + +After that, in another terminal we launch MoveIt2: +``` +ros2 launch $ROBOT_NAME$_moveit moveit.launch.xml +``` +Now we can use the `MotionPlanning` widget in `rviz2` to assign goals, plan and execute motions. diff --git a/templates/moveit/append_to_README.md b/templates/moveit/append_to_README.md new file mode 100644 index 00000000..a21e9801 --- /dev/null +++ b/templates/moveit/append_to_README.md @@ -0,0 +1,44 @@ + + +## General details about robot MoveIt2 packages + +A moveit package holds config and launch files for robotic manipulation using MoveIt2. +It builds on description and bringup packages generated by `setup-robot-description` and `setup-robot-bringup`. + +The general package structure is the following: + +``` +$PKG_NAME$/ # Launch and config files for robot manipulation using MoveIt +├── [CMakeLists.txt] # if ament_cmake is used (recommended) +├── package.xml +├── [setup.py] # if ament_python is used +├── [setup.cfg] # if ament_python is used +├── config/ +│ ├── move_group.yaml # Various configuration needed for move_group_node: controllers, kinematics, action execution... +│ ├── _planning.yaml # Specific planner configuration. Default is OMPL +└── launch/ + ├── moveit.launch.py # MoveIt launch file. +└── srdf/ + ├── $ROBOT_NAME$_macro.srdf.xacro # Semantic robot description macro + ├── $ROBOT_NAME$.srdf.xacro # Semantic robot description required for MoveIt. +└── rviz/ + ├── moveit.launch.py # RViZ config with MoveIt MotionPlanning widget. + +``` +## Compiling the package + +To sucessfuly compile and run this package, it is necessary to install `MoveIt`. For a simple binary install, [follow the official guide](https://moveit.ros.org/install-moveit2/binary/) + +## Moving the *mock_robot* using MoveIt2 + +1. Start robot's hardware and load controllers (default configuration starts mock hardware) + ``` + ros2 launch $ROBOT_NAME$.launch.xml + ``` + +2. Open another terminal and launch MoveIt + ``` + ros2 launch $ROBOT_NAME$_moveit moveit.launch.xml + ``` + +3. You should now be able to use `MotionPlanning` widget in `rviz2` to assign, plan and execute robot motion. From 6120c057d0fd75bd11acea0215e2729f105fac69 Mon Sep 17 00:00:00 2001 From: Nibanovic Date: Mon, 8 Apr 2024 11:17:33 +0200 Subject: [PATCH 11/13] add licenses --- templates/moveit/move_group.yaml | 16 ++++++++++++++++ templates/moveit/moveit.launch.py | 16 ++++++++++++++++ templates/moveit/ompl_planning.yaml | 16 ++++++++++++++++ templates/moveit/robot.srdf.xacro | 18 ++++++++++++++++++ templates/moveit/robot_macro.srdf.xacro | 18 ++++++++++++++++++ 5 files changed, 84 insertions(+) diff --git a/templates/moveit/move_group.yaml b/templates/moveit/move_group.yaml index 908d6532..045b3dd2 100644 --- a/templates/moveit/move_group.yaml +++ b/templates/moveit/move_group.yaml @@ -1,3 +1,19 @@ +# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Source of this file are templates in https://github.com/StoglRobotics/ros_team_workspace repository. + /**: ros__parameters: #-------- Moveit controllers diff --git a/templates/moveit/moveit.launch.py b/templates/moveit/moveit.launch.py index fde3701c..a05690b4 100644 --- a/templates/moveit/moveit.launch.py +++ b/templates/moveit/moveit.launch.py @@ -1,3 +1,19 @@ +# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Source of this file are templates in https://github.com/StoglRobotics/ros_team_workspace repository. + from launch.actions import DeclareLaunchArgument from launch.substitutions import Command, FindExecutable, LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node diff --git a/templates/moveit/ompl_planning.yaml b/templates/moveit/ompl_planning.yaml index c90d7c9b..307533a9 100644 --- a/templates/moveit/ompl_planning.yaml +++ b/templates/moveit/ompl_planning.yaml @@ -1,3 +1,19 @@ +# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Source of this file are templates in https://github.com/StoglRobotics/ros_team_workspace repository. + /**: ros__parameters: move_group: diff --git a/templates/moveit/robot.srdf.xacro b/templates/moveit/robot.srdf.xacro index 27e021fe..1aadb143 100644 --- a/templates/moveit/robot.srdf.xacro +++ b/templates/moveit/robot.srdf.xacro @@ -1,3 +1,21 @@ + + diff --git a/templates/moveit/robot_macro.srdf.xacro b/templates/moveit/robot_macro.srdf.xacro index d8036b79..22cefd28 100644 --- a/templates/moveit/robot_macro.srdf.xacro +++ b/templates/moveit/robot_macro.srdf.xacro @@ -1,3 +1,21 @@ + + From f0b78b1fa2f4f66ae53d3d1eb3de30f387ccce28 Mon Sep 17 00:00:00 2001 From: riyan-jose Date: Mon, 29 Apr 2024 14:42:44 +0200 Subject: [PATCH 12/13] updated and fixed ompl planning template --- templates/moveit/ompl_planning.yaml | 228 ++++++++++++++++++++-------- 1 file changed, 166 insertions(+), 62 deletions(-) diff --git a/templates/moveit/ompl_planning.yaml b/templates/moveit/ompl_planning.yaml index 307533a9..29bb8b66 100644 --- a/templates/moveit/ompl_planning.yaml +++ b/templates/moveit/ompl_planning.yaml @@ -1,23 +1,25 @@ # Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# # Source of this file are templates in https://github.com/StoglRobotics/ros_team_workspace repository. /**: ros__parameters: - move_group: - planning_plugins: + planning_pipelines: + - ompl + ompl: + planning_plugins: - ompl_interface/OMPLPlanner request_adapters: - default_planning_request_adapters/ResolveConstraintFrames @@ -28,61 +30,163 @@ - default_planning_response_adapters/AddTimeOptimalParameterization - default_planning_response_adapters/ValidateSolution - default_planning_response_adapters/DisplayMotionPath + planner_configs: + AnytimePathShortening: + type: geometric::AnytimePathShortening + shortcut: true # Attempt to shortcut all new solution paths + hybridize: true # Compute hybrid solution trajectories + max_hybrid_paths: 24 # Number of hybrid paths generated per iteration + num_planners: 4 # The number of default planners to use for planning + planners: "" # A comma-separated list of planner types (e.g., "PRM,EST,RRTConnect"Optionally, planner parameters can be passed to change the default:"PRM[max_nearest_neighbors=5],EST[goal_bias=.5],RRT[range=10. goal_bias=.1]" + SBL: + type: geometric::SBL + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + EST: + type: geometric::EST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0 setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + LBKPIECE: + type: geometric::LBKPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + BKPIECE: + type: geometric::BKPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 + failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + KPIECE: + type: geometric::KPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 (0.0,1.] + failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + RRT: + type: geometric::RRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + RRTConnect: + type: geometric::RRTConnect + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + longest_valid_segment_fraction: 0.5 + RRTstar: + type: geometric::RRTstar + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + delay_collision_checking: 1 # Stop collision checking as soon as C-free parent found. default 1 + TRRT: + type: geometric::TRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + max_states_failed: 10 # when to start increasing temp. default: 10 + temp_change_factor: 2.0 # how much to increase or decrease temp. default: 2.0 + min_temperature: 10e-10 # lower limit of temp change. default: 10e-10 + init_temperature: 10e-6 # initial temperature. default: 10e-6 + frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() + frountierNodeRatio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 + k_constant: 0.0 # value used to normalize expression. default: 0.0 set in setup() + PRM: + type: geometric::PRM + max_nearest_neighbors: 10 # use k nearest neighbors. default: 10 + PRMstar: + type: geometric::PRMstar + FMT: + type: geometric::FMT + num_samples: 1000 # number of states that the planner should sample. default: 1000 + radius_multiplier: 1.1 # multiplier used for the nearest neighbors search radius. default: 1.1 + nearest_k: 1 # use Knearest strategy. default: 1 + cache_cc: 1 # use collision checking cache. default: 1 + heuristics: 0 # activate cost to go heuristics. default: 0 + extended_fmt: 1 # activate the extended FMT*: adding new samples if planner does not finish successfully. default: 1 + BFMT: + type: geometric::BFMT + num_samples: 1000 # number of states that the planner should sample. default: 1000 + radius_multiplier: 1.0 # multiplier used for the nearest neighbors search radius. default: 1.0 + nearest_k: 1 # use the Knearest strategy. default: 1 + balanced: 0 # exploration strategy: balanced true expands one tree every iteration. False will select the tree with lowest maximum cost to go. default: 1 + optimality: 1 # termination strategy: optimality true finishes when the best possible path is found. Otherwise, the algorithm will finish when the first feasible path is found. default: 1 + heuristics: 1 # activates cost to go heuristics. default: 1 + cache_cc: 1 # use the collision checking cache. default: 1 + extended_fmt: 1 # Activates the extended FMT*: adding new samples if planner does not finish successfully. default: 1 + PDST: + type: geometric::PDST + STRIDE: + type: geometric::STRIDE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + use_projected_distance: 0 # whether nearest neighbors are computed based on distances in a projection of the state rather distances in the state space itself. default: 0 + degree: 16 # desired degree of a node in the Geometric Near-neightbor Access Tree (GNAT). default: 16 + max_degree: 18 # max degree of a node in the GNAT. default: 12 + min_degree: 12 # min degree of a node in the GNAT. default: 12 + max_pts_per_leaf: 6 # max points per leaf in the GNAT. default: 6 + estimated_dimension: 0.0 # estimated dimension of the free space. default: 0.0 + min_valid_path_fraction: 0.2 # Accept partially valid moves above fraction. default: 0.2 + BiTRRT: + type: geometric::BiTRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + temp_change_factor: 0.1 # how much to increase or decrease temp. default: 0.1 + init_temperature: 100 # initial temperature. default: 100 + frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() + frountier_node_ratio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 + cost_threshold: 1e300 # the cost threshold. Any motion cost that is not better will not be expanded. default: inf + LBTRRT: + type: geometric::LBTRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + epsilon: 0.4 # optimality approximation factor. default: 0.4 + BiEST: + type: geometric::BiEST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + ProjEST: + type: geometric::ProjEST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + LazyPRM: + type: geometric::LazyPRM + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + LazyPRMstar: + type: geometric::LazyPRMstar + SPARS: + type: geometric::SPARS + stretch_factor: 3.0 # roadmap spanner stretch factor. multiplicative upper bound on path quality. It does not make sense to make this parameter more than 3. default: 3.0 + sparse_delta_fraction: 0.25 # delta fraction for connection distance. This value represents the visibility range of sparse samples. default: 0.25 + dense_delta_fraction: 0.001 # delta fraction for interface detection. default: 0.001 + max_failures: 1000 # maximum consecutive failure limit. default: 1000 + SPARStwo: + type: geometric::SPARStwo + stretch_factor: 3.0 # roadmap spanner stretch factor. multiplicative upper bound on path quality. It does not make sense to make this parameter more than 3. default: 3.0 + sparse_delta_fraction: 0.25 # delta fraction for connection distance. This value represents the visibility range of sparse samples. default: 0.25 + dense_delta_fraction: 0.001 # delta fraction for interface detection. default: 0.001 + max_failures: 5000 # maximum consecutive failure limit. default: 5000 $ROBOT_NAME$_manipulator: + # projection_evaluator: joints(joint_s,joint_l) + longest_valid_segment_fraction: 0.005 + default_planner_config: RRTConnect + default_workspace_bounds: 100 planner_configs: - SBLkConfigDefault: - type: geometric::SBL - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - ESTkConfigDefault: - type: geometric::EST - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0 setup() - goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 - LBKPIECEkConfigDefault: - type: geometric::LBKPIECE - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 - min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 - BKPIECEkConfigDefault: - type: geometric::BKPIECE - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 - failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 - min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 - KPIECEkConfigDefault: - type: geometric::KPIECE - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 - border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 (0.0,1.] - failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 - min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 - RRTkConfigDefault: - type: geometric::RRT - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 - RRTConnectkConfigDefault: - type: geometric::RRTConnect - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - RRTstarkConfigDefault: - type: geometric::RRTstar - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 - delay_collision_checking: 1 # Stop collision checking as soon as C-free parent found. default 1 - TRRTkConfigDefault: - type: geometric::TRRT - range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() - goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 - max_states_failed: 10 # when to start increasing temp. default: 10 - temp_change_factor: 2.0 # how much to increase or decrease temp. default: 2.0 - min_temperature: 10e-10 # lower limit of temp change. default: 10e-10 - init_temperature: 10e-6 # initial temperature. default: 10e-6 - frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() - frountierNodeRatio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 - k_constant: 0.0 # value used to normalize expression. default: 0.0 set in setup() - PRMkConfigDefault: - type: geometric::PRM - max_nearest_neighbors: 10 # use k nearest neighbors. default: 10 - PRMstarkConfigDefault: - type: geometric::PRMstar - ##Note: commenting the following line lets moveit chose RRTConnect as default planner rather than LBKPIECE - #projection_evaluator: joints(shoulder_pan_joint,shoulder_lift_joint) - longest_valid_segment_fraction: 0.01 \ No newline at end of file + - AnytimePathShortening + - SBL + - EST + - LBKPIECE + - BKPIECE + - KPIECE + - RRT + - RRTConnect + - RRTstar + - TRRT + - PRM + - PRMstar + - FMT + - BFMT + - PDST + - STRIDE + - BiTRRT + - LBTRRT + - BiEST + - ProjEST + - LazyPRM + - LazyPRMstar + - SPARS + - SPARStwo From d1bc722af6536d65541a012120e6ab7f79d5b638 Mon Sep 17 00:00:00 2001 From: Nikola Banovic Date: Tue, 28 May 2024 11:51:09 +0200 Subject: [PATCH 13/13] put xml version tag first in .xacro files --- templates/moveit/robot.srdf.xacro | 3 +-- templates/moveit/robot_macro.srdf.xacro | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/moveit/robot.srdf.xacro b/templates/moveit/robot.srdf.xacro index 1aadb143..fc5e9dcd 100644 --- a/templates/moveit/robot.srdf.xacro +++ b/templates/moveit/robot.srdf.xacro @@ -1,3 +1,4 @@ + - - diff --git a/templates/moveit/robot_macro.srdf.xacro b/templates/moveit/robot_macro.srdf.xacro index 22cefd28..893d2b6d 100644 --- a/templates/moveit/robot_macro.srdf.xacro +++ b/templates/moveit/robot_macro.srdf.xacro @@ -1,3 +1,4 @@ + - -