# racecar_ws **Repository Path**: robot_workspace/racecar_ws ## Basic Information - **Project Name**: racecar_ws - **Description**: racecar 开源项目,修改使用仿真测试 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-20 - **Last Updated**: 2025-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # racecar_ws explain Gazebo 3D simulator example of ROS tutorials (version: melodic) Tested on Ubuntu 18.04 ## Getting Started ### Save the world map 1. git clone ```bash git clone https://git.toluckykoi.com/ROS_Robot/racecar_ws.git ``` 2. Dependencies and build ```bash cd racecar_ws ./src/racecar_gazebo/scripts/install_for_env.sh catkin_make ``` 3. Start the gazebo map ```bash roslaunch racecar_gazebo racecar_runway.launch ``` ![1](https://user-images.githubusercontent.com/26653172/170944302-b99881db-936f-4168-bba8-6378350f2b26.png) You should download the gazebo models or the map won't work. ```bash git clone https://git.toluckykoi.com/ROS_Robot/gazebo_models.git ~/.gazebo/models ``` 4. Open a new terminal and start rviz ```bash roslaunch racecar_gazebo slam_gmapping.launch ``` Control the car with WASD keys and draw the whole map. ![2](https://user-images.githubusercontent.com/26653172/170944385-2b7a32f2-0e87-47d5-8b5c-52874e1bd9e4.png) 5. Save the map ```bash rosrun map_server map_saver -f ~/racecar_ws/src/racecar/racecar_gazebo/map/map_runway ``` ### Path planning and automatic navigation 1. Start navigation and the gazebo map ```bash roslaunch racecar_gazebo racecar_runway_navigation.launch ``` 2. Start rviz ```bash roslaunch racecar_gazebo racecar_rviz.launch ``` ![3](https://user-images.githubusercontent.com/26653172/170944487-3984d093-f43e-429a-95ac-0cd4114e5fc1.png) 3. Click `2D Nav Goal` then click the goal on the rviz map (hold down the cursor to set the goal pose) 4. Start the navigation script ```bash rosrun racecar_gazebo path_pursuit.py ``` ![4](https://user-images.githubusercontent.com/26653172/170944551-d4fa12c8-7ea1-4af8-9c7a-bd75deb8a7ea.png) ## FAQ ### Error: opencv not found 1. find OpenCVConfig.cmake ```bash sudo apt install locate sudo updatedb locate OpenCVConfig.cmake ``` 2. edit CMakeLists.txt and replace OpenCV_DIR with the correct OpenCV path replace this line ``` set(OpenCV_DIR /opt/ros/kinetic/share/OpenCV-3.3.1-dev/) ``` with the correct OpenCV path