Turtlebot3 Burger RVIZ Scan 202102

From wikidb
Jump to: navigation, search

References

Execute to Examine Scan Topic Text Representation

TERMINAL 1

 $ ssh ubuntu@10.0.0.187
       ubuntu@10.0.0.187's password: 
       ...   
       ...

 $ ros2 launch turtlebot3_bringup robot.launch.py

TERMINAL 2

Notice the scan topic in line 13 of the topic list

    /scan

Notice the frame_id in line 5 of the scan topic

   frame_id: base_scan
$ ros2 topic list
/battery_state
/clicked_point
/cmd_vel
/goal_pose
/imu
/initialpose
/joint_states
/magnetic_field
/odom
/parameter_events
/robot_description
/rosout
/scan
/sensor_state
/tf
/tf_static


$ ros2 topic echo scan
header:
  stamp:
    sec: 1612485507
    nanosec: 294693855
  frame_id: base_scan
angle_min: 0.0
angle_max: 6.2657318115234375
angle_increment: 0.01745329238474369
time_increment: 2.9889999495935626e-05
scan_time: 0.0
range_min: 0.11999999731779099
range_max: 3.5
ranges: [0.5809999704360962, 0.5839999914169312, 0.5879999995231628, 0.5910000205039978, 0.5960000157356262, 0.6000000238418579, 
0.6029999852180481, 0.6079999804496765, 0.6119999885559082, 0.6159999966621399, 0.6209999918937683, 0.6230000257492065, 
0.6330000162124634, 0.6389999985694885, 0.6430000066757202, 0.6489999890327454, 0.656000018119812, 0.6589999794960022, 
0.6679999828338623, 0.6759999990463257, 0.6830000281333923, 0.6949999928474426, 0.7009999752044678, 0.7099999785423279, 
0.7170000076293945, 0.7200000286102295, 0.7450000047683716, 0.7540000081062317, 0.7549999952316284, 0.7590000033378601, 
0.7649999856948853, 0.7720000147819519, 0.7870000004768372, 0.7940000295639038, 0.8080000281333923, 0.8420000076293945, 
0.7940000295639038, 0.7940000295639038, 0.7689999938011169, 0.7599999904632568, 0.7519999742507935, 0.7699999809265137, 
0.7649999856948853, 0.7789999842643738, 0.7839999794960022, 0.8899999856948853, 0.8769999742507935, 0.8450000286102295, 
0.8270000219345093, 0.0, 1.7109999656677246, 0.0, 0.0, 0.0, 1.652999997138977, 1.4040000438690186, 1.4149999618530273, 1.3969999551773071, 
1.3940000534057617, 1.4900000095367432, 1.5509999990463257, 1.9270000457763672, 1.9329999685287476, 1.9270000457763672, 
1.8990000486373901, 1.9190000295639038, 1.8839999437332153, 1.8949999809265137, 1.9040000438690186, 1.8819999694824219, 
1.9010000228881836, 1.8830000162124634, 1.8769999742507935, 1.8669999837875366, 1.878999948501587, 1.8739999532699585, 
1.8769999742507935, 1.8739999532699585, 1.878000020980835, 1.9149999618530273, 1.5859999656677246, 1.625, 1.6759999990463257, 
1.6030000448226929, 1.6260000467300415, 1.6480000019073486, 1.6449999809265137, 1.6729999780654907, 1.7610000371932983, 
1.7170000076293945, 1.6469999551773071, 1.6449999809265137, 1.6360000371932983, 1.6710000038146973, 1.7999999523162842, 
0.6830000281333923, 0.6240000128746033, 0.6579999923706055, 0.6579999923706055, 0.6579999923706055, 0.6570000052452087,
 0.6579999923706055, 0.6639999747276306, 0.6570000052452087, 0.656000018119812, 0.6600000262260437, 0.6620000004768372, 
0.6570000052452087, 0.6610000133514404, 1.9170000553131104, 1.9889999628067017, 2.0350000858306885, 2.0490000247955322, 
2.009999990463257, 2.0280001163482666, 2.1389999389648438, 2.184000015258789, 2.203000068664551, 2.239000082015991, 
2.2820000648498535, 2.306999921798706, 2.447000026702881, 2.5209999084472656, 2.5239999294281006, 2.569000005722046, 
2.5980000495910645, 2.5360000133514404, 2.8480000495910645, '...']
intensities: [3451.0, 3541.0, 3478.0, 3696.0, 3410.0, 3194.0, 3213.0, 3414.0, 3303.0, 3241.0, 2999.0, 3144.0, 3065.0, 
2827.0, 2843.0, 2876.0, 2915.0, 2960.0, 3080.0, 2840.0, 3077.0, 2913.0, 3013.0, 3022.0, 2848.0, 2694.0, 2743.0, 
2443.0, 2566.0, 2495.0, 2586.0, 3249.0, 1699.0, 3092.0, 3079.0, 2804.0, 2049.0, 2312.0, 2544.0, 2677.0, 2762.0, 
2714.0, 1877.0, 3032.0, 1909.0, 2426.0, 2307.0, 1931.0, 3122.0, 0.0, 199.0, 81.0, 162.0, 107.0, 1543.0, 1850.0, 1310.0, 
1614.0, 1651.0, 1746.0, 901.0, 1219.0, 1290.0, 1561.0, 1170.0, 1365.0, 1148.0, 1284.0, 1516.0, 1241.0, 1532.0, 1145.0,
1336.0, 1222.0, 1226.0, 1171.0, 1209.0, 1223.0, 1291.0, 2170.0, 1489.0, 437.0, 689.0, 746.0, 1226.0, 2279.0, 538.0, 920.0, 
1674.0, 334.0, 179.0, 811.0, 705.0, 251.0, 1205.0, 4970.0, 1526.0, 2751.0, 2887.0, 3085.0, 2755.0, 3265.0, 2810.0, 2929.0, 
3059.0, 3162.0, 3523.0, 1830.0, 1546.0, 649.0, 405.0, 610.0, 868.0, 283.0, 329.0, 545.0, 582.0, 475.0, 383.0, 300.0, 
439.0, 110.0, 117.0, 116.0, 487.0, 177.0, 424.0, 151.0, '...']
---

Execute to Examine Scan Topic Graphical Represetation

TERMINAL 2

$ rviz2 rviz2 &
  • "error: Frame[map]does not exist."
  • However, a "scan" topic references a "base_scan" as its frame_id. Let's use that.

RvizScanA2.png

  1. Set Global: Fixed Frame to "base_scan" using the drop-down menu (scan visualization should rotate with robot??)
  2. Using the "Add" button in the lower left corner, add a "LaserScan" visualization.
  3. Set LaserScan:Topic to "/scan" using the drop-down menu
  4. Set LaserScan:Topic:Reliabity to "System Default" or "Best Effort" using the drop-down menu
  5. Use File -> Save Config As, for example, "LaserScan.rviz" to place the configuration in
     ~/.rviz2/LaserScan.rviz

RvizScanE.png

rviz configuration files: the new one we just created and the default one.

 $ ll .rviz2
       -rw-rw-r--  1 eepp eepp 5461 Feb 26 12:04 LaserScan.rviz

 $ ll /opt/ros/foxy/share/rviz_common/default.rviz
       -rw-r--r-- 1 root root 3787 Dec  9 18:33 /opt/ros/foxy/share/rviz_common/default.rviz

Notes and Logs