In most of the launch files with Gazebo simulation, we disable gui for efficiency. However, there are command-line argument options: gui:=true
to enable gui, or verbose:=true
to enable more output information.
Since we need to run the simulation with more than one robot, therefore, we use ROS_NAMESPACE to handle nodes and topics for different robots. The default namespace for four robot setup are /r1
,/r2
,/r3
,/r4
respectively. In order to run a ROS node under some namespace, such as “/r1”, you can run that node with the specific namespace prefix.
Following is an example:
ROS_NAMESPACE="/r1" rosrun roborts_detection armor_detection_node
To be added.
The navigation system is built from three functionalities: localization, global planning and local planning. To run the general navigation testing for one robot, you can use the following command:
roslaunch roborts_bringup navigation_testing_with_simulation.launch
There are two usages: selecting navigation goal or adjust robot current pose.
In the rviz window, you can select 2D Navigation Goal
button followed by clicking and dragging desired position and orientation on the static map. Robot “/r1” should be able to find a path to the destination while avoiding any collision.
Similar, by selecting 2D Poisition Estimate
button to adjust the robot currrent position and orientation. If the LiDAR scan data does not match the static map, it is possibly because of the wrong initial pose, or the robot had collision with obstacles or others.
The global planner could be launched with:
rosrun roborts_planning global_planning_node
The global planner uses A* as path finding algorithm by default. To make sure A* is used, please check [path_to_ws]/src/RoboRTS-v2/roborts_planning/global_planner/config/global_planner_config.prototxt
. In this config file, name
and selected_algorithm
determine which algorithm is used by global planner.
name: "a_star_planner"
selected_algorithm: "a_star_planner"
As one of the testing direction, we test lapkt planner on path planner. In order to compile and run lapkt, please switch to navigation_testing
branch in RoboRTS-v2
.
cd [path_to_ws]/src/RoboRTS-v2
git checkout navigation_testing
Then, rebuild the roborts_planning
package. The dependency packages should be rebuilt by catkin build directly. The next step is to modify the config file to make the global planner using lapkt planner.
Open [path_to_ws]/src/RoboRTS-v2/roborts_planning/global_planner/config/global_planner_config.prototxt
, and comment out A* and uncomment lapkt planner. (Do not need to rebuild as it is only change the .prototxt
file.)
# name: "a_star_planner"
# selected_algorithm: "a_star_planner"
name: "lapkt_planner"
selected_algorithm: "lapkt_planner"
The local planner could be launched with:
rosrun roborts_planning local_planning_node
You can also test the performance for your configuration or changes on teb algorithm by using teb_test
. The instructions are listed as follows:
In terminal 1, run:
roscore
In terminal 2, run:
rosrun roborts_planning teb_test
In terminal 3, run:
rosrun rviz rviz -d src/RoboRTS-v2/roborts_bringup/rviz/teb_test.rviz
TODO write a launch file for TEB test After rviz is launched from these commands, you can move obstacles via the classic click-and-drag.