In an attempt to make this tutorial a little more comprehensive and shed some light as to the different components of MoveIt, we have provided a minimal amount of files taken from the Niryo ROS Stack repo to successfully complete a pick-and-place task.
NOTE: The flow of which launch files call other launch files was not changed so that the workflow here would still resemble that of the original Niryo One repo even though some of the lines and arguments have been removed or changed.
demo.launch
Single launch file for all MoveIt and Niryo requirements for the pick-and-place tutorial.
- Loads
niryo_one_base.launchwhile passing inurdf_without_meshesargument set to false - Loads
controllers.launchwithsimulation_modeset to true - Loads
move_group.launch - Set rosparam
move_group/trajectory_execution/execution_duration_monitoringto false - Set rosparam
/move_group/trajectory_execution/allowed_start_toleranceto 0.0 - Set rosparam
/move_group/start_state_max_bounds_errorto 0.3
controllers.launch
Starts the Niryo One driver, controller manager, and robot state publisher nodes
-
Starts ROS node
niryo_one_driverwith debugging arguments- Loads
niryo_one_driver.yamlinto rosparam
- Loads
-
Loads
niryo_one_controllers.yamlinto rosparam -
Starts ROS node
controller_managerwith argumentsjoint_state_controller niryo_one_follow_joint_trajectory_controller --shutdown-timeout 1 -
Starts ROS node
robot_state_publisherpackage.- Ex.
rosrun robot_state_publisher robot_state_publisher
- Ex.
move_group.launch
Starts the Move Group node which is the entry point into using MoveIt. Also calls planning pipeline, planning context, and trajectory execution to load their relevant parameters.
-
Call
planning_pipeline.launch.xmlwithpipelineargument set toompl -
Call
trajectory_execution.launch.xmlwith arguments:moveit_manage_controllersset to truemoveit_controller_managerset toniryo_one
-
Call
planning_context.launch -
Start ROS node
moveit_ros_move_group- Set rosparam
allow_trajectory_executionto true - Set rosparam
max_safe_path_costto 1 - Set rosparam
jiggle_fractionto 0.05 - Set rosparam
planning_scene_monitor/publish_planning_sceneto true - Set rosparam
planning_scene_monitor/publish_geometry_updatesto true - Set rosparam
planning_scene_monitor/publish_state_updatesto true - Set rosparam
planning_scene_monitor/publish_transforms_updatesto true
- Set rosparam
niryo_one_base.launch
Loads the Niryo One URDF with accompanying parameters for command validation, service timeouts, and motor groupings
-
Sets rosparams
hardware_versionto 2 andreboot_when_auto_change_version. to true forniryo_onenamespace -
Loads
robot_command_validation.yamlinto rosparams for namespaceniryo_one/robot_command_validation -
Load the
niryo_one_motors.yamlandstepper_params.yamlfiles as rosparams forniryo_one/motorsnamespace -
Sets rosparams
service_timeoutto 2,action_connection_timeoutto 2,action_execute_timeoutto 15, andaction_preempt_timeoutto 3 forniryo_one/python_apinamespace -
Sets rosparams
rate_tf_listenerto 5.0 andrate_publish_stateto 5.0 forniryo_one/robot_statenamespace -
Loads
niryo_one_urdf.xacroas rosparamsrobot_descriptionandrobot_description_tf2
niryo_one_moveit_controller_manager.launch.xml
Set controllers available to MoveIt
-
Sets rosparam
moveit_controller_managertomoveit_simple_controller_manager/MoveItSimpleControllerManager -
Reads
controllers.yamlinto rosparam
ompl_planning_pipeline.launch.xml
Sets ROS params and topics for OMPL pipeline communication
-
Set rosparam
planning_pluginwith value ofompl_interface/OMPLPlanner -
Set rosparam
planning_adapterswith value of:default_planner_request_adapters/AddTimeParameterization default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints -
Set rosparam
start_state_max_bounds_errorwith value of 0.1 -
Load
ompl_planning.yamlas rosparam
planning_context.launch
Loads config files required for the joints of the Niryo One.
- Argument
load_robot_descriptiondefaults to false - Load
kinematics.yamlas rosparam with namespacerobot_description_kinematics - Load
joint_limits.yamlas rosparam with namespacerobot_description_planning - Load
niryo_one.srdfasrobot_description_semanticrosparam - Load
niryo_one.urdf.xacroasrobot_descriptionrosparam if argumentload_robot_descriptionis true
planning_pipeline.launch.xml
Calls for OMPL pipeline launch
- Argument
pipelinedefaults toompl - Launch
ompl_planning_pipeline.launch.xmlusingpipelineargument in name
trajectory_execution.launch.xml
Sets ROS params required for trajectory execution and then calls controller manager launch
- Sets rosparam
moveit_manage_controllersto true - Sets rosparam
trajectory_execution/allowed_execution_duration_scalingto 1.2 - Sets rosparam
trajectory_execution/allowed_goal_duration_marginto 0.5 - Sets rosparam
trajectory_execution/allowed_start_toleranceto 0.0 - Loads
niryo_moveit_controller_manager.launch.xml
controllers.yaml
- List of robot controllers available to MoveIt.
joint_limits.yaml
- Velocity and acceleration limits for individual joints on robot used when planning a trajectory that is time constrained.
kinematics.yaml
- File generated by MoveIt Setup Assistant and contains parameters for kinematic solvers in MoveIt.
- MoveIt Documentation
niryo_one.srdf
- Defines joint groups, group states, and disables collisions between joints and links that are impossible to collide.
- MoveIt SRDF Documentation
niryo_one_controllers.yaml
- Ties
niryo_one_follow_joint_trajectory_controllerto thecontroller_managernode
niryo_one_driver.yaml
- Settings for communication with Niryo One motors
- Ex. Read/Write/Check frequencies
niryo_one_motors.yaml
- Groups the different Niryo One motors
ompl_planning.yaml
- Settings required for OMPL trajectory planning.
- MoveIt OMPL Documentation
robot_command_validation.yaml
- Settings for minimum and maximum joint rotations as wel as gripper speed
stepper_params.yaml
- Settings for stepper motors like gear ratios and direction values.