-
Notifications
You must be signed in to change notification settings - Fork 1
Creating a Package for using the Navigation Stack
Michael Ruan edited this page Nov 20, 2019
·
4 revisions
The following steps illustrate the process in order to set up the nav_husky_gazebo package.
- Create the nav_husky_gazebo package with its dependencies:
$ catkin_create_pkg nav_husky_gazebo rospy move_base nav_msgs sensor_msgs std_msgs tf
- Create 4 .yaml configuration files in
config/
:- costmap common
- local costmap
- global costmap
- local base planner
- NOTE: Consult ROS nav stack SetUp and the Husky Github to see how the parameters were selected. Specifically look at the Husky URDF on the Github.
- Create launch file for Navigation Stack
launch/move_base.launch
. - Run
$ catkin_make
to and thensource slam-ws/devel/setup.bash
. This will build the package and make it available to ROS. These two commands must be run anytime a new package is modified or added.
# [Terminal 1] Start up the Robot in simulation
$ roslaunch husky_gazebo husky_playpen.launch
# [Terminal 2] Start rviz
$ roslaunch husky_viz view_robot.launch
# In rviz, tick the "Navigation" tick box
# [Terminal 3] Start up the Navigation Stack
# NOTE: make sure you build the package first!
$ roslaunch nav_husky_gazebo move_base.launch
To get the robot to navigate, set a 2D Nav Goal in rviz. With the Navigation enabled, it should attempt to autonomously navigate to the goal (this may fail for difficult goals, but will succeed for easy to reach goals). You can also set a goal programmatically by following the instructions here.
- NOTE: Difficult goals is another way of saying corner cases the Nav stack isn't configured to handle yet.
General ROS and Technical Help
- Creating a rospy package
- Model the Robot
- Odometry - General Information
- Odometry - Configuring with ROS
Creating and Using Our Packages