I am trying to move the robot in webots through moveit. I have created planner.launch.py file which launches all the nodes along with moveit. When I run it I get planning pipeline not defined issue and the nodes craash.But I have defined planning pipeline in my code as per :https://github.com/cyberbotics/webots_ros2/blob/master/webots_ros2_universal_robot/resource/moveit_movegroup.yaml.Current ROS version I am using is ROS2 Jazzy.What could be the reason for this error? How can I resolve this error?
"""Launch Webots Robot simulation nodes with MoveIt2.""" import os import pathlib import yaml from launch.actions import IncludeLaunchDescription, LogInfo from launch.launch_description_sources import PythonLaunchDescriptionSource from launch import LaunchDescription from launch_ros.actions import Node from ament_index_python.packages import get_package_share_directory, get_packages_with_prefixes PACKAGE_NAME = 'ros_webots_pkg' def generate_launch_description(): launch_description_nodes = [] package_dir = get_package_share_directory(PACKAGE_NAME) panda_config = get_package_share_directory("panda_moveit_config") def load_file(filename): return pathlib.Path(os.path.join(package_dir, 'resources', filename)).read_text() def load_config_file(filename): return pathlib.Path(os.path.join(panda_config, 'config', filename)).read_text() def load_yaml(filename): return yaml.safe_load(load_config_file(filename)) # Check if moveit is installed if 'moveit' in get_packages_with_prefixes(): # Webots simulation with robot launch_description_nodes.append( IncludeLaunchDescription( PythonLaunchDescriptionSource(os.path.join(package_dir, 'launch', 'panda_robot.launch.py')) ) ) # Configuration description = {'robot_description': load_file('panda.urdf')} description_semantic = {'robot_description_semantic': load_config_file('panda.srdf')} description_kinematics = {'robot_description_kinematics': load_yaml('kinematics.yaml')} sim_time = {'use_sim_time': True} # Rviz node rviz_config_file = os.path.join(package_dir, 'resources', 'moveit_visualization.rviz') launch_description_nodes.append( Node( package='rviz2', executable='rviz2', name='rviz2', arguments=['-d', rviz_config_file], parameters=[ description, description_semantic, description_kinematics, sim_time ], ) ) # MoveIt2 node movegroup = {'move_group': load_yaml('moveit_movegroup.yaml')} moveit_controllers = { 'moveit_controller_manager': 'moveit_simple_controller_manager/MoveItSimpleControllerManager', 'moveit_simple_controller_manager': load_yaml('moveit_controllers.yaml') } launch_description_nodes.append( Node( package='moveit_ros_move_group', executable='move_group', output='screen', parameters=[ description, description_semantic, description_kinematics, moveit_controllers, movegroup, sim_time ], remappings=[('/joint_states', '/panda/joint_states')] ) ) else: launch_description_nodes.append(LogInfo(msg='"moveit" package is not installed, \ please install it in order to run this demo.')) return LaunchDescription(launch_description_nodes) 
