SkillAgentSearch skills...

Zumo32u4

Zumo32u4(ATmega32u4) + RaspberryPi3(RaspberryPi) + SLAM(CartoGrapher/Gmapping) + RPLiDAR A1M8

Install / Use

/learn @PINTO0309/Zumo32u4

README

zumo32u4 (Assembled with 100:1 HP Motors)

SLAM by RaspberryPi3 + Zumo32u4 + RPLidarA1M8<br> Construction of GMapping environment or GoogleCartoGrapher environment using Zumo 32u4.<br><br> 【Japanese article Gmapping】 https://qiita.com/PINTO/items/9aa737c284dc4e8212f1<br><br> 【Japanese article Google CartoGrapher-01】 https://qiita.com/PINTO/items/4845c438cac05eda4d1e<br> 【Japanese article Google CartoGrapher-02】 https://qiita.com/PINTO/items/fb0d44b2bb9455800667<br> 【Japanese article Google CartoGrapher-03】 https://qiita.com/PINTO/items/d8fd7a91ee00df7702b7<br> 【Japanese article Google CartoGrapher-04】 https://qiita.com/PINTO/items/f8fa5d6ce55317ea590b<br><br> <Gmapping><br> MappingView<br><br> <Google CartoGrapher><br> No odometry and no IMU<br> Use 2D LiDAR only<br> CartoGrapherMapMov<br> With odometry and IMU and 2D LiDAR<br> CartoGrapherMapwodomimu<br> CartoGrapherMap<br>

◆ Change log<br>

2018.05.05 Ver 0.1.0 Under development<br> 2018.05.12 Ver 1.0.0 First Release<br> 2018.06.10 Ver 1.0.1 Bug fix. Maintenance continues for Readme.<br>

◆ Environment<br>

Environment SWStack Robot01 Robot02 Robot03

  1. Zumo32u4 (ATmega32u4 Assembled with 100:1 HP Motors)
  2. RaspberryPi3 (Raspbian Stretch + ROS kinetic)
  3. RPLidar A1M8 (SDK ver 1.5.7 / Firmware ver 1.20)
  4. Python2.7
  5. C++
  6. ROS kinetic
  7. Working PC1 (Ubuntu16.04 + ROS kinetic + ArduinoIDE 1.8.5)
  8. Working PC2 (Windows10 + TeraTerm)<br><br>

◆ Procedure for environment building (Common procedure between GMapping and Google CartoGrapher)

Perform work with Ubuntu16.04<br>

  1. Execute below
$ export ROS_MASTER_URI=http://raspberrypi.local:11311/

OR

$ export ROS_MASTER_URI=http://<RaspberryPi IPaddress>:11311/

Perform work with RaspberryPi3 (Raspbian Stretch)<br>

  1. Introduction of navigation package. Execute below.
$ sudo apt update;sudo apt upgrade
$ sudo apt install -y libbullet-dev libsdl-dev libsdl2-2.0 \
libsdl2-dev libsdl-image1.2-dev libyaml-cpp0.3-dev libyaml-cpp0.3v5

$ cd ~
$ sudo apt install cmake-curses-gui
$ git clone -b debian/kinetic/bfl https://github.com/PINTO0309/bfl-release.git
$ cd bfl-release;mkdir build;cd build
$ ccmake ..
  1. Press the "c" key
  2. Wait about 30 seconds
  3. Press the "e" key
  4. Set as shown below ccmake
  5. Introduction of navigation package. Execute below.
$ make -j3
$ sudo make install

$ cd ~
$ sudo apt install -y liborocos-kdl-dev liborocos-kdl1.3 libflann1.9 libflann-dev \
libpcl-apps1.8 libpcl-common1.8 libpcl-dev libpcl-doc libpcl-features1.8 \
libpcl-filters1.8 libpcl-io1.8 libpcl-kdtree1.8 libpcl-keypoints1.8 libpcl-ml1.8 \
libpcl-octree1.8 libpcl-outofcore1.8 libpcl-people1.8 libpcl-recognition1.8 \
libpcl-registration1.8 libpcl-sample-consensus1.8 libpcl-search1.8 \
libpcl-segmentation1.8 libpcl-stereo1.8 libpcl-surface1.8 libpcl-tracking1.8 \
libpcl-visualization1.8 pcl-tools libvtk6-dev libvtk6-java libvtk6-jni \
libvtk6-qt-dev libvtk6.3 libvtk6.3-qt python-vtk6 tcl-vtk6 vtk6 vtk6-doc \
vtk6-examples libpoco-dev libpococrypto46 libpocodata46 libpocodatamysql46 \
libpocodataodbc46 libpocodatasqlite46 libpocofoundation46 libpocomongodb46 \
libpoconet46 libpoconetssl46 libpocoutil46 libpocoxml46 libpocozip46

$ cd /
$ sudo wget https://github.com/PINTO0309/uEye_4.90.0_Linux_Arm64hf/raw/master/uEye_4.90.0_Linux_Arm64hf.tgz
$ sudo tar -xzvf uEye_4.90.0_Linux_Arm64hf.tgz
$ sudo rm uEye_4.90.0_Linux_Arm64hf.tgz
$ sudo /usr/local/share/ueye/bin/ueyesdk-setup.sh

$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048
$ sudo /etc/init.d/dphys-swapfile restart swapon -s

