Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
excludeContents

...

Environment Setup

software platform

  • Ubuntu 20.04 X86
  • ROS Noetic

hardware platform

Choose any one below:

  • Slamware Kit (User Robot System based on Slamware Solution)
  • robot base systems like Apollo/Ares/Athena 

...

Sample Code Download

ROS-Sample Download Link

...

Compile and Run

  1. Download the Slamware ROS SDK along with ROS examples.

  2. Place the 'src' folder from the ROS SDK into an empty working directory, such as 'catkin_ws'. Also, put the 'slamware_ros_sample' folder from the ROS examples into the 'src' folder.
    Code Block
    languagebash
    mkdir -p catkin_ws/src
    cd catkin_ws/src
  3. Initialize the workspace using the Catkin tool.
    Code Block
    languagebash
    catkin_init_workspace
  4. Compile.
    Code Block
    languagebash
    cd ..
    catkin_make
  5. Set up workspace environment.
    Code Block
    languagebash
    source devel/setup.bash

  6. Launch the slamware_ros_sdk_server_node node. Select the corresponding IP according to the mode.
    Code Block
    languagecpp
    roslaunch slamware_ros_sdk slamware_ros_sdk_server_node.launch ip_address:=10.6.128.141    // Station mode
    // If in AP mode, the IP address is 192.168.11.1
  7. Open another terminal, repeat step 5, and start the view_slamware_ros_sdk_server_node node. 
    Code Block
    languagebash
    roslaunch slamware_ros_sdk view_slamware_ros_sdk_server_node.launch
  8. Open another terminal, repeat step 5, and start the set_initial_pose_node node. 
    Code Block
    languagebash
    roslaunch slamware_ros_sample set_initial_pose.launch
  9. Click on '2D Pose Estimate' in RVIZ, then left-click on the desired location in the interface where you want to set the position of the car. While holding the left mouse button, move to change the angle. Once you release the mouse button, the pose is successfully set.
    In the image below, the left side shows the effect before setting, and the right side shows the effect after setting.

...

Code Description

Code Block
languagecpp
titleDeclare a global Publisher variable
ros::Publisher set_pose_pub;

...