Roslaunch is not working project part1

When I try to launch the turtlebot3_move _sub_pub.cpp I get this error :

[controller-1] process has died [pid 2796, exit code -11, cmd /home/user/catkin_ws/devel/lib/turtlebot3_move/turtlebot3_sub_pub __name:=controller __log:=/home/user/.ros/log/97c8319e-6c89-11ec-9cd3-0242c0a88007/controller-1.log].
log file: /home/user/.ros/log/97c8319e-6c89-11ec-9cd3-0242c0a88007/controller-1*.log

If I uses roscore + rosrun:

/home/user/catkin_ws/src/turtlebot3_move/src/turtlebot3_sub_pub.cpp: line 7: geometry_msgs::Twist: command not found
/home/user/catkin_ws/src/turtlebot3_move/src/turtlebot3_sub_pub.cpp: line 8: //: Is a directory
/home/user/catkin_ws/src/turtlebot3_move/src/turtlebot3_sub_pub.cpp: line 9: float: No such file or directory
/home/user/catkin_ws/src/turtlebot3_move/src/turtlebot3_sub_pub.cpp: line 11: syntax error near unexpected token `('
/home/user/catkin_ws/src/turtlebot3_move/src/turtlebot3_sub_pub.cpp: line 11: `void laserScanCallback(const sensor_msgs::LaserScan::ConstPtr &msg) {'


You shouldn’t be working on the course while inside of the rosject. The rosject is a separate environment once you are ready to do the project. If you are in the rosject, then you should have the simulation running with:

roslaunch realrobotlab main.launch

before running any nodes. The course always has a simulation runnint, the rosject doesn’t.

Can you share more information about your issue? it seems like your file is not structured correctly. What do you have above line 7?

Have you made the file executable and properly compiled the package it is in? Make sure you complete the unit and have an understanding of the work preceding running your node