Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 1.33 KB

course2.md

File metadata and controls

34 lines (31 loc) · 1.33 KB

Exercise Section 2

  • (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);
  • 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 argument laser_enabled
    • add RViz
  • 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