Ros2 launch moveit2_scripts test_trajectory.launch.py launch file not found

Hi, I have followed all steps and created all the new packages and checked every file but still getting the same issue where it says that the launch file cannot be located. This is the first exercise of section 3 -ROS2 Motion Planning with C++

Package ‘moveit2_scripts’ not found: “package ‘moveit2_scripts’ not found, searching: [‘/home/simulations/ros2_sims_ws/install/ur_simulation_gazebo’, ‘/home/simulations/ros2_sims_ws/install/ur3e_moveit_config’, ‘/home/simulations/ros2_sims_ws/install/test_moveit_config’, ‘/home/simulations/ros2_sims_ws/install/ur_description’, ‘/home/simulations/ros2_sims_ws/install/the_construct_office_gazebo’, ‘/home/simulations/ros2_sims_ws/install/ros_testing’, ‘/home/simulations/ros2_sims_ws/install/ros2test’, ‘/home/simulations/ros2_sims_ws/install/robotnik_sensors_gazebo’, ‘/home/simulations/ros2_sims_ws/install/robotnik_sensors’, ‘/home/simulations/ros2_sims_ws/install/robotiq_85_gripper’, ‘/home/simulations/ros2_sims_ws/install/robotiq_85_driver’, ‘/home/simulations/ros2_sims_ws/install/robotiq_85_msgs’, ‘/home/simulations/ros2_sims_ws/install/robotiq_85_description’, ‘/home/simulations/ros2_sims_ws/install/rg2_gripper_description’, ‘/home/simulations/ros2_sims_ws/install/gazebo_grasp_plugin_ros’, ‘/home/simulations/ros2_sims_ws/install/gazebo_grasp_plugin’, ‘/home/simulations/ros2_sims_ws/install/gazebo_version_helpers’, ‘/home/simulations/ros2_sims_ws/install/gazebo_ros2_control_demos’, ‘/home/simulations/ros2_sims_ws/install/gazebo_ros2_control’, ‘/home/user/ros2_ws/install/my_moveit2_config’, ‘/home/user/ros2_ws/install/ur_description’, ‘/home/user/ros2_ws/install/robotnik_sensors_gazebo’, ‘/home/user/ros2_ws/install/robotnik_sensors’, ‘/home/user/ros2_ws/install/robotiq_85_gripper’, ‘/home/user/ros2_ws/install/robotiq_85_driver’, ‘/home/user/ros2_ws/install/robotiq_85_msgs’, ‘/home/user/ros2_ws/install/robotiq_85_description’, ‘/opt/ros/humble’]”

I have one more question regarding the same exercise. Whenever I paste the provided code for the test_trajectory2.cpp or I type anything in the .cpp file the file gets errors. Am I not supposed to paste the code and just launch the .py file as we did with the previous step? From what I understood in the first section is that we are generating this code for the test_trajectory.cpp file through the .py file. However in the second section when we are testing the manipulator trajectory it says on the exercise to copy the code from the snippet provided below and that is a c++ code that it is supposed to go inside the test_trajectory2.cpp but everytime I paste the code inside that file I get errors as shown in the screenshot. Could anyone explain me what I am doing wrong or why this is happening? Thanks.

The issue with the first question seems to be solved now. I do not know what changed but my arm is now planning on rviz when I execute the code in the shell. However I still encounter the same issue of not being able to add code in the .cpp files. And this is not allowing me to advance with the exercise as from my understanding I need to paste the code provided for test_trajectory2.cpp into the file to continue with the gripper planning.

A more close up look of the code error.

Hello @tumoney84 ,

As I told you in the other post, you can just ignore these errors that are shown in the code editor.

1 Like

Thanks for your help

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.