This guide provides step-by-step instructions for setting up and running the Video Publisher project in a ROS Node. Follow these steps to ensure proper setup and execution.
-
Clean the Build Environment
- Navigate to the main project directory and remove the
build
anddevel
directories if they exist:rm -r build devel
- Navigate to the main project directory and remove the
-
Configure Video Path
- Update the video path in the
video_playback.launch
file located at/src/image_publisher/launch
with the path to your.h264
video file.
- Update the video path in the
-
Build the Project
- In the main folder, build the project using the
catkin_make
command:catkin_make
- In the main folder, build the project using the
-
Source Setup Script
- Source the environment setup script to update your environment:
source devel/setup.bash
- Source the environment setup script to update your environment:
-
Launch Video Playback
- Change directory to where
video_playback.launch
is located and launch the video playback:cd src/image_publisher/launch roslaunch video_playback.launch
- Change directory to where
-
Verify Video Publishing
- Check if the video is being published successfully:
rostopic list
- Check if the video is being published successfully:
-
Restart ROS Core
- If needed, terminate the
roslaunch
, startroscore
first, and then repeat the video playback launch:roslaunch video_playback.launch
- If needed, terminate the
-
Camera Calibration
- Run the camera calibration tool:
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.03 image:=/cam0/image_raw
- Run the camera calibration tool: