{"id":21056608,"url":"https://github.com/waveshareteam/ugv_ws","last_synced_at":"2025-05-15T23:33:19.096Z","repository":{"id":256548500,"uuid":"852217121","full_name":"waveshareteam/ugv_ws","owner":"waveshareteam","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-25T09:28:25.000Z","size":19567,"stargazers_count":25,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"ros2-humble-develop","last_synced_at":"2025-04-03T17:11:13.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waveshareteam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-04T12:35:43.000Z","updated_at":"2025-04-03T06:37:37.000Z","dependencies_parsed_at":"2024-09-11T16:26:05.889Z","dependency_job_id":"46f5c369-14be-4397-86c1-2bab6ed0317f","html_url":"https://github.com/waveshareteam/ugv_ws","commit_stats":null,"previous_names":["dudulrx/ugv_ws","waveshareteam/ugv_ws"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2Fugv_ws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2Fugv_ws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2Fugv_ws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waveshareteam%2Fugv_ws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waveshareteam","download_url":"https://codeload.github.com/waveshareteam/ugv_ws/tar.gz/refs/heads/ros2-humble-develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442429,"owners_count":22071864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T16:52:13.799Z","updated_at":"2025-05-15T23:33:14.033Z","avatar_url":"https://github.com/waveshareteam.png","language":"C","readme":"# ugv_ws Workspace Description (Stable)\n\n1.Environment\n\n- pc software：VMware Workstation 17Pro、mobarxterm\n- ugv Version：UGV ROVER、UGV BEAST\n\n2.Architecture\n\n- project：https://github.com/DUDULRX/ugv_ws/tree/ros2-humble\n    \n    ```jsx\n    git clone -b ros2-humble-develop https://github.com/DUDULRX/ugv_ws.git\n    ```\n    \n    - First compilation on the virtual machine (compiling one by one on the robot)\n        \n        ```jsx\n        cd /home/ws/ugv_ws\n        . build_first.sh\n        ```\n        \n        build_first.sh content\n        \n        ```jsx\n        cd /home/ws/ugv_ws\n        colcon build --packages-select apriltag apriltag_msgs apriltag_ros cartographer costmap_converter_msgs costmap_converter emcl2 explore_lite openslam_gmapping slam_gmapping ldlidar rf2o_laser_odometry robot_pose_publisher teb_msgs teb_local_planner vizanti vizanti_cpp vizanti_demos vizanti_msgs vizanti_server ugv_base_node ugv_interface\n        colcon build --packages-select ugv_bringup ugv_chat_ai ugv_description ugv_gazebo ugv_nav ugv_slam ugv_tools ugv_vision ugv_web_app --symlink-install \n        echo \"source /opt/ros/humble/setup.bash\" \u003e\u003e ~/.bashrc\n        echo \"eval \"$(register-python-argcomplete ros2)\"\" \u003e\u003e ~/.bashrc\n        echo \"eval \"$(register-python-argcomplete colcon)\"\" \u003e\u003e ~/.bashrc\n        echo \"source /home/ws/ugv_ws/install/setup.bash\" \u003e\u003e ~/.bashrc\n        source ~/.bashrc \n        ```\n        \n    - Daily compilation of virtual machines (one by one on the car)\n        \n        ```jsx\n        cd /home/ws/ugv_ws\n        . build_common.sh\n        ```\n        \n        build_common.sh content\n        \n        ```jsx\n        cd /home/ws/ugv_ws\n        colcon build --packages-select apriltag apriltag_msgs apriltag_ros cartographer costmap_converter_msgs costmap_converter emcl2 explore_lite openslam_gmapping slam_gmapping ldlidar rf2o_laser_odometry robot_pose_publisher teb_msgs teb_local_planner vizanti vizanti_cpp vizanti_demos vizanti_msgs vizanti_server ugv_base_node ugv_interface\n        colcon build --packages-select ugv_bringup ugv_chat_ai ugv_description ugv_gazebo ugv_nav ugv_slam ugv_tools ugv_vision ugv_web_app --symlink-install \n        source install/setup.bash \n        ```\n        \n    - Compile apriltag\n        \n        ```jsx\n        cd /home/ws/ugv_ws\n        . build_apriltag.sh\n        ```\n        \n        build_apriltag.sh content\n        \n        ```jsx\n        cd /home/ws/ugv_ws/src/ugv_else/apriltag_ros/apriltag\n        cmake -B build -DCMAKE_BUILD_TYPE=Release\n        cmake --build build --target install\n        cd /home/ws/ugv_ws\n        ```\n        \n- Ubuntu software：\n    \n    **Install according to wiki install ros2 humble**\n    \n    ```jsx\n    apt-get update \n    apt-get upgrade \n    \n    apt install python3-pip\n    apt-get install alsa-utils\n    apt install python3-colcon-argcomplete\n    \n    apt install ros-humble-cartographer-*\n    apt install ros-humble-desktop-*\n    apt install ros-humble-joint-state-publisher-*\n    apt install ros-humble-nav2-*\n    apt install ros-humble-rosbridge-*\n    apt install ros-humble-rqt-*\n    apt install ros-humble-rtabmap-*\n    apt install ros-humble-usb-cam\n    apt install ros-humble-depthai-*\n    \n    #Simulation virtual machine installation\n    apt install gazebo\n    apt install ros-humble-gazebo-*\n    ```\n    \n- Python3 Library：\n    \n    domestic\n    \n    ```jsx\n    cd ~/ugv_ws\n    python3 -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple\n    ```\n    \n    foreign\n    \n    ```jsx\n    cd ~/ugv_ws\n    python3 -m pip install -r requirements.txt\n    ```\n    \n    requirements.txt content\n    \n    ```jsx\n    pyserial\n    flask\n    mediapipe\n    requests\n    ```\n    \n- Feature pack ugv_ws \n    \n    \u003e ugv_main Main functions\n    \u003e \n    \u003e \n    \u003e \u003e ugv_base_node Two-wheel differential kinematics\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_bringup drive, control\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_chat_ai web ai interaction\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_description Model\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_gazebo simulation\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_interface Information interface\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_nav navigation\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_slam Mapping\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_tools tool\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_vision visual interaction\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ugv_web_app web\n    \u003e \u003e \n    \n    \u003e ugv_else ( ugv_main dependence)\n    \u003e \n    \u003e \n    \u003e \u003e apriltag_ros\n    \u003e \u003e \n    \u003e \n    \u003e \u003e cartographer\n    \u003e \u003e \n    \u003e \n    \u003e \u003e costmap_converter\n    \u003e \u003e \n    \u003e \n    \u003e \u003e emcl_ros2\n    \u003e \u003e \n    \u003e \n    \u003e \u003e explore_lite\n    \u003e \u003e \n    \u003e \n    \u003e \u003e gmapping\n    \u003e \u003e \n    \u003e \n    \u003e \u003e ldlidar\n    \u003e \u003e \n    \u003e \n    \u003e \u003e rf2o_laser_odometry\n    \u003e \u003e \n    \u003e \n    \u003e \u003e robot_pose_publisher\n    \u003e \u003e \n    \u003e \n    \u003e \u003e teb_local_planner\n    \u003e \u003e \n    \u003e \n    \u003e \u003e vizanti\n    \u003e \u003e \n\n3.Use (ros packages on the car are all executed in docker)\n\nuse_rviz optional true, false (default)\n\ncar model optional rasp_rover, ugv_rover, ugv_beast\n\nlidar model optional ld06, ld19 (default), stl27l\n\n- Start the car and turn off the auto-start script.\n    \n    ```jsx\n    sudo killall -9 python\n    ```\n    \n\nEnter docker and start ssh to remotely access docker and the visual interface\n\n- Car settings docker\n    - Set up docker remote login\n        \n        Execute on the host and enter the directory\n        \n        ```jsx\n        cd /home/ws/ugv_ws\n        sudo chmod +x ros2_humble.sh remotessh.sh\n        ./ros2_humble.sh\n        ```\n        \n        1进入docker\n        \n        ![image.png](images/Enter%20docker.png)\n        \n    - Exit docker\n        \n        Execute within docker\n        \n        ```jsx\n        exit\n        ```\n        \n- Remote to docker\n    \n    ![image.png](images/Connect%20to%20docker%20remotely.png)\n    \n    ![image.png](images/Docker%20username.png)\n    \n    ```jsx\n    #username\n    root\n    #Password needs to be set in advance\n    ws\n    ```\n    \n    Enter workspace\n    \n    ```jsx\n    cd /home/ws/ugv_ws\n    ```\n    \n- View model joints\n    - rasp_rover\n        \n        ```jsx\n        export UGV_MODEL=rasp_rover\n        ```\n        \n        start up\n        \n        ```jsx\n         ros2 launch ugv_description display.launch.py use_rviz:=true\n        ```\n        \n        ![image.png](images/Rasp_rover.png)\n        \n    - ugv_rover\n        \n        ```jsx\n        export UGV_MODEL=ugv_rover\n        ```\n        \n        start up\n        \n        ```jsx\n         ros2 launch ugv_description display.launch.py use_rviz:=true\n        ```\n        \n        ![image.png](images/Ugv_rover.png)\n        \n    - ugv_beast\n        \n        ```jsx\n        export UGV_MODEL=ugv_beast\n        ```\n        \n        start up\n        \n        ```jsx\n         ros2 launch ugv_description display.launch.py use_rviz:=true\n        ```\n        \n        ![image.png](images/Ugv_beast.png)\n        \n    - Drive the car (can control the pan/tilt and LED lights)\n        \n        ```jsx\n         ros2 run ugv_bringup ugv_driver\n        ```\n        \n        Drag the slider related to the joint angle publisher to control the gimbal\n        \n        [![](https://res.cloudinary.com/marcomontalbano/image/upload/v1727491041/video_to_markdown/images/youtube--jA9LJTBRQqY-c05b58ac6eb4c4700831b2b3070cd403.jpg)](https://youtu.be/jA9LJTBRQqY \"\")\n        \n        Control the light data 0-255 data[0] control the light IO4 near the oak camera data[1] control the light IO5 near the usb camera\n        \n        ```jsx\n        ros2 topic pub /ugv/led_ctrl std_msgs/msg/Float32MultiArray \"{data: [0, 0]}\" -1\n        ```\n        \n- Chassis driver (executed within docker)\n    \n    If you switch to another radar, modify\n    \n    ```jsx\n    export LDLIDAR_MODEL=\n    ```\n    - Use radar as imu sensor data (more stable)\n        \n        ```jsx\n        ros2 launch ugv_bringup bringup_lidar.launch.py use_rviz:=true\n        ```\n        \n    \n    Rotate the car in place to check the posture\n    \n    [![](https://res.cloudinary.com/marcomontalbano/image/upload/v1727491431/video_to_markdown/images/youtube--5neLr1Q2ddM-c05b58ac6eb4c4700831b2b3070cd403.jpg)](https://youtu.be/5neLr1Q2ddM \"\")\n    \n- Joystick, keyboard control\n    \n    Start the car\n    \n    ```jsx\n    ros2 launch ugv_bringup bringup_lidar.launch.py use_rviz:=true\n    ```\n    \n    - Joystick control (the joystick USB interface needs to be connected to the car or virtual machine)\n        \n        ```jsx\n        ros2 launch ugv_tools teleop_twist_joy.launch.py\n        ```\n        \n    - keyboard control\n        \n        ```jsx\n        ros2 run ugv_tools keyboard_ctrl\n        ```\n        \n        ![image.png](images/Keyboard%20controls.png)\n        \n- Visual interaction\n    \n    Start the car\n    \n    ```jsx\n    ros2 launch ugv_bringup bringup_lidar.launch.py use_rviz:=true\n    ```\n    \n    - Start related interfaces\n        \n        control car\n        \n        ```jsx\n        ros2 run ugv_tools behavior_ctrl\n        ```\n        \n        Turn on the camera, easy\n        \n        ```jsx\n        ros2 run usb_cam usb_cam_node_exe\n        ```\n        \n        Turn on the camera and remove distortion\n        \n        ```jsx\n        ros2 launch ugv_vision camera.launch.py\n        ```\n        \n    - Monocular\n            \n        - Apriltag control\n            \n            apriltag only sets tag36h11, which can be modified by yourself\n            \n            - Apriltag control\n                \n                1 2 3 4 Right, left, front and rear, other stops\n                \n                ```jsx\n                ros2 run ugv_vision apriltag_ctrl\n                ```\n                \n            - Apriltag Simple tracking\n                \n                Select the left and right according to the x coordinate of the center point of the ar tag. After centering, select the front and rear according to the y coordinate. If the y is upward, the front is forward, and if the y is downward, the rear is\n                \n                ```jsx\n                ros2 run ugv_vision apriltag_track_0\n                ```\n                \n            - Apriltag Target tracking (AR code needs to specify size 0.08)\n                \n                pose recognition\n                \n                Here, the previous command to turn on the camera is turned off and replaced with the following\n                \n                ```jsx\n                ros2 launch ugv_vision apriltag_track.launch.py\n                ```\n                \n                ![image.png](images/APIELTAG%20object%20tracking.jpg)\n                \n                - Simply drive to the target point (rotate, go straight)\n                    \n                    Turn on tracking\n                    \n                    ```jsx\n                    ros2 run ugv_vision apriltag_track_1\n                    ```\n                    \n                    command line\n                    \n                    ```jsx\n                    ros2 topic pub /apriltag/track std_msgs/msg/Int8 -1\n                    ```\n                    \n                - Combine nav2 to drive to the target point (you need to close the previous startup file and change to open nav)\n                    \n                    Turn on navigation\n                    \n                    ```jsx\n                    ros2 launch ugv_nav nav.launch.py use_rviz:=true\n                    ```\n                    \n                    Turn on tracking\n                    \n                    ```jsx\n                    ros2 run ugv_vision apriltag_track_2\n                    ```\n                    \n- Mapping\n    - 2D (LiDAR)\n        - Gmapping\n            \n            ```jsx\n             ros2 launch ugv_slam gmapping.launch.py use_rviz:=true\n            ```\n            \n            [![](https://res.cloudinary.com/marcomontalbano/image/upload/v1727493329/video_to_markdown/images/youtube--cBiuYmxGWks-c05b58ac6eb4c4700831b2b3070cd403.jpg)](https://youtu.be/cBiuYmxGWks \"\")\n            \n            control car\n            \n            ```jsx\n            ros2 run ugv_tools keyboard_ctrl\n            ```\n            \n            save map\n            \n            ```jsx\n            ./save_2d_gmapping_map.sh\n            ```\n            \n            ![image.png](images/Save_2d_gmapping_map.sh.png)\n            \n            save_2d_gmapping_map.sh内容\n            \n            ```jsx\n            cd /home/ws/ugv_ws/src/ugv_main/ugv_nav/maps\n            ros2 run nav2_map_server map_saver_cli -f ./map\n            ```\n            \n        - Cartographer\n            \n            ```jsx\n            ros2 launch ugv_slam cartographer.launch.py use_rviz:=true\n            ```\n            \n            [![](https://res.cloudinary.com/marcomontalbano/image/upload/v1727491911/video_to_markdown/images/youtube--dHyNeuJ0k3U-c05b58ac6eb4c4700831b2b3070cd403.jpg)](https://youtu.be/dHyNeuJ0k3U \"\")\n            \n            control car\n            \n            ```jsx\n            ros2 run ugv_tools keyboard_ctrl\n            ```\n            \n            save map\n            \n            ```jsx\n            ./save_2d_cartographer_map.sh\n            ```\n            \n            ![image.png](images/Save_2d_cartographer_map.sh.png)\n            \n            save_2d_cartographer_map.sh内容\n            \n            ```jsx\n            cd /home/ws/ugv_ws/src/ugv_main/ugv_nav/maps\n            ros2 run nav2_map_server map_saver_cli -f ./map \u0026\u0026 ros2 service call /write_state cartographer_ros_msgs/srv/WriteState \"{filename: '/home/ws/ugv_ws/src/ugv_main/ugv_nav/maps/map.pbstream'}\"\n            ```\n            \n    - 3D (lidar + depth camera)\n        - Rtabmap\n            - Rtabmap_viz Visualization\n                \n                ```jsx\n                ros2 launch ugv_slam rtabmap_rgbd.launch.py use_rviz:=false\n                ```\n                \n                [![](https://res.cloudinary.com/marcomontalbano/image/upload/v1727492108/video_to_markdown/images/youtube--J3_QCGVF7Jc-c05b58ac6eb4c4700831b2b3070cd403.jpg)](https://youtu.be/J3_QCGVF7Jc \"\")\n                \n                control car\n                \n                ```jsx\n                ros2 run ugv_tools keyboard_ctrl\n                ```\n                \n            - Rviz Visualization\n                \n                ```jsx\n                ros2 launch ugv_slam rtabmap_rgbd.launch.py use_rviz:=true\n                ```\n                \n                [![](https://res.cloudinary.com/marcomontalbano/image/upload/v1727492190/video_to_markdown/images/youtube--dxey_90tdFI-c05b58ac6eb4c4700831b2b3070cd403.jpg)](https://youtu.be/dxey_90tdFI \"\")\n                \n                control car\n                \n                ```jsx\n                ros2 run ugv_tools keyboard_ctrl\n                ```\n                \n            \n            After the mapping is completed, directly press ctrl+c to exit the mapping node, and the system will automatically save the map. Map default save path ~/.ros/rtabmap.db \n            \n- Navigation\n    - 2D\n        - Local localization\n            \n            use_localization amcl（default），emcl，cartographer\n            \n            - amcl\n                \n                Start first, you need to manually specify the approximate initial position\n                \n                ```jsx\n                ros2 launch ugv_nav nav.launch.py use_localization:=amcl use_rviz:=true\n                ```\n                \n                Then by controlling the car, simply move and rotate to assist in initial positioning.\n                \n                ```jsx\n                ros2 run ugv_tools keyboard_ctrl\n                ```\n                \n            - emcl\n                \n                After startup, you need to manually specify the approximate initial position\n                \n                ```jsx\n                ros2 launch ugv_nav nav.launch.py use_localization:=emcl use_rviz:=true\n                ```\n                \n            - cartographer\n                \n                Note that you need to use Cartographer to build the map before you can proceed.\n                \n                ```jsx\n                ros2 launch ugv_nav nav.launch.py use_localization:=cartographer use_rviz:=true\n                ```\n                \n                ![image.png](images/Cartographer%20pure_localization.png)\n                \n                After startup, if the accurate position has not been located, you can control the car and simply move it to assist in the initial positioning.\n                \n                ```jsx\n                ros2 run ugv_tools keyboard_ctrl\n                ```\n                \n        - Local navigation\n            \n            use_localplan dwa，teb（default）\n            \n            - dwa\n                \n                ```jsx\n                 ros2 launch ugv_nav nav.launch.py use_localplan:=dwa use_rviz:=true\n                ```\n                \n            - teb\n                \n                ```jsx\n                 ros2 launch ugv_nav nav.launch.py use_localplan:=teb use_rviz:=true\n                ```\n                \n    - 3D\n        - Rtabmap\n            - Local navigation\n                \n                Turn on positioning\n                \n                ```jsx\n                ros2 launch ugv_nav rtabmap_localization_launch.py\n                ```\n                \n                Turn on nav (you can wait slowly until the 3D data is loaded before navigating, it will take a while)\n                \n                use_localplan dwa，teb（default）\n                \n                - dwa\n                    \n                    ```jsx\n                     ros2 launch ugv_nav nav_rtabmap.launch.py use_localplan:=dwa use_rviz:=true\n                    ```\n                    \n                - teb\n                    \n                    ```jsx\n                     ros2 launch ugv_nav nav_rtabmap.launch.py use_localplan:=teb use_rviz:=true\n                    ```\n                    \n- Mapping and navigation are enabled at the same time (two-dimensional)\n    \n    ```jsx\n    ros2 launch ugv_nav slam_nav.launch.py use_rviz:=true\n    ```\n    \n    - Rviz manually publishes navigation points for exploration (you can also use the keyboard, handle, and web side for remote exploration)\n        \n        ![image.png](images/Rviz%20manually%20publishes%20navigation%20points%20for%20exploration.png)\n        \n    - Automatic exploration (to be in a closed rule area)\n        \n        ```jsx\n         ros2 launch explore_lite explore.launch.py \n        ```\n\n    - Save map\n            \n        ```jsx\n        ./save_2d_gmapping_map.sh\n        ```\n        \n- Web ai interaction\n    - Start the car\n        \n        ```jsx\n        ros2 launch ugv_bringup bringup_lidar.launch.py use_rviz:=true\n        ```\n        \n    - Start related interfaces\n        \n        ```jsx\n        ros2 run ugv_tools behavior_ctrl\n        ```\n        \n    - Web ai Interaction (requires relevant ai interface, currently ollama local deployment)\n        \n        ```jsx\n        ros2 run ugv_chat_ai app\n        ```\n        \n- Web side control\n    \n    Drive the car first, refer to the above chassis drive, map construction and navigation, and start mapping and navigation at the same time.\n    \n    - ugv web\n        \n        ```jsx\n        ros2 launch ugv_web_app bringup.launch.py host:=ip\n        ```\n        \n- Command interaction\n    \n    ```jsx\n    ros2 run ugv_tools behavior_ctrl\n    ```\n    \n    - Basic control (you need to put the car down and run, and judge whether the goal has been completed based on the odometer)\n        \n        ```jsx\n        ros2 launch ugv_bringup bringup_lidar.launch.py use_rviz:=true\n        ```\n        \n        Forward data unit meters\n        \n        ```jsx\n        ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"drive_on_heading\\\", \\\"data\\\": 0.1}]'}\"\n        ```\n        \n        Back data unit meters\n        \n        ```jsx\n        ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"back_up\\\", \\\"data\\\": 0.1}]'}\"\n        ```\n        \n        Rotation data unit degree ,positive number left rotation, negative number right rotation\n        \n        ```jsx\n        ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"spin\\\", \\\"data\\\": -1}]'}\"\n        ```\n        \n        Stop\n        \n        ```jsx\n        ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"stop\\\", \\\"data\\\": 0}]'}\"\n        ```\n        \n    \n    Navigation needs to be enabled below\n    \n    ```jsx\n    ros2 launch ugv_nav nav.launch.py use_rviz:=true\n    ```\n    \n    - Get current point position\n        \n        ```elm\n        ros2 topic echo /robot_pose --once\n        ```\n        \n    - Save as navigation point\n        \n        data Navigation point name, optional a-g\n        \n        ```jsx\n        ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"save_map_point\\\", \\\"data\\\": \\\"a\\\"}]'}\"\n        ```\n        \n    - Move to navigation point\n        \n        data Navigation point name, optional a-g\n        \n        ```jsx\n        ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"pub_nav_point\\\", \\\"data\\\": \\\"a\\\"}]'}\"\n        ```\n        \n    \n    The saved points will also be stored in the file.\n    \n    ![image.png](images/The%20saved%20points%20will%20also%20be%20stored%20in%20the%20file.png)\n    \n- Gazebo comprehensive simulation (executed on virtual machine)\n    \n    ```jsx\n    cd ~/.gazebo/\n    git clone https://github.com/osrf/gazebo_models.git models\n    cp -r /home/ws/ugv_ws/src/ugv_main/ugv_gazebo/models/world models\n    cp /home/ws/ugv_ws/ugv_description.zip models \n    cd ~/.gazebo/models/\n    unzip ugv_description.zip\n    rm -rf ugv_description.zip\n    ```\n    \n    - View model\n        - rasp_rover\n            \n            ```jsx\n            export UGV_MODEL=rasp_rover\n            ```\n            \n            start up\n            \n            ```jsx\n             ros2 launch ugv_gazebo display.launch.py \n            ```\n            \n        - ugv_rover\n            \n            ```jsx\n            export UGV_MODEL=ugv_rover\n            ```\n            \n            start up\n            \n            ```jsx\n             ros2 launch ugv_gazebo display.launch.py \n            ```\n            \n        - ugv_beast\n            \n            ```jsx\n            export UGV_MODEL=ugv_beast\n            ```\n            \n            start up\n            \n            ```jsx\n             ros2 launch ugv_gazebo display.launch.py \n            ```\n            \n    - Load model\n        - Empty\n            \n            ```elm\n            ros2 launch ugv_gazebo bringup_test.launch.py\n            ```\n            \n            ![image.png](images/Gazebo%20empty%20world.png)\n            \n        - House\n            \n            ```jsx\n            ros2 launch ugv_gazebo bringup.launch.py\n            ```\n            \n            ![image.png](images/Gazebo%20house%20world.png)\n            \n    \n    The following takes ugv_rover as an example\n    \n    Specify model\n    \n    ```jsx\n    export UGV_MODEL=ugv_rover\n    ```\n    \n    start up\n    \n    ```jsx\n    ros2 launch ugv_gazebo bringup.launch.py\n    ```\n    \n    - Joystick, keyboard control\n        - Joystick control (the joystick USB interface needs to be connected to the virtual machine)\n            \n            ```jsx\n            ros2 launch ugv_tools teleop_twist_joy.launch.py\n            ```\n            \n        - Keyboard control\n            \n            ```jsx\n            ros2 run ugv_tools keyboard_ctrl\n            ```\n            \n            ![image.png](images/Keyboard%20controls.png)\n            \n    - Mapping\n        - 2D (LiDAR)\n            \n            ![image.png](images/Gazebo%202D%20mapping.png)\n            \n            - Gmapping\n                \n                ```elm\n                ros2 launch ugv_gazebo gmapping.launch.py\n                ```\n                \n                control car\n                \n                ```jsx\n                ros2 run ugv_tools keyboard_ctrl\n                ```\n                \n                save map\n                \n                ```jsx\n                ./save_2d_gmapping_map_gazebo.sh\n                ```\n                \n                save_2d_gmapping_map_gazebo.sh content\n                \n                ```jsx\n                cd /home/ws/ugv_ws/src/ugv_main/ugv_gazebo/maps\n                ros2 run nav2_map_server map_saver_cli -f ./map\n                ```\n                \n            - Cartographer\n                \n                ```elm\n                ros2 launch ugv_gazebo cartographer.launch.py\n                ```\n                \n                control car\n                \n                ```jsx\n                ros2 run ugv_tools keyboard_ctrl\n                ```\n                \n                save map\n                \n                ```jsx\n                ./save_2d_cartographer_map_gazebo.sh\n                ```\n                \n                save_2d_cartographer_map_gazebo.sh content\n                \n                ```jsx\n                cd /home/ws/ugv_ws/src/ugv_main/ugv_gazebo/maps\n                ros2 run nav2_map_server map_saver_cli -f ./map \u0026\u0026 ros2 service call /write_state cartographer_ros_msgs/srv/WriteState \"{filename: '/home/ws/ugv_ws/src/ugv_main/ugv_gazebo/maps/map.pbstream'}\"\n                ```\n                \n        - 3D (lidar + depth camera)\n            - Rtabmap\n                - Rtabmap_viz Visualization\n                    \n                    ```jsx\n                    ros2 launch ugv_gazebo rtabmap_rgbd.launch.py\n                    ```\n                    \n                    ![image.png](images/Gazebo%20rtabmap_viz%20visualization.png)\n                    \n                    control car\n                    \n                    ```jsx\n                    ros2 run ugv_tools keyboard_ctrl\n                    ```\n                    \n                - Rviz Visualization\n                    \n                    ```jsx\n                    ros2 launch ugv_gazebo rtabmap_rgbd.launch.py use_rviz:=true\n                    ```\n                    \n                    control car\n                    \n                    ```jsx\n                    ros2 run ugv_tools keyboard_ctrl\n                    ```\n                    \n                \n                After the mapping is completed, directly press ctrl+c to exit the mapping node, and the system will automatically save the map. Map default save path ~/.ros/rtabmap.db \n                \n    - Navigation\n        - 2D\n            - Local positioning\n                \n                use_localization amcl（default），emcl，cartographer\n                \n                - amcl\n                    \n                    Start first, you need to manually specify the approximate initial position\n                    \n                    ```jsx\n                    ros2 launch ugv_gazebo nav.launch.py use_localization:=amcl \n                    ```\n                    \n                    Then by controlling the car, simply move and rotate to assist in initial positioning.\n                    \n                    ```jsx\n                    ros2 run ugv_tools keyboard_ctrl\n                    ```\n                    \n                - emcl\n                    \n                    After startup, you need to manually specify the approximate initial position\n                    \n                    ```jsx\n                    ros2 launch ugv_gazebo nav.launch.py use_localization:=emcl \n                    ```\n                    \n                - cartographer\n                    \n                    Note that you need to use Cartographer to build the map before you can proceed.\n                    \n                    ```jsx\n                    ros2 launch ugv_gazebo nav.launch.py use_localization:=cartographer \n                    ```\n                    \n                    After startup, if the accurate position has not been located, you can control the car and simply move it to assist in the initial positioning.\n                    \n                    ```jsx\n                    ros2 run ugv_tools keyboard_ctrl\n                    ```\n                    \n            - Local navigation\n                \n                use_localplan dwa，teb（默认）\n                \n                - dwa\n                    \n                    ```jsx\n                     ros2 launch ugv_gazebo nav.launch.py use_localplan:=dwa \n                    ```\n                    \n                - teb\n                    \n                    ```jsx\n                     ros2 launch ugv_gazebo nav.launch.py use_localplan:=teb \n                    ```\n                    \n        - 3D\n            - Rtabmap\n                - Local navigation\n                    \n                    Turn on positioning\n                    \n                    ```jsx\n                    ros2 launch ugv_gazebo rtabmap_localization_launch.py\n                    ```\n                    \n                    Turn on nav (you can wait slowly until the 3D data is loaded before navigating, it will take a while)\n                    \n                    ![image.png](images/Gazebo%20rtabmap%203D%20navigation.png)\n                    \n                    use_localplan dwa，teb（默认）\n                    \n                    - dwa\n                        \n                        ```jsx\n                         ros2 launch ugv_gazebo nav_rtabmap.launch.py use_localplan:=dwa \n                        ```\n                        \n                    - teb\n                        \n                        ```jsx\n                         ros2 launch ugv_ngazebo nav_rtabmap.launch.py use_localplan:=teb\n                        ```\n                        \n    - Mapping and navigation are enabled at the same time (two-dimensional)\n        \n        ```jsx\n        ros2 launch ugv_gazebo slam_nav.launch.py\n        ```\n        \n        - Automatic exploration (to be in a closed rule area)\n            \n            ```jsx\n             ros2 launch explore_lite explore.launch.py \n            ```\n            \n    - Web ai interaction\n        - Start related interfaces\n            \n            ```jsx\n            ros2 run ugv_tools behavior_ctrl\n            ```\n            \n        - web ai Interaction (requires relevant ai interface, currently ollama local deployment)\n            \n            ```jsx\n            ros2 run ugv_chat_ai app\n            ```\n            \n    - Web control\n        - ugv web\n            \n            ```jsx\n            ros2 launch ugv_web_app bringup.launch.py host:=ip\n            ```\n            \n    - Command interaction\n        \n        ```jsx\n        ros2 run ugv_tools behavior_ctrl\n        ```\n        \n        - Basic control (you need to put the car down and run, and judge whether the goal has been completed based on the odometer)\n            \n            Forward data unit meters\n            \n            ```jsx\n            ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"drive_on_heading\\\", \\\"data\\\": 0.5}]'}”\n            ```\n            \n            Back data unit meters\n            \n            ```jsx\n            ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"back_up\\\", \\\"data\\\": 0.5}]'}”\n            ```\n            \n            Rotation data unit degree positive number rotate right, negative number rotate left\n            \n            ```jsx\n            ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"spin\\\", \\\"data\\\": -1}]'}”\n            ```\n            \n            Stop\n            \n            ```jsx\n            ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"spin\\\", \\\"data\\\": 0}]'}”\n            ```\n            \n        \n        Navigation needs to be enabled below\n        \n        ```jsx\n        ros2 launch ugv_gazebo nav.launch.py use_rviz:=true\n        ```\n        \n        - Get current point position\n            \n            ```elm\n            ros2 topic echo /robot_pose --once\n            ```\n            \n        - Save as navigation point\n            \n            data navigation point name, optional a-g\n            \n            ```jsx\n            ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"save_map_point\\\", \\\"data\\\": \\\"a\\\"}]'}\"\n            ```\n            \n        - Move to navigation point\n            \n            data navigation point name, optional a-g\n            \n            ```jsx\n            ros2 action send_goal /behavior ugv_interface/action/Behavior \"{command: '[{\\\"T\\\": 1, \\\"type\\\": \\\"pub_nav_point\\\", \\\"data\\\": \\\"a\\\"}]'}\"\n            ```\n            \n        \n        The saved points will also be stored in the file.\n        \n        ![image.png](images/The%20saved%20points%20will%20also%20be%20stored%20in%20the%20file.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaveshareteam%2Fugv_ws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaveshareteam%2Fugv_ws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaveshareteam%2Fugv_ws/lists"}