$ export CMAKE_PREFIX_PATH=/opt/ros/kinetic:/home/pi/catkin_ws/devel:/home/pi/catkin_ws/install
$ cd ~/catkin_ws/src
$ git clone -b kinetic-devel https://github.com/PINTO0309/geometry2.git; \
git clone https://github.com/PINTO0309/dynamic_reconfigure.git; \
git clone https://github.com/PINTO0309/laser_geometry.git; \
git clone https://github.com/PINTO0309/navigation_msgs.git; \
git clone https://github.com/PINTO0309/perception_pcl.git; \
git clone https://github.com/PINTO0309/pcl_msgs.git; \
git clone https://github.com/PINTO0309/nodelet_core.git; \
git clone https://github.com/PINTO0309/bond_core.git; \
git clone -b kinetic-devel https://github.com/PINTO0309/pluginlib.git; \
git clone https://github.com/PINTO0309/class_loader.git; \
git clone https://github.com/PINTO0309/image_common.git; \
git clone https://github.com/PINTO0309/vision_opencv.git; \
git clone https://github.com/PINTO0309/geometry.git; \
git clone https://github.com/PINTO0309/roslint.git; \
git clone https://github.com/PINTO0309/navigation.git

$ cd ..
$ catkin_make -j1
$ sudo reboot
  1. Introduction of openslam_gmapping package and slam_gmapping meta package. Execute below.
$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/openslam_gmapping.git
$ git clone https://github.com/PINTO0309/slam_gmapping.git

$ cd ..
$ catkin_make -j1
  1. Introduction of RPLidarROS package. Execute below.
$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/rplidar_ros.git
$ cd ..
$ catkin_make

Perform work with Ubuntu16.04<br>

  1. Introduction of rviz option package. Execute below.
$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/visualization_tutorials.git
$ git clone https://github.com/PINTO0309/joint_state_publisher.git
$ git clone https://github.com/PINTO0309/robot_state_publisher.git
$ catkin_make
  1. Remodel the rosserial library. Execute below.
$ cd /home/<username>/Arduino/libraries/Rosserial_Arduino_Library/src
$ cp ros.h BK_ros.h
$ sudo nano ros.h

#else
  typedef NodeHandle_<ArduinoHardware, 15, 15, 128, 1024, FlashReadOutBuffer_> NodeHandle;

$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/zumo32u4.git
  1. After connecting Ubuntu and Arduino via a microUSB cable, open zumo32u4/zumo32u4arduino.ino in ArduinoIDE in the set of programs cloned above.
  2. Write a sketch to Arduino with "→" button of ArduinoIDE.

Perform work with RaspberryPi3 (Raspbian Stretch)<br>

  1. Execute below.
$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/zumo32u4.git
$ cd ..
$ catkin_make

<br><hr>

◆ Introduction of Google CartoGrapher<br>

Perform work with Ubuntu16.04<br>

  1. Execute below.
$ sudo apt update
$ sudo apt install -y python-wstool python-rosdep ninja-build
$ cd catkin_ws
$ wstool init src
$ wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
$ wstool update -t src
$ src/cartographer/scripts/install_proto3.sh
$ sudo rosdep init   #<--- Ignoring an error
$ rosdep update
$ rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
$ catkin_make_isolated --install --use-ninja
$ source install_isolated/setup.bash

Perform work with RaspberryPi3 (Raspbian Stretch)<br>

  1. Execute below.
$ sudo apt update;sudo apt upgrade
$ sudo apt install -y python-wstool python-rosdep ninja-build
$ cd catkin_ws
$ wstool init src
$ wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
$ wstool update -t src
$ src/cartographer/scripts/install_proto3.sh
$ sudo rosdep init   #<--- Ignoring an error
$ rosdep update
$ rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
  1. Execute below.
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048
$ sudo /etc/init.d/dphys-swapfile restart swapon -s
$ sudo apt install libsuitesparse-dev libsuitesparseconfig4 libcxsparse3 \
libmetis-dev libmetis5 libmetis5-dbg metis libtbb-dev libtbb2 lua-bit32 \
lua-bit32-dev liblua5.3-0 liblua5.3-0-dbg liblua5.3-dev lua5.3 sphinx-common \
liburdfdom-tools libogre-1.9.0v5 ogre-1.9-tools libogre-1.9-dev \
assimp-utils libassimp3v5 python-pyassimp libassimp-dev \
qt3d-assimpsceneio-plugin sip-dev librviz-dev librviz2d python-rviz rviz
$ cd src
$ git clone https://github.com/PINTO0309/urdf.git
$ git clone https://github.com/PINTO0309/urdfdom_headers.git
$ git clone https://github.com/PINTO0309/rosconsole_bridge.git
$ cd urdfdom_headers
$ mkdir build && cd build && cmake ../ && make && sudo make install
$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/urdfdom.git
$ cd urdfdom
$ mkdir build && cd build && cmake ../ && make && sudo make install
$ cd ~/catkin_ws/src
$ git clone https://github.com/PINTO0309/interactive_markers.git
$ git clone https://github.com/PINTO0309/python_qt_binding.git
$ git clone https://github.com/PINTO0309/resource_retriever.git
$ git clone https://github.com/PINTO0309/robot_state_publisher.git
$ git clone https://github.com/PINTO0309/kdl_parser.git
$ git clone https://github.com/PINTO0309/rplidar_ros.git
$ git clone https://github.com/PINTO0309/rosserial.git
$ git clone https://github.com/PINTO0309/zumo32u4.git
$ cd ~
$ git clone https://github.com/PINTO0309/pybindgen.git
$ cd pybindgen
$ sudo python setup.py install
$ cd ~/catkin_ws/src/cartographer_ros
$ rm -r -f cartographer_rviz
$ cd ~/catkin_ws
$ catkin_make_isolated -j1 --install --use-ninja
$ source install_isolated/setup.bash

**Perform work w

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated9mo ago
Forks5

Languages

Python

Security Score

87/100

Audited on Jul 6, 2025

No findings