Preparation

Preparation of OS and ROS

Before installing SLAMKit, users can use table 1 to confirm that the using operating system and ROS version are compatible with the versions supported by SLAMKit. (ROS installation tutorials)

OS version

ROS version

Ubuntu 16.04 64bitKinetic
Ubuntu 18.04 64bitMelodic
Ubuntu 20.04 64bit Noetic

table 1: Corresponding OS and ROS

The following checks whether the odom topic meets the requirements of SLAMKit. Use the ROS commands to view the reported odom topic and its publishing frequency. It is necessary to ensure that there exists a ROS topic named /odom in the system, with data format nav_msgs/Odometry. SLAMKit needs to subscribe to this topic to get odometry data. Additionally, the publication frequency of /odom should be more than 50Hz, preferably 100Hz. It is important to note that the localization information output by SLAMKit is aligned with the coordinate system of the odom data provided by users. For example, in a differential-drive motion model, if the center of the odom is also the center of the wheelbase, then the localization result output by SLAMKit will be the pose of this wheelbase center in the map. Therefore, users should pay attention to this correspondence when providing odom data and getting localization pose.

rostopic list
rostopic hz /odom
Figure1 : Details of /odom Topic
Figure1 : Details of /odom Topic

Download SLAMKit Installation Package and Robostudio

Please download the SLAMKit "deb" installation package from the official website of SLAMTEC. Both the Intel and ARM on-chip architectures are supported currently. Ac- cordingly, users should download the package "xxx_x86_64.deb" when Intel chip based development platform is used. And "xxx_aarch64.deb" should be download when using ARM chip based development platform. The "xxx" represents the version number of each "deb" installation package.

Similar to the description in last step, users should additionally download the appropriate ROS middleware "slamware_ros_bridge" according to the used development platform and compiler version. Generally, for Ubuntu systems, the default compiler version corresponds to the following:

Ubuntu Version

GCC Version

Ubuntu 16.04 64 gcc5.4
Ubuntu 18.04 64 gcc7
Ubuntu 20.04 64 gcc9

table 2: Default GCC Version for Ubuntu

Please download RoboStudio from the official website of SLAMTEC. RoboStudio is a UI developed by SLAMTEC that is compatible with both Windows and Android. Users can use RoboStudio to connect with SLAMKit, enabling some operations such as mapping and self-localization monitoring, editing maps, and uploading configuration files.

Software Installation

  • Make a network connection between user's personal PC and IPC. Then, login to IPC using an SSH tool (MobaXterm is recommended). Or use the external peripherals such as a screen, keyboard, and mouse directly to login to the OS of IPC.
  • Copy the "deb" installation package and "slamware_ros_bridge" compressed file to the corresponding folder and change directory(use "cd" command) to that folder. Here, we'll use "/home/slamtec" as an example. If you encounter permission issues during copying, run the following command:

    sudo chmod -R 777 /home/slamtec
  • Replace "slamware_5.1.0_all.deb" in the following command with the actual name of the ".deb" file. And Run the following command to install the SLAMKit "deb" package.

    sudo dpkg --force-all --refuse-confdef -i /home/slamtec/slamware_5.1.0_all.deb
  • Unzip the "slamware_ros_bridge" middleware to the floder. Then, use the following commands to compile and install the middleware.

    tar zxvf /home/slamtec/slamware_ros_bridge-x86_64-gcc9.tar.gz
    cd /home/slamtec/slamware_ros_bridge/
    catkin_make
    source devel/setup.bash

Lidar Configuration

Users should download the default "cube config" file from the official website of SLAMTEC. The "cube config" can be divided into two kinds according to the interface type of the used RPLidar. One is released for the RPLidar with serial and USB interface named "Slamkit_serial.cube_cfg_dat". And the other is released for the ethernet RPLidar named "Slamkit_udp.cube_cfg_dat". Both cube config files are written in JSON format. Thus, users can use any kind of JSON editor to set private parameters(such as notepad). And the following steps will help users to update your own lidar configs onto SLAMKit.

Figure2 : SLAMKit Cube Config
Figure2 : SLAMKit Cube Config

Installation Configs of Lidar The configuration items of Lidar installation pose indicates the coordinates and yaw(heading angle) of the Lidar in the coordinate system with the odometry center as the origin. As shown in the figure below, the odometry coordinate system follows the right-hand rule, where the positive x-axis direction is towards the front of the odometry center, and the positive y-axis direction is to the left of the odometry center (consistent with the coordinate indication on the license card); Yaw is the angle between the 0◦ mark direction of the Lidar and the x-axis, with a range of [-π, π]. The units for the x and y parameters in the lidar installation pose configuration are meters, and for yaw, it's in radians.

Figure3 : Illustration of Lidar Installation Pose
Figure3 : Illustration of Lidar Installation Pose

Example If the lidar is installed 30cm in front of the odometry center and facing forward, the "installation_pose" should be configured as follows.

"installation_pose":
{
"x": 0.3,
"y": 0,
"yaw": 0 6
}

View Range Configs of Lidar In figure 4, the field of view configuration is primarily used to set the effective scanning range of the Lidar. The 0° angle corresponds to the position marked on the lidar, and the angle range of one lidar frame is described using [-π, π]. The field of view can be configured as multiple non-overlapping sectors, each described by a starting angle "start" and an angular range "size" ("start" and "size" are both in radians).

Figure4 : Angle Range of Lidar
Figure4 : Angle Range of Lidar

Example 1 For configuring an angle range of -135° ∼ 135° , "start" should be configured as -2.356 (-135° ), and "size" should be configured as 4.712 (270° ).

Figure5 : Example of Multiple View Ranges
Figure5 : Example of Multiple View Ranges

Example 2 Another example of multiple view ranges is illustrated. To filter the blue sector shown in figure 5, the corresponding configuration segments should be writtern as follows.

"aperture": [
{
"size": 1.570796,
"start": -2.617994
},
{
"size": 1.047198,
"start": -0.523599
},
{
"size": 1.570796,
"start": 1.047198
}]

Upload Configuration File Before uploading the cube config to IPC, make sure the "update server" service is active. If the "update server" service is not active, you need to start it manually. The following commmands are used to check the service status and start the service.

systemctl status update_server.service #check the service status
systemctl start update_server.service #start the service

Launch Robostudio and click "SlamCube Config Tool""Upload Configuration""Config file""Upload Config" Shown in the next figure. Then, Wait until the cube config is successfully uploaded.

Figure6 : Using Robostudio to Upload Cube Config
Figure6 : Using Robostudio to Upload Cube Config

Start Services

  • Run the following commands to launch "ROS bridge"middleware.
    roslaunch slamware_ros_bridge slamware_ros_bridge.launch
  • Run the following commands to restart the SLAMKit core services.
    systemctl restart slamwared
    systemctl restart agent
    Now, the SLAMKit has already been installed successfully. Note that the licensed software services will start automatically on boot after installation. However, users need to manage and start the odometry middleware "slamware_ros_bridge"yourself. And the odometry middleware must be started before the licensed software services, or use the command in Listing 9 to restart the corresponding services after starting the middleware.