-
(easy way) Download the package
husky_highlevel_controller.zip
and unzip it to folder~/catkin_ws/src/
. -
Create subscriber to topic
/scan
with callback method- Check topic
/scan
# launch husky_gazebo roslaunch husky_gazebo husky_empty_world.launch # in a new terminal rostopic type /scan # get the topic type, which is 'sensor_msgs/LaserScan'
- Create callback method
void callback(const sensor_msgs::LaserScan &msg);
- Create subscriber
ros::Subscriber sub = nh.subscribe("/scan", 1, callback);
- Check topic
-
Add param file & create c++ API to load params
ros::getParam("param", var);
-
Create launch file
- add node
husky_highlevel_controller
- load param file
- launch
husky_empty_world.launch
with argumentlaser_enabled
- add
RViz
- add node
-
RViz configuration
- Set Fixed Frame under the Global Options to
odom
- Add plugin LaserScan and set the Topic as
/scan
; change the Size to have the best visualization of objects - Save the configuration
- Set Fixed Frame under the Global Options to