- Install google cartographer with
rosrun arti_navigation install_cartographer.sh
- this installs cartographer ROS as described [here] - Use
rosrun arti_navigation configure_terminals.sh
to add the necessary lines to bashrc which source the cartographer_ws and the arti_ws
The robot navigation is set up using the ROS Navigation Stack. To navigate, the robot needs to locate itself inside a given or even creates a new map while locating itself in it. This problem is also known as SLAM (simultaneous location and mapping). For SLAM, either gmapping or cartographer can be used. This ros package uses cartographer by default. This can changed by either calling the move_base launch file with the parameters gmapping:=true / cartographer=false
or simply changing them inside move_base.launch. By default, cartographer is used.
Use the following commands to start the robot and the navigation:
- Connect the computer to the
ARTI Chasi
Wi-Fi - Open a Terminal and connect to the ARTI Robot (Rpi4) via
ssh ubuntu@192.168.5.3
- password:ubuntu
- Start the ros nodes on the Robot with
roslaunch arti_chasi_mark3 arti_chasi_mark3_upstart_with_teleop.launch
- Open a second Terminal and start the navigation stack, together with the OS1 lidar, Rviz and cartographer:
roslaunch arti_navigation move_base.launch
- Inside Rviz click on
2D Nav Goal
on the upper menu and click on the position in the 2D map where you want the robot to navigate to.
- Record a rosbag with the mobile robot
- Start Visualization, Cartographer and Rosbag Playback with
roslaunch arti_navigation start_cartographer_with_rosbag.sh
- Connect the computer to the
ARTI Chasi
Wi-Fi - Open a Terminal and connect to the ARTI Robot (Rpi4) via
ssh ubuntu@192.168.5.3
- password:ubuntu
- Start the ros nodes on the Robot with
roslaunch arti_chasi_mark3 arti_chasi_mark3_upstart_with_teleop.launch
- Open a second Terminal and start the OS1 lidar and Rviz:
roslaunch arti_navigation arti_with_os1.launch
- Switch on the Controller
After the ros nodes on the robot and the os1_lidar with rviz is launched, start the cartograhper ROS node with
roslaunch arti_navigation arti_cartographer.launch
To store the processed data of google cartographer, please use the following commands while the cartographer node is still running:
rosservice call /finish_trajectory 0
rosservice call /write_state robxtask_1.pbstream true
rosrun map_server map_saver -f robxtask_1
mv .ros/robxtask_1.pbstream ~
This map can then later be used for localization only purposes. The *.yaml file has to be given as parameter for the map server arti_navigation/launch/move_base.launch
and
- arti_2d.lua
- contains the configuration for google cartographer. There are some crucial parameters to set and optimize, otherwise the map creation and navigation fails. See [lua configuration] and [cartographer tuning].
- move_base.launch
gmapping
- set to true to use gmapping instead of cartographercartographer
- set to true to use cartographer instead of gmappingrviz
- activate visualization with Rvizmap
- runs the map server with a predefined map
- tajectory_planner.yaml
- Different parameters can be altered to optimize the navigation behavior of the robot. See [costmap_2d] and [navigation stack setup].
- common_costmap_params.yaml
- See [costmap_2d] and [navigation stack setup].
- global_costmap_params.yaml
- See [costmap_2d] and [navigation stack setup].
- local_costmap_params.yaml
- See [costmap_2d] and [navigation stack setup].