{"id":15658235,"url":"https://github.com/pinto0309/zumo32u4","last_synced_at":"2025-05-05T16:42:05.248Z","repository":{"id":97173365,"uuid":"132230229","full_name":"PINTO0309/zumo32u4","owner":"PINTO0309","description":"Zumo32u4(ATmega32u4) + RaspberryPi3(RaspberryPi) + SLAM(CartoGrapher/Gmapping) + RPLiDAR A1M8","archived":false,"fork":false,"pushed_at":"2018-07-10T04:06:10.000Z","size":23292,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T22:25:30.661Z","etag":null,"topics":["arduino","atmega32u4","cartographer","gmapping-slam","kinetic","lidar","raspberry-pi","raspberrypi","ros","rplidar","rviz","slam","zumo32u4"],"latest_commit_sha":null,"homepage":"https://qiita.com/PINTO","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PINTO0309.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-05-05T08:44:20.000Z","updated_at":"2025-03-11T14:31:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c0f4831-bab7-432c-b0fc-23bc1350a2f7","html_url":"https://github.com/PINTO0309/zumo32u4","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fzumo32u4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fzumo32u4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fzumo32u4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PINTO0309%2Fzumo32u4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PINTO0309","download_url":"https://codeload.github.com/PINTO0309/zumo32u4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252535149,"owners_count":21763905,"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":["arduino","atmega32u4","cartographer","gmapping-slam","kinetic","lidar","raspberry-pi","raspberrypi","ros","rplidar","rviz","slam","zumo32u4"],"created_at":"2024-10-03T13:11:30.014Z","updated_at":"2025-05-05T16:42:05.179Z","avatar_url":"https://github.com/PINTO0309.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zumo32u4 (Assembled with 100:1 HP Motors)\n**SLAM by RaspberryPi3 + Zumo32u4 + RPLidarA1M8**\u003cbr\u003e\nConstruction of GMapping environment or GoogleCartoGrapher environment using Zumo 32u4.\u003cbr\u003e\u003cbr\u003e\n【Japanese article **Gmapping**】 https://qiita.com/PINTO/items/9aa737c284dc4e8212f1\u003cbr\u003e\u003cbr\u003e\n【Japanese article **Google CartoGrapher-01**】 https://qiita.com/PINTO/items/4845c438cac05eda4d1e\u003cbr\u003e\n【Japanese article **Google CartoGrapher-02**】 https://qiita.com/PINTO/items/fb0d44b2bb9455800667\u003cbr\u003e\n【Japanese article **Google CartoGrapher-03**】 https://qiita.com/PINTO/items/d8fd7a91ee00df7702b7\u003cbr\u003e\n【Japanese article **Google CartoGrapher-04**】 https://qiita.com/PINTO/items/f8fa5d6ce55317ea590b\u003cbr\u003e\u003cbr\u003e\n**＜Gmapping＞**\u003cbr\u003e\n![MappingView](https://github.com/PINTO0309/zumo32u4/blob/master/media/127.png)\u003cbr\u003e\u003cbr\u003e\n**＜Google CartoGrapher＞**\u003cbr\u003e\nNo odometry and no IMU\u003cbr\u003e\nUse 2D LiDAR only\u003cbr\u003e\n![CartoGrapherMapMov](https://github.com/PINTO0309/zumo32u4/blob/master/media/GoogleCartoGrapherNoneOdom%2BIMU_Movie.gif)\u003cbr\u003e\nWith odometry and IMU and 2D LiDAR\u003cbr\u003e\n![CartoGrapherMapwodomimu](https://github.com/PINTO0309/zumo32u4/blob/master/media/GoogleCartoGrapherWithOdom%2BIMU.gif)\u003cbr\u003e\n![CartoGrapherMap](https://github.com/PINTO0309/zumo32u4/blob/master/media/GoogleCartoGrapherNoneOdom%2BIMU_Map.png)\u003cbr\u003e\n\n## ◆ Change log\u003cbr\u003e\n2018.05.05 Ver 0.1.0 Under development\u003cbr\u003e\n2018.05.12 Ver 1.0.0 First Release\u003cbr\u003e\n2018.06.10 Ver 1.0.1 Bug fix. Maintenance continues for Readme.\u003cbr\u003e\n\n## ◆ Environment\u003cbr\u003e\n![Environment](https://github.com/PINTO0309/zumo32u4/blob/master/media/0021_GMapping_English.png)\n![SWStack](https://github.com/PINTO0309/zumo32u4/blob/master/media/0023_SWStack_RaspberryPi_English.png)\n![Robot01](https://github.com/PINTO0309/zumo32u4/blob/master/media/150.png)\n![Robot02](https://github.com/PINTO0309/zumo32u4/blob/master/media/151.png)\n![Robot03](https://github.com/PINTO0309/zumo32u4/blob/master/media/152.png)\n1. Zumo32u4 (ATmega32u4 Assembled with 100:1 HP Motors)\n2. RaspberryPi3 (Raspbian Stretch + ROS kinetic)\n3. RPLidar A1M8 (SDK ver 1.5.7 / Firmware ver 1.20)\n4. Python2.7\n5. C++\n6. ROS kinetic\n7. Working PC1 (Ubuntu16.04 + ROS kinetic + ArduinoIDE 1.8.5)\n8. Working PC2 (Windows10 + TeraTerm)\u003cbr\u003e\u003cbr\u003e\n\n## ◆ Procedure for environment building (Common procedure between GMapping and Google CartoGrapher)\n\n### **Perform work with Ubuntu16.04**\u003cbr\u003e\n\n1. Execute below\n```\n$ export ROS_MASTER_URI=http://raspberrypi.local:11311/\n\nOR\n\n$ export ROS_MASTER_URI=http://\u003cRaspberryPi IPaddress\u003e:11311/\n```\n\n### **Perform work with RaspberryPi3 (Raspbian Stretch)**\u003cbr\u003e\n\n2. Introduction of navigation package. Execute below.\n```\n$ sudo apt update;sudo apt upgrade\n$ sudo apt install -y libbullet-dev libsdl-dev libsdl2-2.0 \\\nlibsdl2-dev libsdl-image1.2-dev libyaml-cpp0.3-dev libyaml-cpp0.3v5\n\n$ cd ~\n$ sudo apt install cmake-curses-gui\n$ git clone -b debian/kinetic/bfl https://github.com/PINTO0309/bfl-release.git\n$ cd bfl-release;mkdir build;cd build\n$ ccmake ..\n```\n3. Press the \"c\" key\n4. Wait about 30 seconds\n5. Press the \"e\" key\n6. Set as shown below\n![ccmake](https://github.com/PINTO0309/zumo32u4/blob/master/media/ccmake.png)\n7. Introduction of navigation package. Execute below.\n```\n$ make -j3\n$ sudo make install\n\n$ cd ~\n$ sudo apt install -y liborocos-kdl-dev liborocos-kdl1.3 libflann1.9 libflann-dev \\\nlibpcl-apps1.8 libpcl-common1.8 libpcl-dev libpcl-doc libpcl-features1.8 \\\nlibpcl-filters1.8 libpcl-io1.8 libpcl-kdtree1.8 libpcl-keypoints1.8 libpcl-ml1.8 \\\nlibpcl-octree1.8 libpcl-outofcore1.8 libpcl-people1.8 libpcl-recognition1.8 \\\nlibpcl-registration1.8 libpcl-sample-consensus1.8 libpcl-search1.8 \\\nlibpcl-segmentation1.8 libpcl-stereo1.8 libpcl-surface1.8 libpcl-tracking1.8 \\\nlibpcl-visualization1.8 pcl-tools libvtk6-dev libvtk6-java libvtk6-jni \\\nlibvtk6-qt-dev libvtk6.3 libvtk6.3-qt python-vtk6 tcl-vtk6 vtk6 vtk6-doc \\\nvtk6-examples libpoco-dev libpococrypto46 libpocodata46 libpocodatamysql46 \\\nlibpocodataodbc46 libpocodatasqlite46 libpocofoundation46 libpocomongodb46 \\\nlibpoconet46 libpoconetssl46 libpocoutil46 libpocoxml46 libpocozip46\n\n$ cd /\n$ sudo wget https://github.com/PINTO0309/uEye_4.90.0_Linux_Arm64hf/raw/master/uEye_4.90.0_Linux_Arm64hf.tgz\n$ sudo tar -xzvf uEye_4.90.0_Linux_Arm64hf.tgz\n$ sudo rm uEye_4.90.0_Linux_Arm64hf.tgz\n$ sudo /usr/local/share/ueye/bin/ueyesdk-setup.sh\n\n$ sudo nano /etc/dphys-swapfile\nCONF_SWAPSIZE=2048\n$ sudo /etc/init.d/dphys-swapfile restart swapon -s\n\n$ export CMAKE_PREFIX_PATH=/opt/ros/kinetic:/home/pi/catkin_ws/devel:/home/pi/catkin_ws/install\n$ cd ~/catkin_ws/src\n$ git clone -b kinetic-devel https://github.com/PINTO0309/geometry2.git; \\\ngit clone https://github.com/PINTO0309/dynamic_reconfigure.git; \\\ngit clone https://github.com/PINTO0309/laser_geometry.git; \\\ngit clone https://github.com/PINTO0309/navigation_msgs.git; \\\ngit clone https://github.com/PINTO0309/perception_pcl.git; \\\ngit clone https://github.com/PINTO0309/pcl_msgs.git; \\\ngit clone https://github.com/PINTO0309/nodelet_core.git; \\\ngit clone https://github.com/PINTO0309/bond_core.git; \\\ngit clone -b kinetic-devel https://github.com/PINTO0309/pluginlib.git; \\\ngit clone https://github.com/PINTO0309/class_loader.git; \\\ngit clone https://github.com/PINTO0309/image_common.git; \\\ngit clone https://github.com/PINTO0309/vision_opencv.git; \\\ngit clone https://github.com/PINTO0309/geometry.git; \\\ngit clone https://github.com/PINTO0309/roslint.git; \\\ngit clone https://github.com/PINTO0309/navigation.git\n\n$ cd ..\n$ catkin_make -j1\n$ sudo reboot\n```\n8. Introduction of openslam_gmapping package and slam_gmapping meta package. Execute below.\n```\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/openslam_gmapping.git\n$ git clone https://github.com/PINTO0309/slam_gmapping.git\n\n$ cd ..\n$ catkin_make -j1\n```\n9. Introduction of RPLidarROS package. Execute below.\n```\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/rplidar_ros.git\n$ cd ..\n$ catkin_make\n```\n### **Perform work with Ubuntu16.04**\u003cbr\u003e\n\n10. Introduction of rviz option package. Execute below.\n```\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/visualization_tutorials.git\n$ git clone https://github.com/PINTO0309/joint_state_publisher.git\n$ git clone https://github.com/PINTO0309/robot_state_publisher.git\n$ catkin_make\n```\n11. Remodel the rosserial library. Execute below.\n```\n$ cd /home/\u003cusername\u003e/Arduino/libraries/Rosserial_Arduino_Library/src\n$ cp ros.h BK_ros.h\n$ sudo nano ros.h\n\n#else\n  typedef NodeHandle_\u003cArduinoHardware, 15, 15, 128, 1024, FlashReadOutBuffer_\u003e NodeHandle;\n\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/zumo32u4.git\n```\n12. After connecting Ubuntu and Arduino via a microUSB cable, open zumo32u4/zumo32u4arduino.ino in ArduinoIDE in the set of programs cloned above.\n13. Write a sketch to Arduino with \"→\" button of ArduinoIDE.\n\n### **Perform work with RaspberryPi3 (Raspbian Stretch)**\u003cbr\u003e\n\n14. Execute below.\n```\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/zumo32u4.git\n$ cd ..\n$ catkin_make\n```\n\u003cbr\u003e\u003chr\u003e\n## ◆ Introduction of Google CartoGrapher\u003cbr\u003e\n\n### **Perform work with Ubuntu16.04**\u003cbr\u003e\n\n1. Execute below.\n```\n$ sudo apt update\n$ sudo apt install -y python-wstool python-rosdep ninja-build\n$ cd catkin_ws\n$ wstool init src\n$ wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall\n$ wstool update -t src\n$ src/cartographer/scripts/install_proto3.sh\n$ sudo rosdep init   #\u003c--- Ignoring an error\n$ rosdep update\n$ rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y\n$ catkin_make_isolated --install --use-ninja\n$ source install_isolated/setup.bash\n```\n\n### **Perform work with RaspberryPi3 (Raspbian Stretch)**\u003cbr\u003e\n\n2. Execute below.\n```\n$ sudo apt update;sudo apt upgrade\n$ sudo apt install -y python-wstool python-rosdep ninja-build\n$ cd catkin_ws\n$ wstool init src\n$ wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall\n$ wstool update -t src\n$ src/cartographer/scripts/install_proto3.sh\n$ sudo rosdep init   #\u003c--- Ignoring an error\n$ rosdep update\n$ rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y\n```\n3. Execute below.\n```\n$ sudo nano /etc/dphys-swapfile\nCONF_SWAPSIZE=2048\n$ sudo /etc/init.d/dphys-swapfile restart swapon -s\n$ sudo apt install libsuitesparse-dev libsuitesparseconfig4 libcxsparse3 \\\nlibmetis-dev libmetis5 libmetis5-dbg metis libtbb-dev libtbb2 lua-bit32 \\\nlua-bit32-dev liblua5.3-0 liblua5.3-0-dbg liblua5.3-dev lua5.3 sphinx-common \\\nliburdfdom-tools libogre-1.9.0v5 ogre-1.9-tools libogre-1.9-dev \\\nassimp-utils libassimp3v5 python-pyassimp libassimp-dev \\\nqt3d-assimpsceneio-plugin sip-dev librviz-dev librviz2d python-rviz rviz\n$ cd src\n$ git clone https://github.com/PINTO0309/urdf.git\n$ git clone https://github.com/PINTO0309/urdfdom_headers.git\n$ git clone https://github.com/PINTO0309/rosconsole_bridge.git\n$ cd urdfdom_headers\n$ mkdir build \u0026\u0026 cd build \u0026\u0026 cmake ../ \u0026\u0026 make \u0026\u0026 sudo make install\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/urdfdom.git\n$ cd urdfdom\n$ mkdir build \u0026\u0026 cd build \u0026\u0026 cmake ../ \u0026\u0026 make \u0026\u0026 sudo make install\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/PINTO0309/interactive_markers.git\n$ git clone https://github.com/PINTO0309/python_qt_binding.git\n$ git clone https://github.com/PINTO0309/resource_retriever.git\n$ git clone https://github.com/PINTO0309/robot_state_publisher.git\n$ git clone https://github.com/PINTO0309/kdl_parser.git\n$ git clone https://github.com/PINTO0309/rplidar_ros.git\n$ git clone https://github.com/PINTO0309/rosserial.git\n$ git clone https://github.com/PINTO0309/zumo32u4.git\n$ cd ~\n$ git clone https://github.com/PINTO0309/pybindgen.git\n$ cd pybindgen\n$ sudo python setup.py install\n$ cd ~/catkin_ws/src/cartographer_ros\n$ rm -r -f cartographer_rviz\n$ cd ~/catkin_ws\n$ catkin_make_isolated -j1 --install --use-ninja\n$ source install_isolated/setup.bash\n```\n\n### **Perform work with Ubuntu16.04**\u003cbr\u003e\n4. Execute below.\n```\n$ cd ~/catkin_ws/src/zumo32u4/urdf\n$ cp zumo32u4.STL ~/catkin_ws/install_isolated/share/cartographer_ros/urdf\n$ cp zumo32u4.gv ~/catkin_ws/install_isolated/share/cartographer_ros/urdf\n$ cp zumo32u4.urdf ~/catkin_ws/install_isolated/share/cartographer_ros/urdf\n$ nano ~/catkin_ws/install_isolated/share/cartographer_ros/urdf/zumo32u4.urdf\n```\n```\n\u003cgeometry\u003e\n    \u003cmesh filename=\"package://cartographer_ros/urdf/zumo32u4.STL\" scale=\"1 1 1\"/\u003e\n\u003c/geometry\u003e\n```\n5. Execute below.\n```\n$ nano ~/catkin_ws/src/cartographer_ros/cartographer_ros/launch/backpack_2d.launch\n```\n```\n\u003c?xml version=\"1.0\" ?\u003e\n\u003claunch\u003e\n  \u003cparam\n      name=\"robot_description\"\n      textfile=\"$(find cartographer_ros)/urdf/zumo32u4.urdf\"\n  /\u003e\n  \u003cnode\n      name=\"rviz\"\n      pkg=\"rviz\"\n      type=\"rviz\"\n      required=\"true\"\n      args=\"-d $(find cartographer_ros)/configuration_files/demo_2d.rviz\"\n  /\u003e\n\u003c/launch\u003e\n```\n6. Execute below.\n```\n$ nano ~/catkin_ws/src/cartographer_ros/cartographer_ros/configuration_files/demo_2d.rviz\n```\n```\nPanels:\n  - Class: rviz/Displays\n    Help Height: 0\n    Name: Displays\n    Property Tree Widget:\n      Expanded:\n        - /Submaps1\n        - /PointCloud21\n        - /Map1\n      Splitter Ratio: 0.600670993\n    Tree Height: 322\n  - Class: rviz/Selection\n    Name: Selection\n  - Class: rviz/Tool Properties\n    Expanded:\n      - /2D Pose Estimate1\n      - /2D Nav Goal1\n      - /Publish Point1\n    Name: Tool Properties\n    Splitter Ratio: 0.588679016\n  - Class: rviz/Views\n    Expanded:\n      - /Current View1\n    Name: Views\n    Splitter Ratio: 0.5\n  - Class: rviz/Time\n    Experimental: false\n    Name: Time\n    SyncMode: 0\n    SyncSource: PointCloud2\nVisualization Manager:\n  Class: \"\"\n  Displays:\n    - Alpha: 0.5\n      Cell Size: 1\n      Class: rviz/Grid\n      Color: 160; 160; 164\n      Enabled: true\n      Line Style:\n        Line Width: 0.0299999993\n        Value: Lines\n      Name: Grid\n      Normal Cell Count: 0\n      Offset:\n        X: 0\n        Y: 0\n        Z: 0\n      Plane: XY\n      Plane Cell Count: 100\n      Reference Frame: \u003cFixed Frame\u003e\n      Value: true\n    - Class: rviz/TF\n      Enabled: true\n      Frame Timeout: 15\n      Frames:\n        All Enabled: true\n        base_link:\n          Value: true\n        horizontal_laser_link:\n          Value: true\n        map:\n          Value: true\n        odom:\n          Value: true\n      Marker Scale: 1\n      Name: TF\n      Show Arrows: true\n      Show Axes: true\n      Show Names: true\n      Tree:\n        map:\n          base_link:\n            horizontal_laser_link:\n              {}\n            odom:\n              {}\n      Update Interval: 0\n      Value: true\n    - Alpha: 1\n      Class: rviz/RobotModel\n      Collision Enabled: false\n      Enabled: true\n      Links:\n        All Links Enabled: true\n        Expand Joint Details: false\n        Expand Link Details: false\n        Expand Tree: false\n        Link Tree Style: Links in Alphabetic Order\n        base_link:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n          Value: true\n        map:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n        odom:\n          Alpha: 1\n          Show Axes: false\n          Show Trail: false\n      Name: RobotModel\n      Robot Description: robot_description\n      TF Prefix: \"\"\n      Update Interval: 0\n      Value: true\n      Visual Enabled: true\n    - Class: Submaps\n      Enabled: true\n      Fade-out distance: 1\n      High Resolution: true\n      Low Resolution: false\n      Name: Submaps\n      Submap query service: /submap_query\n      Submaps:\n        All: true\n        Trajectory 0:\n          0.43: true\n          Value: true\n      Topic: /submap_list\n      Tracking frame: base_link\n      Unreliable: false\n      Value: true\n    - Alpha: 1\n      Autocompute Intensity Bounds: true\n      Autocompute Value Bounds:\n        Max Value: 10\n        Min Value: -10\n        Value: true\n      Axis: Z\n      Channel Name: intensity\n      Class: rviz/PointCloud2\n      Color: 0; 255; 0\n      Color Transformer: FlatColor\n      Decay Time: 0\n      Enabled: true\n      Invert Rainbow: false\n      Max Color: 255; 255; 255\n      Max Intensity: 4096\n      Min Color: 0; 0; 0\n      Min Intensity: 0\n      Name: PointCloud2\n      Position Transformer: XYZ\n      Queue Size: 10\n      Selectable: true\n      Size (Pixels): 3\n      Size (m): 0.0500000007\n      Style: Flat Squares\n      Topic: /scan_matched_points2\n      Unreliable: false\n      Use Fixed Frame: true\n      Use rainbow: true\n      Value: true\n    - Class: rviz/MarkerArray\n      Enabled: true\n      Marker Topic: /trajectory_node_list\n      Name: Trajectories\n      Namespaces:\n        Trajectory 0: true\n      Queue Size: 100\n      Value: true\n    - Class: rviz/MarkerArray\n      Enabled: true\n      Marker Topic: /landmark_poses_list\n      Name: Landmark Poses\n      Namespaces:\n        {}\n      Queue Size: 100\n      Value: true\n    - Class: rviz/MarkerArray\n      Enabled: true\n      Marker Topic: /constraint_list\n      Name: Constraints\n      Namespaces:\n        Inter constraints, different trajectories: true\n        Inter constraints, same trajectory: true\n        Inter residuals, different trajectories: true\n        Inter residuals, same trajectory: true\n        Intra constraints: true\n        Intra residuals: true\n      Queue Size: 100\n      Value: true\n    - Alpha: 0.699999988\n      Class: rviz/Map\n      Color Scheme: map\n      Draw Behind: false\n      Enabled: true\n      Name: Map\n      Topic: /map\n      Unreliable: false\n      Use Timestamp: false\n      Value: true\n    - Class: rviz/Image\n      Enabled: true\n      Image Topic: /camera/image_raw\n      Max Value: 1\n      Median window: 5\n      Min Value: 0\n      Name: Image\n      Normalize Range: true\n      Queue Size: 2\n      Transport Hint: raw\n      Unreliable: false\n      Value: true\n  Enabled: true\n  Global Options:\n    Background Color: 100; 100; 100\n    Default Light: true\n    Fixed Frame: map\n    Frame Rate: 30\n  Name: root\n  Tools:\n    - Class: rviz/Interact\n      Hide Inactive Objects: true\n    - Class: rviz/MoveCamera\n    - Class: rviz/Select\n    - Class: rviz/FocusCamera\n    - Class: rviz/Measure\n    - Class: rviz/SetInitialPose\n      Topic: /initialpose\n    - Class: rviz/SetGoal\n      Topic: /move_base_simple/goal\n    - Class: rviz/PublishPoint\n      Single click: true\n      Topic: /clicked_point\n  Value: true\n  Views:\n    Current:\n      Angle: 0\n      Class: rviz/TopDownOrtho\n      Enable Stereo Rendering:\n        Stereo Eye Separation: 0.0599999987\n        Stereo Focal Distance: 1\n        Swap Stereo Eyes: false\n        Value: false\n      Invert Z Axis: false\n      Name: Current View\n      Near Clip Distance: 0.00999999978\n      Scale: 92.3554459\n      Target Frame: \u003cFixed Frame\u003e\n      Value: TopDownOrtho (rviz)\n      X: 0.837544441\n      Y: 1.4433645\n    Saved: ~\nWindow Geometry:\n  Displays:\n    collapsed: false\n  Height: 848\n  Hide Left Dock: false\n  Hide Right Dock: true\n  Image:\n    collapsed: false\n  QMainWindow State: 000000ff00000000fd0000000400000000000001c5000002c6fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000183000000d700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d00610067006501000001b10000013d0000001600ffffff000000010000010f000002e2fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002e2000000ad00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000005ff0000003efc0100000002fb0000000800540069006d00650100000000000005ff0000030000fffffffb0000000800540069006d0065010000000000000450000000000000000000000434000002c600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000\n  Selection:\n    collapsed: false\n  Time:\n    collapsed: false\n  Tool Properties:\n    collapsed: false\n  Views:\n    collapsed: true\n  Width: 1535\n  X: 55\n  Y: 14\n```\n7. Execute below.\n```\n$ cd ~/catkin_ws\n$ catkin_make_isolated --install --use-ninja\n$ source install_isolated/setup.bash\n```\n\n### **Perform work with RaspberryPi3 (Raspbian Stretch)**\u003cbr\u003e\n8. Execute below.\n```\n$ cd ~/catkin_ws/src/cartographer_ros/cartographer_ros/launch\n$ cp backpack_2d.launch BK_backpack_2d.launch\n$ nano backpack_2d.launch\n```\n```\n\u003c?xml version=\"1.0\" ?\u003e\n\u003claunch\u003e\n  \u003cparam\n      name=\"robot_description\"\n      textfile=\"$(find zumo32u4)/urdf/zumo32u4.urdf\"\n  /\u003e\n  \u003cnode\n     name=\"horizontal_laser\"\n     pkg=\"rplidar_ros\"\n     type=\"rplidarNode\"\n     output=\"screen\"\u003e\n     \u003cparam name=\"serial_port\"      type=\"string\" value=\"/dev/ttyUSB0\"/\u003e\n     \u003cparam name=\"serial_baudrate\"  type=\"int\"    value=\"115200\"/\u003e\n     \u003cparam name=\"frame_id\"         type=\"string\" value=\"horizontal_laser_link\"/\u003e\n     \u003cparam name=\"inverted\"         type=\"bool\"   value=\"false\"/\u003e\n     \u003cparam name=\"angle_compensate\" type=\"bool\"   value=\"true\"/\u003e\n  \u003c/node\u003e\n  \u003cnode\n      pkg=\"tf\"\n      type=\"static_transform_publisher\"\n      name=\"base_link_connect\"\n      args=\"0 0 0 0 0 0 /base_link /horizontal_laser_link 100\"\n  /\u003e\n  \u003cnode\n      pkg=\"tf\"\n      type=\"static_transform_publisher\"\n      name=\"imu_link_connect\"\n      args=\"0 0 0 0 0 0 /base_link /imu_link 100\"\n  /\u003e\n  \u003cnode\n      name=\"cartographer_node\"\n      pkg=\"cartographer_ros\"\n      type=\"cartographer_node\"\n      args=\"-configuration_directory $(find cartographer_ros)/configuration_files -configuration_basename backpack_2d.lua\"\n      output=\"screen\"\u003e\n  \u003c/node\u003e\n  \u003cnode\n      name=\"cartographer_occupancy_grid_node\"\n      pkg=\"cartographer_ros\"\n      type=\"cartographer_occupancy_grid_node\"\n      args=\"-resolution 0.05\"\n  /\u003e\n\u003c/launch\u003e\n```\n9. Execute below.\n```\n$ cd ~/catkin_ws/src/cartographer_ros/cartographer_ros/configuration_files\n$ cp backpack_2d.lua BK_backpack_2d.lua\n$ nano backpack_2d.lua\n```\n```\ninclude \"map_builder.lua\"\ninclude \"trajectory_builder.lua\"\n\noptions = {\n  map_builder = MAP_BUILDER,\n  trajectory_builder = TRAJECTORY_BUILDER,\n  map_frame = \"map\",\n  tracking_frame = \"base_link\",\n  published_frame = \"odom\",\n  odom_frame = \"odom\",\n  provide_odom_frame = false,\n  publish_frame_projected_to_2d = false,\n  use_odometry = true,\n  use_nav_sat = false,\n  use_landmarks = false,\n  num_laser_scans = 1,\n  num_multi_echo_laser_scans = 0,\n  num_subdivisions_per_laser_scan = 1,\n  num_point_clouds = 0,\n  lookup_transform_timeout_sec = 0.2,\n  submap_publish_period_sec = 0.3,\n  pose_publish_period_sec = 5e-3,\n  trajectory_publish_period_sec = 30e-3,\n  rangefinder_sampling_ratio = 1.,\n  odometry_sampling_ratio = 1.,\n  fixed_frame_pose_sampling_ratio = 1.,\n  imu_sampling_ratio = 1.,\n  landmarks_sampling_ratio = 1.,\n}\n\nMAP_BUILDER.use_trajectory_builder_2d = true\n\nTRAJECTORY_BUILDER_2D.min_range = 0.\nTRAJECTORY_BUILDER_2D.max_range = 20.\nTRAJECTORY_BUILDER_2D.missing_data_ray_length = 5.\nTRAJECTORY_BUILDER_2D.use_imu_data = true\nTRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true\n\nPOSE_GRAPH.constraint_builder.min_score = 0.65\nPOSE_GRAPH.constraint_builder.global_localization_min_score = 0.7\n\nPOSE_GRAPH.optimization_problem.local_slam_pose_translation_weight = 1e5\nPOSE_GRAPH.optimization_problem.local_slam_pose_rotation_weight = 1e5\nPOSE_GRAPH.optimization_problem.odometry_translation_weight = 1e5\nPOSE_GRAPH.optimization_problem.odometry_rotation_weight = 1e5\nPOSE_GRAPH.optimization_problem.huber_scale = 1e3\n\nTRAJECTORY_BUILDER_2D.ceres_scan_matcher.occupied_space_weight = 10\nTRAJECTORY_BUILDER_2D.ceres_scan_matcher.rotation_weight = 40\n\nTRAJECTORY_BUILDER_2D.submaps.num_range_data = 120\nTRAJECTORY_BUILDER_2D.motion_filter.max_distance_meters = 0.1\nTRAJECTORY_BUILDER_2D.motion_filter.max_angle_radians = math.rad(0.2)\n\nreturn options\n```\n10. Execute below.\n```\n$ cd ~/catkin_ws\n$ catkin_make_isolated --install --use-ninja\n$ source install_isolated/setup.bash\n```\n\n## ◆ Execution and visualization of map generation by RaspberryPi + Arduino + RPLidar A1M8 + Google CartoGrapher\u003cbr\u003e\n\n### **Perform work with RaspberryPi3 (Raspbian Stretch)**\u003cbr\u003e\n\n**Terminal-1**\n```\n$ roscore\n```\n**Terminal-2**\n```\n$ rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=115200\n```\n**Terminal-3**\n```\n$ sudo rfcomm listen /dev/rfcomm0 1\n```\n\n\u003cbr\u003e\nWindows 10 Launch TeraTerm on PC side and connect to RFCOMM to RaspberryPi.\n\u003cbr\u003e\u003cbr\u003e\n\n**Terminal-4**\n```\n$ rosrun zumo32u4 zumo32u4.py\n```\n**Terminal-5**\n```\n$ cd ~/catkin_ws\n$ source install_isolated/setup.bash\n$ roslaunch cartographer_ros backpack_2d.launch\n```\n### **Perform work with Ubuntu16.04**\u003cbr\u003e\n\n**Terminal-1**\n```\n$ cd ~/catkin_ws\n$ catkin_make_isolated --install --use-ninja\n$ source install_isolated/setup.bash\n$ export ROS_MASTER_URI=http://raspberrypi.local:11311/\n$ roslaunch cartographer_ros backpack_2d.launch\n```\n## ◆ Zumo32u4 operation key mapping\u003cbr\u003e\n\nConnect from Windows 10 PC to Raspberry Pi with TeraTerm.\u003cbr\u003e\nAnd, you can control by the following key operation.\n![MotorControl](https://github.com/PINTO0309/zumo32u4/blob/master/media/0022_zumo32u4control.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinto0309%2Fzumo32u4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinto0309%2Fzumo32u4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinto0309%2Fzumo32u4/lists"}