...
Table of Contents | ||
---|---|---|
|
...
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
...
Compile and Run
- Download the Slamware ROS SDK along with ROS examples.
- 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 language bash mkdir -p catkin_ws/src cd catkin_ws/src
- Initialize the workspace using the Catkin tool.
Code Block language bash catkin_init_workspace
- Compile.
Code Block language bash cd .. catkin_make
- Set up workspace environment.
Code Block language bash source devel/setup.bash
- Launch the slamware_ros_sdk_server_node node. Select the corresponding IP according to the mode.
Code Block language cpp 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
- Open another terminal, repeat step 5, and start the view_slamware_ros_sdk_server_node node.
Code Block language bash roslaunch slamware_ros_sdk view_slamware_ros_sdk_server_node.launch
- Open another terminal, repeat step 5, and start the set_initial_pose_node node.
Code Block language bash roslaunch slamware_ros_sample set_initial_pose.launch
- 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 | ||||
---|---|---|---|---|
| ||||
ros::Publisher set_pose_pub; |
...