Run the Object Detection Node Directly
Execute the object detection node directly using ros2 run when you want to launch the node without a launch file. You will need to configure parameters separately.
You can run the object detection node without the launch file by using the ros2 run command. This will start the node with whatever parameters are compiled into the node or passed via the parameter server. If you need to override parameters (such as the model path or confidence threshold), it is simpler to use the launch file with custom arguments. Running the node directly can be useful for debugging or when integrating into another launch system.
bash
ros2 run obj_detect object_detector