[{"data":1,"prerenderedAt":4022},["ShallowReactive",2],{"wiki-page-\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai":3,"wiki-doc-items-\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai":3713,"language-switcher-data-\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai":4006,"wiki-i18n-paths-\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai":4021},{"id":4,"title":5,"body":6,"canonicalPath":3694,"chapterDepth":3695,"chapterOrder":3696,"date":3697,"description":12,"docI18nKey":3698,"docKey":3699,"docRoot":3700,"docTitle":3701,"extension":3702,"i18nKey":3703,"isBlogPost":3704,"isWikiDoc":115,"isWikiIndex":3704,"layout":3705,"legacyPath":3705,"locale":3706,"localeSlug":3707,"meta":3708,"navigation":115,"path":3694,"seo":3709,"sourcePath":3710,"sourceStem":3703,"stem":3711,"wikiDepth":81,"__hash__":3712},"content\u002F_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-Stage_Ros2仿真平台.md","Stage_Ros2 Simulation Platform",{"type":7,"value":8,"toc":3692},"minimark",[9,13,19,27,39,44,49,63,68,149,154,184,189,228,233,236,239,279,286,309,316,319,324,330,335,338,354,357,363,367,370,375,378,402,421,449,452,457,460,641,644,654,711,717,722,725,743,748,751,774,777,782,787,792,863,868,925,929,951,956,959,1063,1066,1071,1074,1079,1084,1088,1315,1319,1391,1396,1401,1404,1409,1412,1417,1420,1425,1428,1433,1436,1441,1444,1447,1450,1453,1458,1461,1465,1468,1473,1478,1481,1637,1644,1648,1650,1655,1659,1663,1966,1970,2116,2120,2123,2128,2130,2314,2317,2321,2323,2328,2332,2335,2340,2343,2357,2367,2372,2375,2776,2781,2835,2839,2857,2862,2865,2996,3001,3105,3109,3158,3163,3166,3323,3328,3399,3403,3428,3433,3436,3497,3500,3505,3511,3586,3591,3593,3596,3601,3606,3610,3613,3618,3621,3668,3672,3674,3679,3688],[10,11,12],"p",{},"stage_ros2 is a ROS2 package based on the Stage simulator, designed to simulate and control robot behavior in a virtual environment. It provides powerful tools and communication interfaces for developing, testing, and validating robot systems. With stage_ros2, users can easily create virtual environments and use ROS 2 to send commands to control robot movement while receiving sensor data. This package helps users reduce costs and risks in robot development, offering an efficient and flexible robot simulation environment.",[10,14,15],{},[16,17,18],"em",{},"Stage User Manual:",[10,20,21],{},[22,23,24],"a",{"href":24,"rel":25},"http:\u002F\u002Frtv.github.io\u002FStage\u002Fmodules.html",[26],"nofollow",[10,28,29,30,34,35,38],{},"(",[31,32,33],"strong",{},"Optional"," — ROS2 has already removed Stage, and ",[31,36,37],{},"Gazebo is a much better alternative",", but learning it won't hurt.)",[40,41,43],"h4",{"id":42},"installation-and-running-of-stage_ros2","Installation and Running of stage_ros2",[10,45,46],{},[31,47,48],{},"Prerequisites",[50,51,52,56],"ul",{},[53,54,55],"li",{},"ROS2 installed (e.g., Foxy, Galactic, or Humble)",[53,57,58,62],{},[59,60,61],"code",{},"turtlebot3"," packages installed",[10,64,65],{},[31,66,67],{},"Installation",[69,70,75],"pre",{"className":71,"code":72,"language":73,"meta":74,"style":74},"language-bash shiki shiki-themes github-light github-dark","# Clone the repository\ncd ~\u002Fros2_ws\u002Fsrc\ngit clone https:\u002F\u002Fgithub.com\u002FRobotnikAutomation\u002Fstage_ros2.git\n\n# Build the package\ncd ~\u002Fros2_ws\ncolcon build\nsource install\u002Fsetup.bash\n","bash","",[59,76,77,86,97,110,117,123,131,140],{"__ignoreMap":74},[78,79,82],"span",{"class":80,"line":81},"line",1,[78,83,85],{"class":84},"sJ8bj","# Clone the repository\n",[78,87,89,93],{"class":80,"line":88},2,[78,90,92],{"class":91},"sj4cs","cd",[78,94,96],{"class":95},"sZZnC"," ~\u002Fros2_ws\u002Fsrc\n",[78,98,100,104,107],{"class":80,"line":99},3,[78,101,103],{"class":102},"sScJk","git",[78,105,106],{"class":95}," clone",[78,108,109],{"class":95}," https:\u002F\u002Fgithub.com\u002FRobotnikAutomation\u002Fstage_ros2.git\n",[78,111,113],{"class":80,"line":112},4,[78,114,116],{"emptyLinePlaceholder":115},true,"\n",[78,118,120],{"class":80,"line":119},5,[78,121,122],{"class":84},"# Build the package\n",[78,124,126,128],{"class":80,"line":125},6,[78,127,92],{"class":91},[78,129,130],{"class":95}," ~\u002Fros2_ws\n",[78,132,134,137],{"class":80,"line":133},7,[78,135,136],{"class":102},"colcon",[78,138,139],{"class":95}," build\n",[78,141,143,146],{"class":80,"line":142},8,[78,144,145],{"class":91},"source",[78,147,148],{"class":95}," install\u002Fsetup.bash\n",[10,150,151],{},[31,152,153],{},"Running the Simulation",[69,155,157],{"className":71,"code":156,"language":73,"meta":74,"style":74},"# Launch the Stage simulator with a TurtleBot3 model\nros2 launch stage_ros2 stage.launch.py world_file:=worlds\u002Fempty.world robot_model:=turtlebot3_burger\n",[59,158,159,164],{"__ignoreMap":74},[78,160,161],{"class":80,"line":81},[78,162,163],{"class":84},"# Launch the Stage simulator with a TurtleBot3 model\n",[78,165,166,169,172,175,178,181],{"class":80,"line":88},[78,167,168],{"class":102},"ros2",[78,170,171],{"class":95}," launch",[78,173,174],{"class":95}," stage_ros2",[78,176,177],{"class":95}," stage.launch.py",[78,179,180],{"class":95}," world_file:=worlds\u002Fempty.world",[78,182,183],{"class":95}," robot_model:=turtlebot3_burger\n",[10,185,186],{},[31,187,188],{},"Basic Usage",[50,190,191,216],{},[53,192,193,194,197,198],{},"Control the robot with ",[59,195,196],{},"teleop_twist_keyboard",":\n",[69,199,201],{"className":71,"code":200,"language":73,"meta":74,"style":74},"ros2 run teleop_twist_keyboard teleop_twist_keyboard\n",[59,202,203],{"__ignoreMap":74},[78,204,205,207,210,213],{"class":80,"line":81},[78,206,168],{"class":102},[78,208,209],{"class":95}," run",[78,211,212],{"class":95}," teleop_twist_keyboard",[78,214,215],{"class":95}," teleop_twist_keyboard\n",[53,217,218,219],{},"View robot sensors in RViz2:\n",[69,220,222],{"className":71,"code":221,"language":73,"meta":74,"style":74},"rviz2\n",[59,223,224],{"__ignoreMap":74},[78,225,226],{"class":80,"line":81},[78,227,221],{"class":102},[229,230,231],"ol",{},[53,232,67],{},[10,234,235],{},"Since ROS2 has officially removed Stage, we need to manually install it by compiling from source. A developer has already adapted Stage for the ROS2 version:",[10,237,238],{},"Please first run the following command to install dependencies:",[69,240,242],{"className":71,"code":241,"language":73,"meta":74,"style":74},"sudo apt-get install git cmake g++ libjpeg8-dev libpng-dev libglu1-mesa-dev libltdl-dev libfltk1.1-dev\n",[59,243,244],{"__ignoreMap":74},[78,245,246,249,252,255,258,261,264,267,270,273,276],{"class":80,"line":81},[78,247,248],{"class":102},"sudo",[78,250,251],{"class":95}," apt-get",[78,253,254],{"class":95}," install",[78,256,257],{"class":95}," git",[78,259,260],{"class":95}," cmake",[78,262,263],{"class":95}," g++",[78,265,266],{"class":95}," libjpeg8-dev",[78,268,269],{"class":95}," libpng-dev",[78,271,272],{"class":95}," libglu1-mesa-dev",[78,274,275],{"class":95}," libltdl-dev",[78,277,278],{"class":95}," libfltk1.1-dev\n",[10,280,281,282,285],{},"Enter the ",[59,283,284],{},"src"," directory of the ROS2 workspace and run the following command to download the relevant repositories:",[69,287,289],{"className":71,"code":288,"language":73,"meta":74,"style":74},"git clone https:\u002F\u002Fgithub.com\u002Fdamuxt\u002FStage.git\ngit clone https:\u002F\u002Fgithub.com\u002Fdamuxt\u002Fstage_ros2.git\n",[59,290,291,300],{"__ignoreMap":74},[78,292,293,295,297],{"class":80,"line":81},[78,294,103],{"class":102},[78,296,106],{"class":95},[78,298,299],{"class":95}," https:\u002F\u002Fgithub.com\u002Fdamuxt\u002FStage.git\n",[78,301,302,304,306],{"class":80,"line":88},[78,303,103],{"class":102},[78,305,106],{"class":95},[78,307,308],{"class":95}," https:\u002F\u002Fgithub.com\u002Fdamuxt\u002Fstage_ros2.git\n",[10,310,311,312,315],{},"Enter the workspace directory and use the ",[59,313,314],{},"colcon build"," command to build.",[10,317,318],{},"(This is a third-party author's adaptation for the Humble version, which currently does not support the Jazzy version. Compiling the Jazzy version will result in errors; the author may update it for Jazzy in the future.)",[229,320,321],{"start":88},[53,322,323],{},"Node Description",[10,325,326,329],{},[59,327,328],{},"stage_ros2"," is a core node in the stage_ros2 package. It creates a simulation environment, including elements like maps, obstacles, and robots, by loading a world file. The world file describes the virtual environment's properties, and the node constructs the corresponding environment based on this description. The stage_ros2 node uses this virtual environment to simulate the robot's movement, perception, and control. Through the combination of this node and the world file, robot simulation and testing can be performed.",[229,331,332],{"start":99},[53,333,334],{},"Usage",[10,336,337],{},"Under the function package, usage examples are already built in. You can run the following command in the terminal to start the example:",[69,339,341],{"className":71,"code":340,"language":73,"meta":74,"style":74},"ros2 launch stage_ros2 my_house.launch.py\n",[59,342,343],{"__ignoreMap":74},[78,344,345,347,349,351],{"class":80,"line":81},[78,346,168],{"class":102},[78,348,171],{"class":95},[78,350,174],{"class":95},[78,352,353],{"class":95}," my_house.launch.py\n",[10,355,356],{},"The simulator and rviz2 will be launched, and in rviz2, relevant information such as odometry, LiDAR, and depth camera can be displayed. The running results are as follows.",[10,358,359],{},[360,361],"img",{"alt":74,"src":362},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1618.webp",[40,364,366],{"id":365},"stage_ros2-simulation-framework-setup","Stage_ros2 simulation framework setup",[10,368,369],{},"Starting from this section, we will introduce how to customize simulation environments through stage_ros2.",[229,371,372],{},[53,373,374],{},"Preparation",[10,376,377],{},"First, create a function package with the following instructions:",[69,379,381],{"className":71,"code":380,"language":73,"meta":74,"style":74},"ros2 pkg create demo_stage_sim --dependencies stage_ros2\n",[59,382,383],{"__ignoreMap":74},[78,384,385,387,390,393,396,399],{"class":80,"line":81},[78,386,168],{"class":102},[78,388,389],{"class":95}," pkg",[78,391,392],{"class":95}," create",[78,394,395],{"class":95}," demo_stage_sim",[78,397,398],{"class":91}," --dependencies",[78,400,401],{"class":95}," stage_ros2\n",[10,403,404,405,408,409,412,413,416,417,420],{},"Then create the ",[59,406,407],{},"launch",", ",[59,410,411],{},"world",", and ",[59,414,415],{},"config"," directories under the package, and modify the ",[59,418,419],{},"CMakeLists.txt"," file under the package by adding the following code:",[69,422,424],{"className":71,"code":423,"language":73,"meta":74,"style":74},"install(DIRECTORY launch world config DESTINATION share\u002F${PROJECT_NAME})\n",[59,425,426],{"__ignoreMap":74},[78,427,428,431,433,436,439,442,445],{"class":80,"line":81},[78,429,430],{"class":102},"install(DIRECTORY",[78,432,171],{"class":95},[78,434,435],{"class":95}," world",[78,437,438],{"class":95}," config",[78,440,441],{"class":95}," DESTINATION",[78,443,444],{"class":95}," share\u002F",[78,446,448],{"class":447},"sVt8B","${PROJECT_NAME})\n",[10,450,451],{},"Among them, the launch directory is used to store launch files, config is used to store rviz2 configuration files, and world is used to store simulation-related files. In the world directory, please create a new maps directory and copy the image assets from the course supporting materials into it.",[229,453,454],{"start":88},[53,455,456],{},"Build the Code Framework",[10,458,459],{},"In the launch directory of the package, create a new stage_sim.launch.py file and input the following content:",[69,461,463],{"className":71,"code":462,"language":73,"meta":74,"style":74},"import os\nfrom ament_index_python.packages import get_package_share_directory\nfrom launch import LaunchDescription\nfrom launch_ros.actions import Node\n\ndef generate_launch_description():\n    this_directory = get_package_share_directory('demo_stage_sim')\nreturn LaunchDescription([\n        Node(\n            package='stage_ros2',\n            executable='stage_ros2',\n            name='stage',\n            parameters=[{\"world_file\": os.path.join(this_directory,'world','sim.world')}],\n        )\n    ])\n",[59,464,465,473,487,498,510,514,527,546,558,564,570,585,598,629,635],{"__ignoreMap":74},[78,466,467,470],{"class":80,"line":81},[78,468,469],{"class":102},"import",[78,471,472],{"class":95}," os\n",[78,474,475,478,481,484],{"class":80,"line":88},[78,476,477],{"class":102},"from",[78,479,480],{"class":95}," ament_index_python.packages",[78,482,483],{"class":95}," import",[78,485,486],{"class":95}," get_package_share_directory\n",[78,488,489,491,493,495],{"class":80,"line":99},[78,490,477],{"class":102},[78,492,171],{"class":95},[78,494,483],{"class":95},[78,496,497],{"class":95}," LaunchDescription\n",[78,499,500,502,505,507],{"class":80,"line":112},[78,501,477],{"class":102},[78,503,504],{"class":95}," launch_ros.actions",[78,506,483],{"class":95},[78,508,509],{"class":95}," Node\n",[78,511,512],{"class":80,"line":119},[78,513,116],{"emptyLinePlaceholder":115},[78,515,516,519,522,525],{"class":80,"line":125},[78,517,518],{"class":102},"def",[78,520,521],{"class":95}," generate_launch_description",[78,523,524],{"class":447},"()",[78,526,197],{"class":95},[78,528,529,532,535,538,540,543],{"class":80,"line":133},[78,530,531],{"class":102},"    this_directory",[78,533,534],{"class":95}," =",[78,536,537],{"class":95}," get_package_share_directory",[78,539,29],{"class":447},[78,541,542],{"class":102},"'demo_stage_sim'",[78,544,545],{"class":447},")\n",[78,547,548,552,555],{"class":80,"line":142},[78,549,551],{"class":550},"szBVR","return",[78,553,554],{"class":95}," LaunchDescription",[78,556,557],{"class":447},"([\n",[78,559,561],{"class":80,"line":560},9,[78,562,563],{"class":447},"        Node(\n",[78,565,567],{"class":80,"line":566},10,[78,568,569],{"class":447},"            package='stage_ros2',\n",[78,571,573,576,579,582],{"class":80,"line":572},11,[78,574,575],{"class":447},"            executable",[78,577,578],{"class":550},"=",[78,580,581],{"class":95},"'stage_ros2'",[78,583,584],{"class":447},",\n",[78,586,588,591,593,596],{"class":80,"line":587},12,[78,589,590],{"class":447},"            name",[78,592,578],{"class":550},[78,594,595],{"class":95},"'stage'",[78,597,584],{"class":447},[78,599,601,604,606,609,612,615,618,621,623,626],{"class":80,"line":600},13,[78,602,603],{"class":447},"            parameters",[78,605,578],{"class":550},[78,607,608],{"class":447},"[{",[78,610,611],{"class":95},"\"world_file\"",[78,613,614],{"class":447},": os.path.join(this_directory",[78,616,617],{"class":550},",",[78,619,620],{"class":95},"'world'",[78,622,617],{"class":550},[78,624,625],{"class":95},"'sim.world'",[78,627,628],{"class":447},")}],\n",[78,630,632],{"class":80,"line":631},14,[78,633,634],{"class":447},"        )\n",[78,636,638],{"class":80,"line":637},15,[78,639,640],{"class":447},"    ])\n",[10,642,643],{},"This launch file will run the stage_ros2 node and load the sim.world file from the world directory.",[10,645,646,647,649,650,653],{},"In the ",[59,648,411],{}," directory, create a new file named ",[59,651,652],{},"sim.world"," and enter the following content:",[69,655,657],{"className":71,"code":656,"language":73,"meta":74,"style":74},"\n# -----------------------------------------------------------------------------\n\n# 设置窗体\n\n# 设置模拟器地图分辨率(以 米\u002F像素 为单位)\nresolution 0.02\n\n# 设置模拟器的时间步长(以 毫秒 为单位)\ninterval_sim 100\n",[59,658,659,663,668,672,677,681,686,694,698,703],{"__ignoreMap":74},[78,660,661],{"class":80,"line":81},[78,662,116],{"emptyLinePlaceholder":115},[78,664,665],{"class":80,"line":88},[78,666,667],{"class":84},"# -----------------------------------------------------------------------------\n",[78,669,670],{"class":80,"line":99},[78,671,116],{"emptyLinePlaceholder":115},[78,673,674],{"class":80,"line":112},[78,675,676],{"class":84},"# 设置窗体\n",[78,678,679],{"class":80,"line":119},[78,680,116],{"emptyLinePlaceholder":115},[78,682,683],{"class":80,"line":125},[78,684,685],{"class":84},"# 设置模拟器地图分辨率(以 米\u002F像素 为单位)\n",[78,687,688,691],{"class":80,"line":133},[78,689,690],{"class":102},"resolution",[78,692,693],{"class":91}," 0.02\n",[78,695,696],{"class":80,"line":142},[78,697,116],{"emptyLinePlaceholder":115},[78,699,700],{"class":80,"line":560},[78,701,702],{"class":84},"# 设置模拟器的时间步长(以 毫秒 为单位)\n",[78,704,705,708],{"class":80,"line":566},[78,706,707],{"class":102},"interval_sim",[78,709,710],{"class":91}," 100\n",[10,712,713,714,716],{},"The ",[59,715,652],{}," file currently only declares some general parameters for the simulation environment.",[229,718,719],{"start":99},[53,720,721],{},"Compilation",[10,723,724],{},"In the terminal, navigate to the current workspace and compile the package:",[69,726,728],{"className":71,"code":727,"language":73,"meta":74,"style":74},"colcon build --packages-select demo_stage_sim\n",[59,729,730],{"__ignoreMap":74},[78,731,732,734,737,740],{"class":80,"line":81},[78,733,136],{"class":102},[78,735,736],{"class":95}," build",[78,738,739],{"class":91}," --packages-select",[78,741,742],{"class":95}," demo_stage_sim\n",[229,744,745],{"start":112},[53,746,747],{},"Execute",[10,749,750],{},"In the current workspace, open a terminal and enter the following command:",[69,752,754],{"className":71,"code":753,"language":73,"meta":74,"style":74},". install\u002Fsetup.bash\nros2 launch demo_stage_sim stage_sim.launch.py\n",[59,755,756,763],{"__ignoreMap":74},[78,757,758,761],{"class":80,"line":81},[78,759,760],{"class":91},".",[78,762,148],{"class":95},[78,764,765,767,769,771],{"class":80,"line":88},[78,766,168],{"class":102},[78,768,171],{"class":95},[78,770,395],{"class":95},[78,772,773],{"class":95}," stage_sim.launch.py\n",[10,775,776],{},"After executing this launch file, a window will appear with no content inside. Next, we can proceed to create the specific simulation content.",[10,778,779],{},[360,780],{"alt":74,"src":781},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1619.webp",[229,783,784],{"start":119},[53,785,786],{},"world file parameters",[10,788,789],{},[31,790,791],{},"Summary and Default Values",[69,793,795],{"className":71,"code":794,"language":73,"meta":74,"style":74},"name                      \u003Cworldfile name>\ninterval_sim              100\nquit_time                 0\nresolution                0.02\nshow_clock                0\nshow_clock_interval       100\nthreads                   0\n",[59,796,797,817,824,832,839,847,855],{"__ignoreMap":74},[78,798,799,802,805,808,811,814],{"class":80,"line":81},[78,800,801],{"class":102},"name",[78,803,804],{"class":550},"                      \u003C",[78,806,807],{"class":95},"worldfile",[78,809,810],{"class":95}," nam",[78,812,813],{"class":447},"e",[78,815,816],{"class":550},">\n",[78,818,819,821],{"class":80,"line":88},[78,820,707],{"class":102},[78,822,823],{"class":91},"              100\n",[78,825,826,829],{"class":80,"line":99},[78,827,828],{"class":102},"quit_time",[78,830,831],{"class":91},"                 0\n",[78,833,834,836],{"class":80,"line":112},[78,835,690],{"class":102},[78,837,838],{"class":91},"                0.02\n",[78,840,841,844],{"class":80,"line":119},[78,842,843],{"class":102},"show_clock",[78,845,846],{"class":91},"                0\n",[78,848,849,852],{"class":80,"line":125},[78,850,851],{"class":102},"show_clock_interval",[78,853,854],{"class":91},"       100\n",[78,856,857,860],{"class":80,"line":133},[78,858,859],{"class":102},"threads",[78,861,862],{"class":91},"                   0\n",[10,864,865],{},[31,866,867],{},"Detailed Explanation",[50,869,870,876,879,885,888,894,900,906,909,914,917,922],{},[53,871,872,873],{},"name ",[874,875],"string",{},[53,877,878],{},"A name used for identification in the world, such as in the title bar of a graphical user interface.",[53,880,881,882],{},"interval_sim ",[883,884],"float",{},[53,886,887],{},"The amount of simulated time that runs each time World::Update() is called. Each model has its own configurable update interval, which can be greater or smaller than this value, but intervals shorter than this value are not visible in the graphical user interface or World update callbacks. You likely do not need to change the default value of 100 milliseconds: this value is used internally by clients such as Player and WebSim.",[53,889,890,891],{},"quit_time ",[883,892,893],{}," stops the simulation after the simulated time reaches the specified number of seconds. In libstage, World::Update() returns true. In Stage with a graphical user interface, the simulation is paused. In Stage without a graphical user interface, Stage exits.",[53,895,896,897],{},"resolution ",[883,898,899],{}," The resolution of the underlying bitmap model, in meters. Larger values can speed up ray tracing, but at the cost of collision detection and perception accuracy. In general, the default value is a reasonable choice.",[53,901,902,903],{},"show_clock ",[904,905],"int",{},[53,907,908],{},"If non-zero, the simulation time is printed to standard output every $show_clock_interval updates. This is particularly useful for observing the progress of non-GUI simulations.",[53,910,911,912],{},"show_clock_interval ",[904,913],{},[53,915,916],{},"Set the number of updates between time prints on the standard output when $show_clock is enabled. By default, this occurs every 10 simulated seconds. Smaller values will marginally reduce the simulation speed.",[53,918,919,920],{},"threads ",[904,921],{},[53,923,924],{},"Number of worker threads to generate. Some models can update in parallel (e.g., lasers, rangefinders). Running 2 or more threads here may speed up simulation, depending on the number of available CPU cores and the world file. If you have high-resolution models with parallelism enabled (e.g., lasers with hundreds or thousands of samples, or a large number of models), use one thread per core.",[40,926,928],{"id":927},"to-configure-window-settings-in-stage_ros2-you-can-set-the-following-environment-variables","To configure window settings in stage_ros2, you can set the following environment variables:",[10,930,931,934,935,938,939,942,943,946,947,950],{},[59,932,933],{},"STAGE_WINDOW_WIDTH"," for width, ",[59,936,937],{},"STAGE_WINDOW_HEIGHT"," for height, ",[59,940,941],{},"STAGE_WINDOW_X"," and ",[59,944,945],{},"STAGE_WINDOW_Y"," for position.",[948,949],"br",{},"\nThese can be set in your launch file for persistent configuration.\nThe stage window consists of a menu bar and a view of the simulated world. We can zoom in and out of the view, and scroll to see more of the simulated world. Simulated robot devices, obstacles, and other elements are rendered as colored polygons. The window also supports visualization of data and configuration for various sensor and actuator models. The menu provides options for controlling which data and configurations are displayed. In this section, we will introduce how to set up and operate the stage window.",[229,952,953],{},[53,954,955],{},"Set up the form",[10,957,958],{},"To configure window-related parameters, you can add the following content to the stage_sim.launch.py file:",[69,960,962],{"className":71,"code":961,"language":73,"meta":74,"style":74},"\n# 配置窗体参数\nwindow\n(\n  size [ 700.000 700.000 ] # 窗体尺寸(以 像素 为单位)\n  scale 35  # 缩放比\n  center [ 0  0 ] # 地图相对于窗体的偏移量(以 米 为单位)\n  rotate [ 0  0 ] # 地图旋转角度\n  show_data 1     # 是否显示传感器数据 1=on 0=off\n)\n",[59,963,964,968,973,978,983,1003,1014,1032,1048,1059],{"__ignoreMap":74},[78,965,966],{"class":80,"line":81},[78,967,116],{"emptyLinePlaceholder":115},[78,969,970],{"class":80,"line":88},[78,971,972],{"class":84},"# 配置窗体参数\n",[78,974,975],{"class":80,"line":99},[78,976,977],{"class":102},"window\n",[78,979,980],{"class":80,"line":112},[78,981,982],{"class":447},"(\n",[78,984,985,988,991,994,997,1000],{"class":80,"line":119},[78,986,987],{"class":102},"  size",[78,989,990],{"class":447}," [ ",[78,992,993],{"class":91},"700.000",[78,995,996],{"class":91}," 700.000",[78,998,999],{"class":95}," ]",[78,1001,1002],{"class":84}," # 窗体尺寸(以 像素 为单位)\n",[78,1004,1005,1008,1011],{"class":80,"line":125},[78,1006,1007],{"class":102},"  scale",[78,1009,1010],{"class":91}," 35",[78,1012,1013],{"class":84},"  # 缩放比\n",[78,1015,1016,1019,1021,1024,1027,1029],{"class":80,"line":133},[78,1017,1018],{"class":102},"  center",[78,1020,990],{"class":447},[78,1022,1023],{"class":91},"0",[78,1025,1026],{"class":91},"  0",[78,1028,999],{"class":95},[78,1030,1031],{"class":84}," # 地图相对于窗体的偏移量(以 米 为单位)\n",[78,1033,1034,1037,1039,1041,1043,1045],{"class":80,"line":142},[78,1035,1036],{"class":102},"  rotate",[78,1038,990],{"class":447},[78,1040,1023],{"class":91},[78,1042,1026],{"class":91},[78,1044,999],{"class":95},[78,1046,1047],{"class":84}," # 地图旋转角度\n",[78,1049,1050,1053,1056],{"class":80,"line":560},[78,1051,1052],{"class":102},"  show_data",[78,1054,1055],{"class":91}," 1",[78,1057,1058],{"class":84},"     # 是否显示传感器数据 1=on 0=off\n",[78,1060,1061],{"class":80,"line":566},[78,1062,545],{"class":447},[10,1064,1065],{},"The above code creates a window object with a resolution of 700x700, using a zoom ratio of 35x. The subsequently loaded map has no offset or rotation relative to the window and will display sensor data in a visual format.",[229,1067,1068],{"start":88},[53,1069,1070],{},"Compile and Execute",[10,1072,1073],{},"After building the functional package and executing the launch file, the result is as follows.",[10,1075,1076],{},[360,1077],{"alt":74,"src":1078},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1620.webp",[229,1080,1081],{"start":99},[53,1082,1083],{},"Form Parameters",[10,1085,1086],{},[31,1087,791],{},[69,1089,1091],{"className":71,"code":1090,"language":73,"meta":74,"style":74},"window\n(\n  size [ 400 300 ]\n\n  # camera options\n  center [ 0 0 ]\n  rotate [ 0 0 ]\n  scale 1.0\n\n  # perspective camera options\n  pcam_loc [ 0 -4 2 ]\n  pcam_angle [ 70 0 ]\n\n  # GUI options\n  show_data 0\n  show_flags 1\n  show_blocks 1\n  show_clock 1\n  show_footprints 0\n  show_grid 1\n  show_trailarrows 0\n  show_trailrise 0\n  show_trailfast 0\n  show_occupancy 0\n  show_tree 0\n  pcam_on 0\n  screenshots 0\n)\n",[59,1092,1093,1097,1101,1116,1120,1125,1138,1150,1157,1161,1166,1183,1197,1201,1206,1213,1222,1230,1238,1246,1254,1262,1270,1278,1286,1294,1302,1310],{"__ignoreMap":74},[78,1094,1095],{"class":80,"line":81},[78,1096,977],{"class":102},[78,1098,1099],{"class":80,"line":88},[78,1100,982],{"class":447},[78,1102,1103,1105,1107,1110,1113],{"class":80,"line":99},[78,1104,987],{"class":102},[78,1106,990],{"class":447},[78,1108,1109],{"class":91},"400",[78,1111,1112],{"class":91}," 300",[78,1114,1115],{"class":95}," ]\n",[78,1117,1118],{"class":80,"line":112},[78,1119,116],{"emptyLinePlaceholder":115},[78,1121,1122],{"class":80,"line":119},[78,1123,1124],{"class":84},"  # camera options\n",[78,1126,1127,1129,1131,1133,1136],{"class":80,"line":125},[78,1128,1018],{"class":102},[78,1130,990],{"class":447},[78,1132,1023],{"class":91},[78,1134,1135],{"class":91}," 0",[78,1137,1115],{"class":95},[78,1139,1140,1142,1144,1146,1148],{"class":80,"line":133},[78,1141,1036],{"class":102},[78,1143,990],{"class":447},[78,1145,1023],{"class":91},[78,1147,1135],{"class":91},[78,1149,1115],{"class":95},[78,1151,1152,1154],{"class":80,"line":142},[78,1153,1007],{"class":102},[78,1155,1156],{"class":91}," 1.0\n",[78,1158,1159],{"class":80,"line":560},[78,1160,116],{"emptyLinePlaceholder":115},[78,1162,1163],{"class":80,"line":566},[78,1164,1165],{"class":84},"  # perspective camera options\n",[78,1167,1168,1171,1173,1175,1178,1181],{"class":80,"line":572},[78,1169,1170],{"class":102},"  pcam_loc",[78,1172,990],{"class":447},[78,1174,1023],{"class":91},[78,1176,1177],{"class":91}," -4",[78,1179,1180],{"class":91}," 2",[78,1182,1115],{"class":95},[78,1184,1185,1188,1190,1193,1195],{"class":80,"line":587},[78,1186,1187],{"class":102},"  pcam_angle",[78,1189,990],{"class":447},[78,1191,1192],{"class":91},"70",[78,1194,1135],{"class":91},[78,1196,1115],{"class":95},[78,1198,1199],{"class":80,"line":600},[78,1200,116],{"emptyLinePlaceholder":115},[78,1202,1203],{"class":80,"line":631},[78,1204,1205],{"class":84},"  # GUI options\n",[78,1207,1208,1210],{"class":80,"line":637},[78,1209,1052],{"class":102},[78,1211,1212],{"class":91}," 0\n",[78,1214,1216,1219],{"class":80,"line":1215},16,[78,1217,1218],{"class":102},"  show_flags",[78,1220,1221],{"class":91}," 1\n",[78,1223,1225,1228],{"class":80,"line":1224},17,[78,1226,1227],{"class":102},"  show_blocks",[78,1229,1221],{"class":91},[78,1231,1233,1236],{"class":80,"line":1232},18,[78,1234,1235],{"class":102},"  show_clock",[78,1237,1221],{"class":91},[78,1239,1241,1244],{"class":80,"line":1240},19,[78,1242,1243],{"class":102},"  show_footprints",[78,1245,1212],{"class":91},[78,1247,1249,1252],{"class":80,"line":1248},20,[78,1250,1251],{"class":102},"  show_grid",[78,1253,1221],{"class":91},[78,1255,1257,1260],{"class":80,"line":1256},21,[78,1258,1259],{"class":102},"  show_trailarrows",[78,1261,1212],{"class":91},[78,1263,1265,1268],{"class":80,"line":1264},22,[78,1266,1267],{"class":102},"  show_trailrise",[78,1269,1212],{"class":91},[78,1271,1273,1276],{"class":80,"line":1272},23,[78,1274,1275],{"class":102},"  show_trailfast",[78,1277,1212],{"class":91},[78,1279,1281,1284],{"class":80,"line":1280},24,[78,1282,1283],{"class":102},"  show_occupancy",[78,1285,1212],{"class":91},[78,1287,1289,1292],{"class":80,"line":1288},25,[78,1290,1291],{"class":102},"  show_tree",[78,1293,1212],{"class":91},[78,1295,1297,1300],{"class":80,"line":1296},26,[78,1298,1299],{"class":102},"  pcam_on",[78,1301,1212],{"class":91},[78,1303,1305,1308],{"class":80,"line":1304},27,[78,1306,1307],{"class":102},"  screenshots",[78,1309,1212],{"class":91},[78,1311,1313],{"class":80,"line":1312},28,[78,1314,545],{"class":447},[10,1316,1317],{},[31,1318,867],{},[50,1320,1321,1326,1329,1338,1341,1344,1347,1356,1359,1364,1367,1370,1373,1380,1383,1388],{},[53,1322,1323,1324],{},"speedup ",[904,1325],{},[53,1327,1328],{},"Stage will attempt to run at this real-time multiplier. If set to -1, Stage will run as fast as possible and will not attempt to track real time.",[53,1330,1331,1332,1335,999],{},"size [",[22,1333,1334],{"href":1334},"width:int",[22,1336,1337],{"href":1337},"height:int",[53,1339,1340],{},"The size of the window (in pixels).",[53,1342,1343],{},"center [\u003Cx:float>\u003Cy:float> ]",[53,1345,1346],{},"The position of the window center, expressed in world coordinates (in meters).",[53,1348,1349,1350,1353,999],{},"rotate [",[22,1351,1352],{"href":1352},"pitch:float",[22,1354,1355],{"href":1355},"yaw:float",[53,1357,1358],{},"Rotation angle in degrees, relative to the vertical upward direction.",[53,1360,1361,1362],{},"scale",[883,1363],{},[53,1365,1366],{},"Ratio of world coordinates to pixel coordinates (window scaling).",[53,1368,1369],{},"pcam_loc [\u003Cx:int>\u003Cy:int>\u003Cz:int> ]",[53,1371,1372],{},"The position of the perspective camera (in meters).",[53,1374,1375,1376,1378,999],{},"pcam_angle [",[22,1377,1352],{"href":1352},[22,1379,1355],{"href":1355},[53,1381,1382],{},"Perspective camera's vertical and horizontal angles.",[53,1384,1385,1386],{},"pcam_on",[904,1387],{},[53,1389,1390],{},"Whether to enable the perspective camera (0\u002F1).",[229,1392,1393],{"start":112},[53,1394,1395],{},"Operation Window",[10,1397,1398],{},[31,1399,1400],{},"Scroll View",[10,1402,1403],{},"Left-click and drag on the background to move your view of the world.",[10,1405,1406],{},[31,1407,1408],{},"Zoom View",[10,1410,1411],{},"Scroll the mouse wheel to zoom in or out at the cursor position.",[10,1413,1414],{},[31,1415,1416],{},"Save the World",[10,1418,1419],{},"You can save the positions of all objects in the current world using the \"File\u002FSave\" menu item. Warning: Saving will overwrite the current world file. Before saving, copy your world file to preserve the old positions. Alternatively, you can use the \"File\u002FSave As\" menu item to save it to a new world file.",[10,1421,1422],{},[31,1423,1424],{},"Pausing and Resuming the Clock",[10,1426,1427],{},"Pressing the \"p\" key can pause or resume the simulation. Pressing the \".\" (period) key runs one simulation step. Holding down the \".\" key repeats stepping multiple times. Stepping pauses the simulation, so pressing the \"p\" key resumes it. The initial pause\u002Frun state can be set using the \"paused\" attribute in the world file.",[10,1429,1430],{},[31,1431,1432],{},"Select Model",[10,1434,1435],{},"You can select a model by left-clicking on it. You can also select multiple models by holding down the Shift key and clicking on several models. Selected models can be moved by dragging, or rotated by holding down the right mouse button and moving the mouse. Clicking on an empty spot in the world clears the selection. After clearing the selection, the last single model that was selected is saved as the target for several view options that affect specific models.",[10,1437,1438],{},[31,1439,1440],{},"View Options",[10,1442,1443],{},"The View menu provides many features that affect how the world is rendered. To the right of each option, there is usually a keyboard shortcut for quickly toggling the related setting.",[10,1445,1446],{},"The \"Data\" option (shortcut 'd') toggles sensor data visualization. The Filter Data option (shortcut Shift+'d') opens a dialog that allows enabling or disabling visualization for specific sensors. The \"Visualize All\" option in the dialog toggles whether sensor visualization is enabled for all models or only for the currently selected model.",[10,1448,1449],{},"The \"Follow\" option keeps the view locked to the last selected model.",[10,1451,1452],{},"The \"Perspective camera\" option switches from an orthographic view to a perspective view.",[10,1454,1455],{},[31,1456,1457],{},"Save screenshot",[10,1459,1460],{},"To save a series of screenshots of the world, select the \"Save screenshots\" option from the View menu to start capturing images, then select the same option from the menu again to stop.",[40,1462,1464],{"id":1463},"stage_ros2-basic-model","stage_ros2 basic model",[10,1466,1467],{},"The basic model simulates objects with fundamental attributes: position, size, velocity, color, and visibility to various sensors. The basic model also has a body composed of a linear list. Internally, the basic model is used as the base class for all other model types. We can use the basic model to simulate environmental objects. In Stage, chassis models, radar models, camera models, and so on can all be considered subclasses of the basic model.",[10,1469,1470],{},[360,1471],{"alt":74,"src":1472},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1621.webp",[229,1474,1475],{},[53,1476,1477],{},"Add basic model",[10,1479,1480],{},"Add the following content to the stage_sim.launch.py file:",[69,1482,1484],{"className":71,"code":1483,"language":73,"meta":74,"style":74},"\n# -----------------------------------------------------------------------------\n\n# 添加障碍物\nmodel( pose [ -2 -4 0 0 ] color \"green\")\n\n# define a block\ndefine my_block model\n(\n  size [1.0 1.0 1.0]\n  gui_nose 0\n  gui_grid 0\n  gui_outline 0\n)\n\n# throw in a block\nmy_block( pose [ 0 4 0 90 ] color \"red\" bitmap \"maps\u002Fghost.png\")\n",[59,1485,1486,1490,1494,1498,1503,1532,1536,1541,1552,1556,1569,1576,1583,1590,1594,1598,1603],{"__ignoreMap":74},[78,1487,1488],{"class":80,"line":81},[78,1489,116],{"emptyLinePlaceholder":115},[78,1491,1492],{"class":80,"line":88},[78,1493,667],{"class":84},[78,1495,1496],{"class":80,"line":99},[78,1497,116],{"emptyLinePlaceholder":115},[78,1499,1500],{"class":80,"line":112},[78,1501,1502],{"class":84},"# 添加障碍物\n",[78,1504,1505,1508,1511,1513,1516,1518,1520,1522,1524,1527,1530],{"class":80,"line":119},[78,1506,1507],{"class":102},"model(",[78,1509,1510],{"class":95}," pose",[78,1512,990],{"class":447},[78,1514,1515],{"class":91},"-2",[78,1517,1177],{"class":91},[78,1519,1135],{"class":91},[78,1521,1135],{"class":91},[78,1523,999],{"class":95},[78,1525,1526],{"class":95}," color",[78,1528,1529],{"class":95}," \"green\"",[78,1531,545],{"class":447},[78,1533,1534],{"class":80,"line":125},[78,1535,116],{"emptyLinePlaceholder":115},[78,1537,1538],{"class":80,"line":133},[78,1539,1540],{"class":84},"# define a block\n",[78,1542,1543,1546,1549],{"class":80,"line":142},[78,1544,1545],{"class":102},"define",[78,1547,1548],{"class":95}," my_block",[78,1550,1551],{"class":95}," model\n",[78,1553,1554],{"class":80,"line":560},[78,1555,982],{"class":447},[78,1557,1558,1560,1563,1566],{"class":80,"line":566},[78,1559,987],{"class":102},[78,1561,1562],{"class":447}," [1.0 ",[78,1564,1565],{"class":91},"1.0",[78,1567,1568],{"class":95}," 1.0]\n",[78,1570,1571,1574],{"class":80,"line":572},[78,1572,1573],{"class":102},"  gui_nose",[78,1575,1212],{"class":91},[78,1577,1578,1581],{"class":80,"line":587},[78,1579,1580],{"class":102},"  gui_grid",[78,1582,1212],{"class":91},[78,1584,1585,1588],{"class":80,"line":600},[78,1586,1587],{"class":102},"  gui_outline",[78,1589,1212],{"class":91},[78,1591,1592],{"class":80,"line":631},[78,1593,545],{"class":447},[78,1595,1596],{"class":80,"line":637},[78,1597,116],{"emptyLinePlaceholder":115},[78,1599,1600],{"class":80,"line":1215},[78,1601,1602],{"class":84},"# throw in a block\n",[78,1604,1605,1608,1610,1612,1614,1617,1619,1622,1624,1626,1629,1632,1635],{"class":80,"line":1224},[78,1606,1607],{"class":102},"my_block(",[78,1609,1510],{"class":95},[78,1611,990],{"class":447},[78,1613,1023],{"class":91},[78,1615,1616],{"class":91}," 4",[78,1618,1135],{"class":91},[78,1620,1621],{"class":91}," 90",[78,1623,999],{"class":95},[78,1625,1526],{"class":95},[78,1627,1628],{"class":95}," \"red\"",[78,1630,1631],{"class":95}," bitmap",[78,1633,1634],{"class":95}," \"maps\u002Fghost.png\"",[78,1636,545],{"class":447},[10,1638,1639,1640,1643],{},"In the code above, a green model object is created directly using the default base model, and a custom ",[59,1641,1642],{},"my_block"," model inheriting from the base model is also defined, followed by the creation of an instance of this custom model.",[229,1645,1646],{"start":88},[53,1647,1070],{},[10,1649,1073],{},[10,1651,1652],{},[360,1653],{"alt":74,"src":1654},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1622.webp",[229,1656,1657],{"start":99},[53,1658,1083],{},[10,1660,1661],{},[31,1662,791],{},[69,1664,1666],{"className":71,"code":1665,"language":73,"meta":74,"style":74},"model (\n    pose [ 0.0 0.0 0.0 0.0 ]\n    size [ 0.1 0.1 0.1 ]\n    origin [ 0.0 0.0 0.0 0.0 ]\n    velocity [ 0.0 0.0 0.0 0.0 ]\n    color \"red\"\n    color_rgba [ 0.0 0.0 0.0 1.0 ]\n    bitmap \"\"\n    ctrl \"\"\n\n    # determine how the model appears in various sensors\n    fiducial_return 0\n    fiducial_key 0\n    obstacle_return 1\n    ranger_return 1\n    blob_return 1\n    laser_return LaserVisible\n    gripper_return 0\n    gravity_return 0\n    sticky_return 0\n\n    # GUI properties\n    gui_nose 0\n    gui_grid 0\n    gui_outline 1\n    gui_move 0 (1 if the model has no parents);\n    boundary 0\n    mass 10.0\n    map_resolution 0.1\n    say \"\"\n    alwayson 0\n)\n",[59,1667,1668,1676,1695,1712,1729,1746,1754,1772,1780,1787,1791,1796,1803,1810,1817,1824,1831,1839,1846,1853,1860,1864,1869,1876,1883,1890,1921,1928,1936,1945,1953,1961],{"__ignoreMap":74},[78,1669,1670,1673],{"class":80,"line":81},[78,1671,1672],{"class":102},"model",[78,1674,1675],{"class":447}," (\n",[78,1677,1678,1681,1683,1686,1689,1691,1693],{"class":80,"line":88},[78,1679,1680],{"class":102},"    pose",[78,1682,990],{"class":447},[78,1684,1685],{"class":91},"0.0",[78,1687,1688],{"class":91}," 0.0",[78,1690,1688],{"class":91},[78,1692,1688],{"class":91},[78,1694,1115],{"class":95},[78,1696,1697,1700,1702,1705,1708,1710],{"class":80,"line":99},[78,1698,1699],{"class":102},"    size",[78,1701,990],{"class":447},[78,1703,1704],{"class":91},"0.1",[78,1706,1707],{"class":91}," 0.1",[78,1709,1707],{"class":91},[78,1711,1115],{"class":95},[78,1713,1714,1717,1719,1721,1723,1725,1727],{"class":80,"line":112},[78,1715,1716],{"class":102},"    origin",[78,1718,990],{"class":447},[78,1720,1685],{"class":91},[78,1722,1688],{"class":91},[78,1724,1688],{"class":91},[78,1726,1688],{"class":91},[78,1728,1115],{"class":95},[78,1730,1731,1734,1736,1738,1740,1742,1744],{"class":80,"line":119},[78,1732,1733],{"class":102},"    velocity",[78,1735,990],{"class":447},[78,1737,1685],{"class":91},[78,1739,1688],{"class":91},[78,1741,1688],{"class":91},[78,1743,1688],{"class":91},[78,1745,1115],{"class":95},[78,1747,1748,1751],{"class":80,"line":125},[78,1749,1750],{"class":102},"    color",[78,1752,1753],{"class":95}," \"red\"\n",[78,1755,1756,1759,1761,1763,1765,1767,1770],{"class":80,"line":133},[78,1757,1758],{"class":102},"    color_rgba",[78,1760,990],{"class":447},[78,1762,1685],{"class":91},[78,1764,1688],{"class":91},[78,1766,1688],{"class":91},[78,1768,1769],{"class":91}," 1.0",[78,1771,1115],{"class":95},[78,1773,1774,1777],{"class":80,"line":142},[78,1775,1776],{"class":102},"    bitmap",[78,1778,1779],{"class":95}," \"\"\n",[78,1781,1782,1785],{"class":80,"line":560},[78,1783,1784],{"class":102},"    ctrl",[78,1786,1779],{"class":95},[78,1788,1789],{"class":80,"line":566},[78,1790,116],{"emptyLinePlaceholder":115},[78,1792,1793],{"class":80,"line":572},[78,1794,1795],{"class":84},"    # determine how the model appears in various sensors\n",[78,1797,1798,1801],{"class":80,"line":587},[78,1799,1800],{"class":102},"    fiducial_return",[78,1802,1212],{"class":91},[78,1804,1805,1808],{"class":80,"line":600},[78,1806,1807],{"class":102},"    fiducial_key",[78,1809,1212],{"class":91},[78,1811,1812,1815],{"class":80,"line":631},[78,1813,1814],{"class":102},"    obstacle_return",[78,1816,1221],{"class":91},[78,1818,1819,1822],{"class":80,"line":637},[78,1820,1821],{"class":102},"    ranger_return",[78,1823,1221],{"class":91},[78,1825,1826,1829],{"class":80,"line":1215},[78,1827,1828],{"class":102},"    blob_return",[78,1830,1221],{"class":91},[78,1832,1833,1836],{"class":80,"line":1224},[78,1834,1835],{"class":102},"    laser_return",[78,1837,1838],{"class":95}," LaserVisible\n",[78,1840,1841,1844],{"class":80,"line":1232},[78,1842,1843],{"class":102},"    gripper_return",[78,1845,1212],{"class":91},[78,1847,1848,1851],{"class":80,"line":1240},[78,1849,1850],{"class":102},"    gravity_return",[78,1852,1212],{"class":91},[78,1854,1855,1858],{"class":80,"line":1248},[78,1856,1857],{"class":102},"    sticky_return",[78,1859,1212],{"class":91},[78,1861,1862],{"class":80,"line":1256},[78,1863,116],{"emptyLinePlaceholder":115},[78,1865,1866],{"class":80,"line":1264},[78,1867,1868],{"class":84},"    # GUI properties\n",[78,1870,1871,1874],{"class":80,"line":1272},[78,1872,1873],{"class":102},"    gui_nose",[78,1875,1212],{"class":91},[78,1877,1878,1881],{"class":80,"line":1280},[78,1879,1880],{"class":102},"    gui_grid",[78,1882,1212],{"class":91},[78,1884,1885,1888],{"class":80,"line":1288},[78,1886,1887],{"class":102},"    gui_outline",[78,1889,1221],{"class":91},[78,1891,1892,1895,1897,1900,1903,1906,1909,1912,1915,1918],{"class":80,"line":1296},[78,1893,1894],{"class":102},"    gui_move",[78,1896,1135],{"class":91},[78,1898,1899],{"class":447}," (1 ",[78,1901,1902],{"class":95},"if",[78,1904,1905],{"class":95}," the",[78,1907,1908],{"class":95}," model",[78,1910,1911],{"class":95}," has",[78,1913,1914],{"class":95}," no",[78,1916,1917],{"class":95}," parents",[78,1919,1920],{"class":447},");\n",[78,1922,1923,1926],{"class":80,"line":1304},[78,1924,1925],{"class":102},"    boundary",[78,1927,1212],{"class":91},[78,1929,1930,1933],{"class":80,"line":1312},[78,1931,1932],{"class":102},"    mass",[78,1934,1935],{"class":91}," 10.0\n",[78,1937,1939,1942],{"class":80,"line":1938},29,[78,1940,1941],{"class":102},"    map_resolution",[78,1943,1944],{"class":91}," 0.1\n",[78,1946,1948,1951],{"class":80,"line":1947},30,[78,1949,1950],{"class":102},"    say",[78,1952,1779],{"class":95},[78,1954,1956,1959],{"class":80,"line":1955},31,[78,1957,1958],{"class":102},"    alwayson",[78,1960,1212],{"class":91},[78,1962,1964],{"class":80,"line":1963},32,[78,1965,545],{"class":447},[10,1967,1968],{},[31,1969,867],{},[50,1971,1972,1987,1997,2012,2029,2032,2038,2044,2050,2056,2062,2068,2074,2080,2086,2092,2098,2104,2110],{},[53,1973,1974,1975],{},"pose [ x:",[883,1976,1977,1978],{}," y:",[883,1979,1980,1981],{}," z:",[883,1982,1983,1984],{}," heading:",[883,1985,1986],{}," ] Specifies the model's pose in its parent coordinate system.",[53,1988,1989,1990],{},"size [ x:",[883,1991,1977,1992],{},[883,1993,1980,1994],{},[883,1995,1996],{}," ] specifies the model's dimensions along each axis.",[53,1998,1999,2000,2011],{},"origin ",[78,2001,2002,2003],{}," x:",[883,2004,1977,2005],{},[883,2006,1980,2007],{},[883,2008,1983,2009],{},[883,2010],{}," Specifies the position of the object's center relative to its orientation.",[53,2013,2014,2015,2028],{},"velocity ",[78,2016,2002,2017],{},[883,2018,1977,2019],{},[883,2020,1980,2021],{},[883,2022,1983,2023],{},[883,2024,2025,2026],{}," omega:",[883,2027],{}," specifies the initial velocity of the model. Note that if the model collides with an obstacle, its velocity will be set to zero.",[53,2030,2031],{},"velocity_enable int (default is 0) Most models ignore their velocity state. This saves processing time, as the velocity of most models will never be set to a non-zero value. Some subclasses (e.g., ModelPosition) change this default because they expect movement. Users can specify a non-zero value here to enable velocity control for that model. This has the same effect as calling Model::VelocityEnable().",[53,2033,2034,2035],{},"color ",[874,2036,2037],{}," Specifies the object's color using a color name from the X11 database (rgb.txt).",[53,2039,2040,2041],{},"bitmap filename:",[874,2042,2043],{}," Draws a model by interpreting lines in the bitmap (supports bmp, jpeg, gif, png). The file is opened and parsed into a set of lines. These lines are scaled to fit within the rectangle defined by the model's current size.",[53,2045,2046,2047],{},"ctrl ",[874,2048,2049],{}," Specifies the model's controller module and its parameter string. For example, the string \"foo bar bash\" will load libfoo.so, and its Init() function will be called with the entire string as an argument (including the library name). The controller needs to parse the string (if parameters are required).",[53,2051,2052,2053],{},"fiducial_return fiducial_id ",[904,2054,2055],{}," If non-zero, this model is detected by the fiducialfinder sensor. This value is used as the fiducial identifier.",[53,2057,2058,2059],{},"fiducial_key ",[904,2060,2061],{}," The fiducial_id model will be detected by the fiducialfinder only when the model's and fiducialfinder's fiducial_key values match. This allows you to have several independent types of fiducial markers in the same environment, where each type is only visible to the fiducialfinders it has been \"tuned\" to.",[53,2063,2064,2065],{},"obstacle_return ",[904,2066,2067],{}," If set to 1, this model can collide with other models that also have this property enabled.",[53,2069,2070,2071],{},"ranger_return ",[904,2072,2073],{}," If set to 1, this model can be detected by the ranger sensor.",[53,2075,2076,2077],{},"blob_return ",[904,2078,2079],{}," If set to 1, the model can be detected in the blob_finder (depending on its color).",[53,2081,2082,2083],{},"laser_return ",[904,2084,2085],{}," If set to 0, this model will not be detected by laser sensors. If set to 1, the model will appear as normal (0) reflection in laser sensors. If set to 2, it will show as high (1) reflection.",[53,2087,2088,2089],{},"gripper_return ",[904,2090,2091],{}," If set to 1, the model can be grasped by the gripper and pushed via collision with anything that has a non-zero obstacle_return.",[53,2093,2094,2095],{},"gui_nose ",[904,2096,2097],{}," If set to 1, draws a nose on the model indicating its orientation (positive X-axis).",[53,2099,2100,2101],{},"gui_grid ",[904,2102,2103],{}," If set to 1, draws a scale grid on the model.",[53,2105,2106,2107],{},"gui_outline ",[904,2108,2109],{}," If set to 1, it draws a bounding box around the model, indicating its size.",[53,2111,2112,2113],{},"gui_move ",[904,2114,2115],{}," If set to 1, the model can be moved by mouse in the GUI window.",[40,2117,2119],{"id":2118},"add-map-to-stage_ros2","Add map to stage_ros2",[10,2121,2122],{},"In this section, we will add a global map to the simulation environment. Please first prepare an image to serve as the global map.",[229,2124,2125],{},[53,2126,2127],{},"Add Map",[10,2129,1480],{},[69,2131,2133],{"className":71,"code":2132,"language":73,"meta":74,"style":74},"\n# -----------------------------------------------------------------------------\n\n# 设置地图(定义模型)\ndefine floorplan model\n(\n  color \"gray30\"  # 颜色\n  boundary 1  # 为地图设置边框\n\n  gui_nose 0\n  gui_grid 0 \n\n  gui_outline 0\n  gripper_return 0\n  fiducial_return 0\n  laser_return 1\n)\n\n# 加载地图\nfloorplan\n( \n  name \"room\"\n  size [16.000 16.000 0.800]\n  pose [0 0 0 0]\n  bitmap \"maps\u002Froom.jpg\"\n  gui_move 0\n)\n",[59,2134,2135,2139,2143,2147,2152,2161,2165,2176,2186,2190,2196,2205,2209,2215,2222,2229,2236,2240,2244,2249,2254,2259,2267,2280,2295,2303,2310],{"__ignoreMap":74},[78,2136,2137],{"class":80,"line":81},[78,2138,116],{"emptyLinePlaceholder":115},[78,2140,2141],{"class":80,"line":88},[78,2142,667],{"class":84},[78,2144,2145],{"class":80,"line":99},[78,2146,116],{"emptyLinePlaceholder":115},[78,2148,2149],{"class":80,"line":112},[78,2150,2151],{"class":84},"# 设置地图(定义模型)\n",[78,2153,2154,2156,2159],{"class":80,"line":119},[78,2155,1545],{"class":102},[78,2157,2158],{"class":95}," floorplan",[78,2160,1551],{"class":95},[78,2162,2163],{"class":80,"line":125},[78,2164,982],{"class":447},[78,2166,2167,2170,2173],{"class":80,"line":133},[78,2168,2169],{"class":102},"  color",[78,2171,2172],{"class":95}," \"gray30\"",[78,2174,2175],{"class":84},"  # 颜色\n",[78,2177,2178,2181,2183],{"class":80,"line":142},[78,2179,2180],{"class":102},"  boundary",[78,2182,1055],{"class":91},[78,2184,2185],{"class":84},"  # 为地图设置边框\n",[78,2187,2188],{"class":80,"line":560},[78,2189,116],{"emptyLinePlaceholder":115},[78,2191,2192,2194],{"class":80,"line":566},[78,2193,1573],{"class":102},[78,2195,1212],{"class":91},[78,2197,2198,2200,2202],{"class":80,"line":572},[78,2199,1580],{"class":102},[78,2201,1135],{"class":91},[78,2203,2204],{"class":447}," \n",[78,2206,2207],{"class":80,"line":587},[78,2208,116],{"emptyLinePlaceholder":115},[78,2210,2211,2213],{"class":80,"line":600},[78,2212,1587],{"class":102},[78,2214,1212],{"class":91},[78,2216,2217,2220],{"class":80,"line":631},[78,2218,2219],{"class":102},"  gripper_return",[78,2221,1212],{"class":91},[78,2223,2224,2227],{"class":80,"line":637},[78,2225,2226],{"class":102},"  fiducial_return",[78,2228,1212],{"class":91},[78,2230,2231,2234],{"class":80,"line":1215},[78,2232,2233],{"class":102},"  laser_return",[78,2235,1221],{"class":91},[78,2237,2238],{"class":80,"line":1224},[78,2239,545],{"class":447},[78,2241,2242],{"class":80,"line":1232},[78,2243,116],{"emptyLinePlaceholder":115},[78,2245,2246],{"class":80,"line":1240},[78,2247,2248],{"class":84},"# 加载地图\n",[78,2250,2251],{"class":80,"line":1248},[78,2252,2253],{"class":102},"floorplan\n",[78,2255,2256],{"class":80,"line":1256},[78,2257,2258],{"class":447},"( \n",[78,2260,2261,2264],{"class":80,"line":1264},[78,2262,2263],{"class":102},"  name",[78,2265,2266],{"class":95}," \"room\"\n",[78,2268,2269,2271,2274,2277],{"class":80,"line":1272},[78,2270,987],{"class":102},[78,2272,2273],{"class":447}," [16.000 ",[78,2275,2276],{"class":91},"16.000",[78,2278,2279],{"class":95}," 0.800]\n",[78,2281,2282,2285,2288,2290,2292],{"class":80,"line":1280},[78,2283,2284],{"class":102},"  pose",[78,2286,2287],{"class":447}," [0 ",[78,2289,1023],{"class":91},[78,2291,1135],{"class":91},[78,2293,2294],{"class":95}," 0]\n",[78,2296,2297,2300],{"class":80,"line":1288},[78,2298,2299],{"class":102},"  bitmap",[78,2301,2302],{"class":95}," \"maps\u002Froom.jpg\"\n",[78,2304,2305,2308],{"class":80,"line":1296},[78,2306,2307],{"class":102},"  gui_move",[78,2309,1212],{"class":91},[78,2311,2312],{"class":80,"line":1304},[78,2313,545],{"class":447},[10,2315,2316],{},"The code above defines a custom floorplan model and creates a floorplan object loaded with map data based on this model.",[229,2318,2319],{"start":88},[53,2320,1070],{},[10,2322,1073],{},[10,2324,2325],{},[360,2326],{"alt":74,"src":2327},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1623.webp",[40,2329,2331],{"id":2330},"adding-a-robot-to-stage_ros2","Adding a robot to stage_ros2",[10,2333,2334],{},"This section will add a virtual robot composed of a chassis, a camera, and a LiDAR to the simulation environment.",[229,2336,2337],{},[53,2338,2339],{},"Code Framework Setup",[10,2341,2342],{},"Create a robot directory under the world directory, and within the robot directory, create files such as car_base.inc, camera.inc, laser.inc, and mycar.inc. The functions of each file are as follows:",[50,2344,2345,2348,2351,2354],{},[53,2346,2347],{},"car_base.inc: used for setting up the robot chassis module;",[53,2349,2350],{},"camera.inc: used to configure the robot's camera module;",[53,2352,2353],{},"laser.inc: used to configure the robot's LiDAR module;",[53,2355,2356],{},"mycar.inc: Used to assemble the various modules of the robot.",[10,2358,2359,2360,2363,2364,2366],{},"Additionally, it will include ",[59,2361,2362],{},"mycar.inc"," in ",[59,2365,652],{}," and call its robot generation functionality.",[229,2368,2369],{"start":88},[53,2370,2371],{},"Set up the robot chassis",[10,2373,2374],{},"The position model in Stage can simulate a mobile robot chassis using differential, omnidirectional, or Ackermann drive. Enter the following code in car_base.inc:",[69,2376,2378],{"className":71,"code":2377,"language":73,"meta":74,"style":74},"\n# 机器人底盘配置\ndefine car_base position \n(\n  color \"red\"                   # 车身颜色\n  drive \"diff\"                  # 车辆运动学模型                  \n  obstacle_return 1             \n  ranger_return 1           \n  blob_return 1                  \n  fiducial_return 1             \n\n  localization \"odom\"           # 定位方式\n  odom_error [ 0.05 0.05 0.0 0.1 ]  # 里程计误差\n\n  # localization_origin [0 0 0 0]   # 定位原点，默认为机器人的初始位置。\n\n  # [ xmin xmax ymin ymax zmin zmax amin amax ]        \n  velocity_bounds [-1 1 0 0 0 0 -45.0 45.0 ]         # 速度最值 \n  acceleration_bounds [-0.5 0.5 0 0 0 0 -45 45.0 ]   # 加速度最值\n\n  size [0.44 0.38 0.22]  # 车体尺寸\n  origin [0 0 0 0] # 旋转中心与车体中心的偏移量\n  mass 23.0 # 车体质量，单位kg\n\n  gui_nose 0 # 是否绘制方向指示标记\n\n  block( \n    points 8\n    point[0] [-0.2 0.18]\n    point[1] [-0.2 -0.18]\n    point[2] [-0.15 -0.27]\n    point[3] [0.12 -0.23]\n    point[4] [0.2 -0.12]\n    point[5] [0.2 0.12]\n    point[6] [0.12 0.23]\n    point[7] [-0.15 0.27]\n    z [0 0.22]\n  )\n)\n",[59,2379,2380,2384,2389,2401,2405,2414,2425,2435,2445,2455,2463,2467,2478,2500,2504,2509,2513,2518,2548,2577,2581,2597,2614,2625,2629,2638,2642,2649,2657,2668,2681,2694,2707,2721,2732,2743,2754,2765,2771],{"__ignoreMap":74},[78,2381,2382],{"class":80,"line":81},[78,2383,116],{"emptyLinePlaceholder":115},[78,2385,2386],{"class":80,"line":88},[78,2387,2388],{"class":84},"# 机器人底盘配置\n",[78,2390,2391,2393,2396,2399],{"class":80,"line":99},[78,2392,1545],{"class":102},[78,2394,2395],{"class":95}," car_base",[78,2397,2398],{"class":95}," position",[78,2400,2204],{"class":447},[78,2402,2403],{"class":80,"line":112},[78,2404,982],{"class":447},[78,2406,2407,2409,2411],{"class":80,"line":119},[78,2408,2169],{"class":102},[78,2410,1628],{"class":95},[78,2412,2413],{"class":84},"                   # 车身颜色\n",[78,2415,2416,2419,2422],{"class":80,"line":125},[78,2417,2418],{"class":102},"  drive",[78,2420,2421],{"class":95}," \"diff\"",[78,2423,2424],{"class":84},"                  # 车辆运动学模型                  \n",[78,2426,2427,2430,2432],{"class":80,"line":133},[78,2428,2429],{"class":102},"  obstacle_return",[78,2431,1055],{"class":91},[78,2433,2434],{"class":447},"             \n",[78,2436,2437,2440,2442],{"class":80,"line":142},[78,2438,2439],{"class":102},"  ranger_return",[78,2441,1055],{"class":91},[78,2443,2444],{"class":447},"           \n",[78,2446,2447,2450,2452],{"class":80,"line":560},[78,2448,2449],{"class":102},"  blob_return",[78,2451,1055],{"class":91},[78,2453,2454],{"class":447},"                  \n",[78,2456,2457,2459,2461],{"class":80,"line":566},[78,2458,2226],{"class":102},[78,2460,1055],{"class":91},[78,2462,2434],{"class":447},[78,2464,2465],{"class":80,"line":572},[78,2466,116],{"emptyLinePlaceholder":115},[78,2468,2469,2472,2475],{"class":80,"line":587},[78,2470,2471],{"class":102},"  localization",[78,2473,2474],{"class":95}," \"odom\"",[78,2476,2477],{"class":84},"           # 定位方式\n",[78,2479,2480,2483,2485,2488,2491,2493,2495,2497],{"class":80,"line":600},[78,2481,2482],{"class":102},"  odom_error",[78,2484,990],{"class":447},[78,2486,2487],{"class":91},"0.05",[78,2489,2490],{"class":91}," 0.05",[78,2492,1688],{"class":91},[78,2494,1707],{"class":91},[78,2496,999],{"class":95},[78,2498,2499],{"class":84},"  # 里程计误差\n",[78,2501,2502],{"class":80,"line":631},[78,2503,116],{"emptyLinePlaceholder":115},[78,2505,2506],{"class":80,"line":637},[78,2507,2508],{"class":84},"  # localization_origin [0 0 0 0]   # 定位原点，默认为机器人的初始位置。\n",[78,2510,2511],{"class":80,"line":1215},[78,2512,116],{"emptyLinePlaceholder":115},[78,2514,2515],{"class":80,"line":1224},[78,2516,2517],{"class":84},"  # [ xmin xmax ymin ymax zmin zmax amin amax ]        \n",[78,2519,2520,2523,2526,2529,2531,2533,2535,2537,2540,2543,2545],{"class":80,"line":1232},[78,2521,2522],{"class":102},"  velocity_bounds",[78,2524,2525],{"class":447}," [-1 ",[78,2527,2528],{"class":91},"1",[78,2530,1135],{"class":91},[78,2532,1135],{"class":91},[78,2534,1135],{"class":91},[78,2536,1135],{"class":91},[78,2538,2539],{"class":91}," -45.0",[78,2541,2542],{"class":91}," 45.0",[78,2544,999],{"class":95},[78,2546,2547],{"class":84},"         # 速度最值 \n",[78,2549,2550,2553,2556,2559,2561,2563,2565,2567,2570,2572,2574],{"class":80,"line":1240},[78,2551,2552],{"class":102},"  acceleration_bounds",[78,2554,2555],{"class":447}," [-0.5 ",[78,2557,2558],{"class":91},"0.5",[78,2560,1135],{"class":91},[78,2562,1135],{"class":91},[78,2564,1135],{"class":91},[78,2566,1135],{"class":91},[78,2568,2569],{"class":91}," -45",[78,2571,2542],{"class":91},[78,2573,999],{"class":95},[78,2575,2576],{"class":84},"   # 加速度最值\n",[78,2578,2579],{"class":80,"line":1248},[78,2580,116],{"emptyLinePlaceholder":115},[78,2582,2583,2585,2588,2591,2594],{"class":80,"line":1256},[78,2584,987],{"class":102},[78,2586,2587],{"class":447}," [0.44 ",[78,2589,2590],{"class":91},"0.38",[78,2592,2593],{"class":95}," 0.22]",[78,2595,2596],{"class":84},"  # 车体尺寸\n",[78,2598,2599,2602,2604,2606,2608,2611],{"class":80,"line":1264},[78,2600,2601],{"class":102},"  origin",[78,2603,2287],{"class":447},[78,2605,1023],{"class":91},[78,2607,1135],{"class":91},[78,2609,2610],{"class":95}," 0]",[78,2612,2613],{"class":84}," # 旋转中心与车体中心的偏移量\n",[78,2615,2616,2619,2622],{"class":80,"line":1272},[78,2617,2618],{"class":102},"  mass",[78,2620,2621],{"class":91}," 23.0",[78,2623,2624],{"class":84}," # 车体质量，单位kg\n",[78,2626,2627],{"class":80,"line":1280},[78,2628,116],{"emptyLinePlaceholder":115},[78,2630,2631,2633,2635],{"class":80,"line":1288},[78,2632,1573],{"class":102},[78,2634,1135],{"class":91},[78,2636,2637],{"class":84}," # 是否绘制方向指示标记\n",[78,2639,2640],{"class":80,"line":1296},[78,2641,116],{"emptyLinePlaceholder":115},[78,2643,2644,2647],{"class":80,"line":1304},[78,2645,2646],{"class":102},"  block(",[78,2648,2204],{"class":447},[78,2650,2651,2654],{"class":80,"line":1312},[78,2652,2653],{"class":102},"    points",[78,2655,2656],{"class":91}," 8\n",[78,2658,2659,2662,2665],{"class":80,"line":1938},[78,2660,2661],{"class":102},"    point[0]",[78,2663,2664],{"class":447}," [-0.2 ",[78,2666,2667],{"class":95},"0.18]\n",[78,2669,2670,2673,2675,2678],{"class":80,"line":1947},[78,2671,2672],{"class":102},"    point[1]",[78,2674,2664],{"class":447},[78,2676,2677],{"class":91},"-0.18",[78,2679,2680],{"class":447},"]\n",[78,2682,2683,2686,2689,2692],{"class":80,"line":1955},[78,2684,2685],{"class":102},"    point[2]",[78,2687,2688],{"class":447}," [-0.15 ",[78,2690,2691],{"class":91},"-0.27",[78,2693,2680],{"class":447},[78,2695,2696,2699,2702,2705],{"class":80,"line":1963},[78,2697,2698],{"class":102},"    point[3]",[78,2700,2701],{"class":447}," [0.12 ",[78,2703,2704],{"class":91},"-0.23",[78,2706,2680],{"class":447},[78,2708,2710,2713,2716,2719],{"class":80,"line":2709},33,[78,2711,2712],{"class":102},"    point[4]",[78,2714,2715],{"class":447}," [0.2 ",[78,2717,2718],{"class":91},"-0.12",[78,2720,2680],{"class":447},[78,2722,2724,2727,2729],{"class":80,"line":2723},34,[78,2725,2726],{"class":102},"    point[5]",[78,2728,2715],{"class":447},[78,2730,2731],{"class":95},"0.12]\n",[78,2733,2735,2738,2740],{"class":80,"line":2734},35,[78,2736,2737],{"class":102},"    point[6]",[78,2739,2701],{"class":447},[78,2741,2742],{"class":95},"0.23]\n",[78,2744,2746,2749,2751],{"class":80,"line":2745},36,[78,2747,2748],{"class":102},"    point[7]",[78,2750,2688],{"class":447},[78,2752,2753],{"class":95},"0.27]\n",[78,2755,2757,2760,2762],{"class":80,"line":2756},37,[78,2758,2759],{"class":102},"    z",[78,2761,2287],{"class":447},[78,2763,2764],{"class":95},"0.22]\n",[78,2766,2768],{"class":80,"line":2767},38,[78,2769,2770],{"class":447},"  )\n",[78,2772,2774],{"class":80,"line":2773},39,[78,2775,545],{"class":447},[10,2777,2778],{},[31,2779,2780],{},"Position Summary and Default Values",[69,2782,2784],{"className":71,"code":2783,"language":73,"meta":74,"style":74},"position(\n    drive \"diff\"\n    localization \"gps\"\n    localization_origin [\u003Cdefaults to model's start pose>]\n    odom_error [0.03 0.03 0.00 0.05]\n    velocity_enable 1\n)\n",[59,2785,2786,2791,2799,2807,2821,2826,2831],{"__ignoreMap":74},[78,2787,2788],{"class":80,"line":81},[78,2789,2790],{"class":102},"position(\n",[78,2792,2793,2796],{"class":80,"line":88},[78,2794,2795],{"class":102},"    drive",[78,2797,2798],{"class":95}," \"diff\"\n",[78,2800,2801,2804],{"class":80,"line":99},[78,2802,2803],{"class":102},"    localization",[78,2805,2806],{"class":95}," \"gps\"\n",[78,2808,2809,2812,2815,2818],{"class":80,"line":112},[78,2810,2811],{"class":102},"    localization_origin",[78,2813,2814],{"class":447}," [\u003Cdefaults ",[78,2816,2817],{"class":95},"to",[78,2819,2820],{"class":95}," model's start pose>]\n",[78,2822,2823],{"class":80,"line":119},[78,2824,2825],{"class":95},"    odom_error [0.03 0.03 0.00 0.05]\n",[78,2827,2828],{"class":80,"line":125},[78,2829,2830],{"class":95},"    velocity_enable 1\n",[78,2832,2833],{"class":80,"line":133},[78,2834,545],{"class":95},[10,2836,2837],{},[31,2838,867],{},[50,2840,2841,2844,2847,2850],{},[53,2842,2843],{},"The \"diff\", \"omni\", or \"car\" drive options select the differential steering model, omnidirectional mode, or car-like Ackermann mode.",[53,2845,2846],{},"The localization is set to \"gps\" or \"odom\". If \"gps\" is selected, the location model reports position with perfect accuracy. If \"odom\" is selected, a simple odometry model is used, and the position data will drift over time from the true location. The odometry model is parameterized by the odom_error property.",[53,2848,2849],{},"localization_origin [x y z theta] You can use the localization_origin parameter to set the origin of the localization coordinate system. By default, it copies the model's initial pose, so the robot will report positions relative to its starting location. Tip: If localization_origin is set to [0 0 0 0] and the localization method is \"gps\", the model will return its true global position. This setup is unrealistic but useful in research where you want to abstract away localization details.",[53,2851,2852,2853,2856],{},"odom_error ",[78,2854,2855],{},"x y z theta"," is the odometry error model parameter used when the \"odom\" localization method is selected. Each value represents the maximum error scaling factor for integrating x, y, and theta velocities when estimating odometry position. For each axis, if the value specified here is E, the actual scaling factor is randomly selected at startup within the range of -E\u002F2 to +E\u002F2. Note that due to rounding errors, setting these values to zero does not make localization perfectly accurate—to achieve this, you need to select the \"gps\" localization method.",[229,2858,2859],{"start":99},[53,2860,2861],{},"Set up the camera",[10,2863,2864],{},"The camera model in stage can simulate a depth camera. Enter the following code in camera.inc:",[69,2866,2868],{"className":71,"code":2867,"language":73,"meta":74,"style":74},"define my_camera camera\n(\n    range [ 0.3 3.0 ] # 相机采样范围\n    resolution [ 160 90 ]  #相机分辨率 1280 × 720 \u002F 8\n    fov [ 87 58 ] # 相机视场\n    pantilt [ 0 0 ] # 相机姿态\n    alwayson 1 # 是否一直处于启动状态\n    size [ 0.025 0.09 0.025 ] # 相机尺寸\n    color \"gray\" # 相机颜色\n)\n",[59,2869,2870,2880,2884,2902,2919,2937,2953,2962,2982,2992],{"__ignoreMap":74},[78,2871,2872,2874,2877],{"class":80,"line":81},[78,2873,1545],{"class":102},[78,2875,2876],{"class":95}," my_camera",[78,2878,2879],{"class":95}," camera\n",[78,2881,2882],{"class":80,"line":88},[78,2883,982],{"class":447},[78,2885,2886,2889,2891,2894,2897,2899],{"class":80,"line":99},[78,2887,2888],{"class":102},"    range",[78,2890,990],{"class":447},[78,2892,2893],{"class":91},"0.3",[78,2895,2896],{"class":91}," 3.0",[78,2898,999],{"class":95},[78,2900,2901],{"class":84}," # 相机采样范围\n",[78,2903,2904,2907,2909,2912,2914,2916],{"class":80,"line":112},[78,2905,2906],{"class":102},"    resolution",[78,2908,990],{"class":447},[78,2910,2911],{"class":91},"160",[78,2913,1621],{"class":91},[78,2915,999],{"class":95},[78,2917,2918],{"class":84},"  #相机分辨率 1280 × 720 \u002F 8\n",[78,2920,2921,2924,2926,2929,2932,2934],{"class":80,"line":119},[78,2922,2923],{"class":102},"    fov",[78,2925,990],{"class":447},[78,2927,2928],{"class":91},"87",[78,2930,2931],{"class":91}," 58",[78,2933,999],{"class":95},[78,2935,2936],{"class":84}," # 相机视场\n",[78,2938,2939,2942,2944,2946,2948,2950],{"class":80,"line":125},[78,2940,2941],{"class":102},"    pantilt",[78,2943,990],{"class":447},[78,2945,1023],{"class":91},[78,2947,1135],{"class":91},[78,2949,999],{"class":95},[78,2951,2952],{"class":84}," # 相机姿态\n",[78,2954,2955,2957,2959],{"class":80,"line":133},[78,2956,1958],{"class":102},[78,2958,1055],{"class":91},[78,2960,2961],{"class":84}," # 是否一直处于启动状态\n",[78,2963,2964,2966,2968,2971,2974,2977,2979],{"class":80,"line":142},[78,2965,1699],{"class":102},[78,2967,990],{"class":447},[78,2969,2970],{"class":91},"0.025",[78,2972,2973],{"class":91}," 0.09",[78,2975,2976],{"class":91}," 0.025",[78,2978,999],{"class":95},[78,2980,2981],{"class":84}," # 相机尺寸\n",[78,2983,2984,2986,2989],{"class":80,"line":560},[78,2985,1750],{"class":102},[78,2987,2988],{"class":95}," \"gray\"",[78,2990,2991],{"class":84}," # 相机颜色\n",[78,2993,2994],{"class":80,"line":566},[78,2995,545],{"class":447},[10,2997,2998],{},[31,2999,3000],{},"Camera Summary and Default Values",[69,3002,3004],{"className":71,"code":3003,"language":73,"meta":74,"style":74},"camera(\n  resolution [ 32 32 ]\n  range [ 0.2 8.0 ]\n  fov [ 70.0 40.0 ]\n  pantilt [ 0.0 0.0 ]\n  size [ 0.1 0.07 0.05 ]\n  color \"black\"\n  watts 100.0 \n)\n",[59,3005,3006,3011,3026,3041,3056,3069,3084,3091,3101],{"__ignoreMap":74},[78,3007,3008],{"class":80,"line":81},[78,3009,3010],{"class":102},"camera(\n",[78,3012,3013,3016,3018,3021,3024],{"class":80,"line":88},[78,3014,3015],{"class":102},"  resolution",[78,3017,990],{"class":447},[78,3019,3020],{"class":91},"32",[78,3022,3023],{"class":91}," 32",[78,3025,1115],{"class":95},[78,3027,3028,3031,3033,3036,3039],{"class":80,"line":99},[78,3029,3030],{"class":102},"  range",[78,3032,990],{"class":447},[78,3034,3035],{"class":91},"0.2",[78,3037,3038],{"class":91}," 8.0",[78,3040,1115],{"class":95},[78,3042,3043,3046,3048,3051,3054],{"class":80,"line":112},[78,3044,3045],{"class":102},"  fov",[78,3047,990],{"class":447},[78,3049,3050],{"class":91},"70.0",[78,3052,3053],{"class":91}," 40.0",[78,3055,1115],{"class":95},[78,3057,3058,3061,3063,3065,3067],{"class":80,"line":119},[78,3059,3060],{"class":102},"  pantilt",[78,3062,990],{"class":447},[78,3064,1685],{"class":91},[78,3066,1688],{"class":91},[78,3068,1115],{"class":95},[78,3070,3071,3073,3075,3077,3080,3082],{"class":80,"line":125},[78,3072,987],{"class":102},[78,3074,990],{"class":447},[78,3076,1704],{"class":91},[78,3078,3079],{"class":91}," 0.07",[78,3081,2490],{"class":91},[78,3083,1115],{"class":95},[78,3085,3086,3088],{"class":80,"line":133},[78,3087,2169],{"class":102},[78,3089,3090],{"class":95}," \"black\"\n",[78,3092,3093,3096,3099],{"class":80,"line":142},[78,3094,3095],{"class":102},"  watts",[78,3097,3098],{"class":91}," 100.0",[78,3100,2204],{"class":447},[78,3102,3103],{"class":80,"line":560},[78,3104,545],{"class":447},[10,3106,3107],{},[31,3108,867],{},[50,3110,3111,3120,3140,3149],{},[53,3112,3113,3114],{},"resolution [ width:",[904,3115,3116,3117],{}," height:",[904,3118,3119],{},"] Camera resolution.",[53,3121,3122,3123],{},"range [ min:",[883,3124,3125,3126],{}," max:",[883,3127,3128,3129,3132,3133,3136,3137,3139],{}," ] The distance range reported by the camera, in meters. Objects closer than ",[59,3130,3131],{},"min"," or farther than ",[59,3134,3135],{},"max"," will not be displayed. ",[59,3138,3131],{}," The smaller the number, the lower the depth accuracy - do not set this value too close to 0.",[53,3141,3142,3143],{},"fov [ horizontal: ",[883,3144,3145,3146],{}," vertical: ",[883,3147,3148],{}," ] The horizontal and vertical field of view angles, in degrees.",[53,3150,3151,3152],{},"pantilt [ pan:",[883,3153,3154,3155],{}," tilt:",[883,3156,3157],{}," ] The camera's orientation angle, in degrees. The left-right position is called pan, and the up-down position is called tilt.",[229,3159,3160],{"start":112},[53,3161,3162],{},"Set up the LiDAR",[10,3164,3165],{},"The ranger model in stage can simulate a LiDAR. Enter the following code in laser.inc:",[69,3167,3169],{"className":71,"code":3168,"language":73,"meta":74,"style":74},"define my_laser ranger\n(\n  sensor(\n\n    range [ 0.0  15.0 ]     # 雷达数据采集区间\n    fov 360.0               # 视角\n    samples 720             # 采样数\n    color_rgba [ 0 0 1 0.15 ] # 可视化光束颜色以及透明度\n  )\n  model # 雷达外观\n  (\n    pose [ 0 0 0 0 ]        # 雷达位姿\n    size [ 0.07 0.07 0.05 ] # 雷达尺寸信息\n    color \"blue\"            # 雷达颜色\n  )\n)\n",[59,3170,3171,3181,3185,3190,3194,3210,3220,3231,3251,3255,3263,3268,3287,3305,3315,3319],{"__ignoreMap":74},[78,3172,3173,3175,3178],{"class":80,"line":81},[78,3174,1545],{"class":102},[78,3176,3177],{"class":95}," my_laser",[78,3179,3180],{"class":95}," ranger\n",[78,3182,3183],{"class":80,"line":88},[78,3184,982],{"class":447},[78,3186,3187],{"class":80,"line":99},[78,3188,3189],{"class":102},"  sensor(\n",[78,3191,3192],{"class":80,"line":112},[78,3193,116],{"emptyLinePlaceholder":115},[78,3195,3196,3198,3200,3202,3205,3207],{"class":80,"line":119},[78,3197,2888],{"class":102},[78,3199,990],{"class":447},[78,3201,1685],{"class":91},[78,3203,3204],{"class":91},"  15.0",[78,3206,999],{"class":95},[78,3208,3209],{"class":84},"     # 雷达数据采集区间\n",[78,3211,3212,3214,3217],{"class":80,"line":125},[78,3213,2923],{"class":102},[78,3215,3216],{"class":91}," 360.0",[78,3218,3219],{"class":84},"               # 视角\n",[78,3221,3222,3225,3228],{"class":80,"line":133},[78,3223,3224],{"class":102},"    samples",[78,3226,3227],{"class":91}," 720",[78,3229,3230],{"class":84},"             # 采样数\n",[78,3232,3233,3235,3237,3239,3241,3243,3246,3248],{"class":80,"line":142},[78,3234,1758],{"class":102},[78,3236,990],{"class":447},[78,3238,1023],{"class":91},[78,3240,1135],{"class":91},[78,3242,1055],{"class":91},[78,3244,3245],{"class":91}," 0.15",[78,3247,999],{"class":95},[78,3249,3250],{"class":84}," # 可视化光束颜色以及透明度\n",[78,3252,3253],{"class":80,"line":560},[78,3254,2770],{"class":447},[78,3256,3257,3260],{"class":80,"line":566},[78,3258,3259],{"class":102},"  model",[78,3261,3262],{"class":84}," # 雷达外观\n",[78,3264,3265],{"class":80,"line":572},[78,3266,3267],{"class":447},"  (\n",[78,3269,3270,3272,3274,3276,3278,3280,3282,3284],{"class":80,"line":587},[78,3271,1680],{"class":102},[78,3273,990],{"class":447},[78,3275,1023],{"class":91},[78,3277,1135],{"class":91},[78,3279,1135],{"class":91},[78,3281,1135],{"class":91},[78,3283,999],{"class":95},[78,3285,3286],{"class":84},"        # 雷达位姿\n",[78,3288,3289,3291,3293,3296,3298,3300,3302],{"class":80,"line":600},[78,3290,1699],{"class":102},[78,3292,990],{"class":447},[78,3294,3295],{"class":91},"0.07",[78,3297,3079],{"class":91},[78,3299,2490],{"class":91},[78,3301,999],{"class":95},[78,3303,3304],{"class":84}," # 雷达尺寸信息\n",[78,3306,3307,3309,3312],{"class":80,"line":631},[78,3308,1750],{"class":102},[78,3310,3311],{"class":95}," \"blue\"",[78,3313,3314],{"class":84},"            # 雷达颜色\n",[78,3316,3317],{"class":80,"line":637},[78,3318,2770],{"class":447},[78,3320,3321],{"class":80,"line":1215},[78,3322,545],{"class":447},[10,3324,3325],{},[31,3326,3327],{},"ranger Summary and Default Values",[69,3329,3331],{"className":71,"code":3330,"language":73,"meta":74,"style":74}," sensor(\n   samples 180\n   range_max 8.0\n   fov 360.0\n   resolution 1\n   size [ 0.15 0.15 0.2 ]\n   color \"blue\"\n )\n",[59,3332,3333,3338,3346,3354,3362,3369,3386,3394],{"__ignoreMap":74},[78,3334,3335],{"class":80,"line":81},[78,3336,3337],{"class":102}," sensor(\n",[78,3339,3340,3343],{"class":80,"line":88},[78,3341,3342],{"class":102},"   samples",[78,3344,3345],{"class":91}," 180\n",[78,3347,3348,3351],{"class":80,"line":99},[78,3349,3350],{"class":102},"   range_max",[78,3352,3353],{"class":91}," 8.0\n",[78,3355,3356,3359],{"class":80,"line":112},[78,3357,3358],{"class":102},"   fov",[78,3360,3361],{"class":91}," 360.0\n",[78,3363,3364,3367],{"class":80,"line":119},[78,3365,3366],{"class":102},"   resolution",[78,3368,1221],{"class":91},[78,3370,3371,3374,3376,3379,3381,3384],{"class":80,"line":125},[78,3372,3373],{"class":102},"   size",[78,3375,990],{"class":447},[78,3377,3378],{"class":91},"0.15",[78,3380,3245],{"class":91},[78,3382,3383],{"class":91}," 0.2",[78,3385,1115],{"class":95},[78,3387,3388,3391],{"class":80,"line":133},[78,3389,3390],{"class":102},"   color",[78,3392,3393],{"class":95}," \"blue\"\n",[78,3395,3396],{"class":80,"line":142},[78,3397,3398],{"class":447}," )\n",[10,3400,3401],{},[31,3402,867],{},[50,3404,3405,3411,3417,3423],{},[53,3406,3407,3408],{},"samples ",[904,3409,3410],{}," Number of laser samples per scan.",[53,3412,3413,3414],{},"range_max ",[883,3415,3416],{}," The maximum distance, in meters, reported by the laser scanner. The scanner will not detect objects beyond this range.",[53,3418,3419,3420],{},"fov ",[883,3421,3422],{}," Angular field of view of the laser scanner.",[53,3424,896,3425],{},[904,3426,3427],{}," Only calculates the true distance for the nth laser sample. Missing samples will be filled using linear interpolation. In general, using fewer samples is better, but some (poorly implemented) programs require a fixed number of samples. Setting this number greater than 1 can reduce the required computation, which is suitable for fixed-size laser vectors.",[229,3429,3430],{"start":119},[53,3431,3432],{},"Assemble the robot",[10,3434,3435],{},"Implement robot assembly in mycar.inc:",[69,3437,3441],{"className":3438,"code":3439,"language":3440,"meta":74,"style":74},"language-SQL shiki shiki-themes github-light github-dark","\n# 组装机器人各个模块\ninclude \"robot\u002Fcar_base.inc\"\ninclude \"robot\u002Fcamera.inc\"\ninclude \"robot\u002Flaser.inc\"\n\ndefine my_car car_base(\n    my_camera(pose [0.15 0 0 0])\n    my_laser()\n)\n","SQL",[59,3442,3443,3447,3452,3460,3467,3474,3478,3483,3488,3493],{"__ignoreMap":74},[78,3444,3445],{"class":80,"line":81},[78,3446,116],{"emptyLinePlaceholder":115},[78,3448,3449],{"class":80,"line":88},[78,3450,3451],{"class":447},"# 组装机器人各个模块\n",[78,3453,3454,3457],{"class":80,"line":99},[78,3455,3456],{"class":550},"include",[78,3458,3459],{"class":95}," \"robot\u002Fcar_base.inc\"\n",[78,3461,3462,3464],{"class":80,"line":112},[78,3463,3456],{"class":550},[78,3465,3466],{"class":95}," \"robot\u002Fcamera.inc\"\n",[78,3468,3469,3471],{"class":80,"line":119},[78,3470,3456],{"class":550},[78,3472,3473],{"class":95}," \"robot\u002Flaser.inc\"\n",[78,3475,3476],{"class":80,"line":125},[78,3477,116],{"emptyLinePlaceholder":115},[78,3479,3480],{"class":80,"line":133},[78,3481,3482],{"class":447},"define my_car car_base(\n",[78,3484,3485],{"class":80,"line":142},[78,3486,3487],{"class":447},"    my_camera(pose [0.15 0 0 0])\n",[78,3489,3490],{"class":80,"line":560},[78,3491,3492],{"class":447},"    my_laser()\n",[78,3494,3495],{"class":80,"line":566},[78,3496,545],{"class":447},[10,3498,3499],{},"The my_car model is built on top of the car_base model, integrating the my_camera and my_laser models.",[229,3501,3502],{"start":125},[53,3503,3504],{},"Spawning a robot in the simulation environment",[10,3506,3507,3508,3510],{},"Add the following code in ",[59,3509,652],{}," to generate a robot:",[69,3512,3514],{"className":3438,"code":3513,"language":3440,"meta":74,"style":74},"\n# -----------------------------------------------------------------------------\n\n# 生成机器人\n\n# 文件包含\ninclude \"robot\u002Fmycar.inc\"\n\nmy_car(\n  name \"robot_0\"\n  color \"red\"\n  pose [ -3 -7 0 90 ] \n)\n",[59,3515,3516,3520,3528,3532,3537,3541,3546,3553,3557,3562,3569,3577,3582],{"__ignoreMap":74},[78,3517,3518],{"class":80,"line":81},[78,3519,116],{"emptyLinePlaceholder":115},[78,3521,3522,3525],{"class":80,"line":88},[78,3523,3524],{"class":447},"# ",[78,3526,3527],{"class":84},"-----------------------------------------------------------------------------\n",[78,3529,3530],{"class":80,"line":99},[78,3531,116],{"emptyLinePlaceholder":115},[78,3533,3534],{"class":80,"line":112},[78,3535,3536],{"class":447},"# 生成机器人\n",[78,3538,3539],{"class":80,"line":119},[78,3540,116],{"emptyLinePlaceholder":115},[78,3542,3543],{"class":80,"line":125},[78,3544,3545],{"class":447},"# 文件包含\n",[78,3547,3548,3550],{"class":80,"line":133},[78,3549,3456],{"class":550},[78,3551,3552],{"class":95}," \"robot\u002Fmycar.inc\"\n",[78,3554,3555],{"class":80,"line":142},[78,3556,116],{"emptyLinePlaceholder":115},[78,3558,3559],{"class":80,"line":560},[78,3560,3561],{"class":447},"my_car(\n",[78,3563,3564,3566],{"class":80,"line":566},[78,3565,2263],{"class":550},[78,3567,3568],{"class":95}," \"robot_0\"\n",[78,3570,3571,3574],{"class":80,"line":572},[78,3572,3573],{"class":447},"  color ",[78,3575,3576],{"class":95},"\"red\"\n",[78,3578,3579],{"class":80,"line":587},[78,3580,3581],{"class":447},"  pose [ -3 -7 0 90 ] \n",[78,3583,3584],{"class":80,"line":600},[78,3585,545],{"class":447},[229,3587,3588],{"start":133},[53,3589,3590],{},"Build Execution",[10,3592,1073],{},[10,3594,3595],{},"Starting rviz2 allows you to view sensor-related data in the simulation environment. After launching the keyboard control node, you can also control the robot's movement.",[10,3597,3598],{},[360,3599],{"alt":74,"src":3600},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1624.webp",[10,3602,3603],{},[360,3604],{"alt":74,"src":3605},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1625.webp",[40,3607,3609],{"id":3608},"stage_ros2-adding-multiple-robots","stage_ros2 adding multiple robots",[10,3611,3612],{},"In stage_ros2, you can also conveniently generate multiple robots.",[229,3614,3615],{},[53,3616,3617],{},"Generate multiple robots",[10,3619,3620],{},"In sim.world, you can continue creating the my_car object to generate new robot models. Add the following code:",[69,3622,3624],{"className":71,"code":3623,"language":73,"meta":74,"style":74},"my_car(\n  name \"robot_1\"\n  color \"yellow\"\n  pose [ -1 -7 0 90 ] \n)\n",[59,3625,3626,3630,3637,3644,3664],{"__ignoreMap":74},[78,3627,3628],{"class":80,"line":81},[78,3629,3561],{"class":102},[78,3631,3632,3634],{"class":80,"line":88},[78,3633,2263],{"class":102},[78,3635,3636],{"class":95}," \"robot_1\"\n",[78,3638,3639,3641],{"class":80,"line":99},[78,3640,2169],{"class":102},[78,3642,3643],{"class":95}," \"yellow\"\n",[78,3645,3646,3648,3650,3653,3656,3658,3660,3662],{"class":80,"line":112},[78,3647,2284],{"class":102},[78,3649,990],{"class":447},[78,3651,3652],{"class":91},"-1",[78,3654,3655],{"class":91}," -7",[78,3657,1135],{"class":91},[78,3659,1621],{"class":91},[78,3661,999],{"class":95},[78,3663,2204],{"class":447},[78,3665,3666],{"class":80,"line":119},[78,3667,545],{"class":447},[229,3669,3670],{"start":88},[53,3671,3590],{},[10,3673,1073],{},[10,3675,3676],{},[360,3677],{"alt":74,"src":3678},"https:\u002F\u002Fcdn.tungchiahui.cn\u002Ftungwebsite\u002Fassets\u002Fimages\u002F2023\u002F12\u002F30\u002Fimage1626.webp",[10,3680,3681,3682,3684,3685,3687],{},"When multiple robots are running simultaneously, the topics published by different robots will use their respective ",[59,3683,801],{}," values as namespaces, and the coordinate transforms published by different robots will also be prefixed with the ",[59,3686,801],{}," value.",[3689,3690,3691],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":74,"searchDepth":88,"depth":88,"links":3693},[],"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai",0,"1000","2023-12-30","wiki\u002F2023-12-30-ros2-tutorial","en-us:2023-12-30-ros2-tutorial","\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial","Ros2 Tutorial","md","wiki\u002F2023-12-30-ros2-tutorial\u002F1000-Stage_Ros2仿真平台",false,null,"en-US","en-us",{},{"title":5,"description":12},"\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-Stage_Ros2仿真平台","FCfx6mKvMelszi0dOfAlSMZo-dg-ZIKlyHCeLNAa21I",[3714,3719,3724,3729,3734,3739,3744,3749,3754,3759,3760,3765,3770,3775,3780,3785,3790,3795,3800,3805,3810,3815,3820,3825,3830,3835,3839,3844,3848,3853,3858,3863,3868,3873,3878,3883,3888,3893,3898,3903,3908,3913,3918,3923,3928,3933,3938,3943,3948,3953,3958,3963,3968,3973,3978,3983,3988,3993,3998,4003],{"path":3715,"stem":3716,"title":3717,"date":3697,"chapterOrder":3718,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0100-ros2-jie-shao","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0100-ROS2介绍","Introduction to ROS2","0100",{"path":3720,"stem":3721,"title":3722,"date":3697,"chapterOrder":3723,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0200-ru-men-cao-zuo","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0200-入门操作","Getting Started","0200",{"path":3725,"stem":3726,"title":3727,"date":3697,"chapterOrder":3728,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0300-gong-zuo-kong-jian-yu-gong-neng-bao","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0300-工作空间与功能包","Workspace and Function Packages","0300",{"path":3730,"stem":3731,"title":3732,"date":3697,"chapterOrder":3733,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0400-si-da-tong-xin","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0400-四大通信","Four Major Communications","0400",{"path":3735,"stem":3736,"title":3737,"date":3697,"chapterOrder":3738,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0500-ros2-qi-ta-tong-xin-ji-zhi","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0500-ROS2其他通信机制","ROS2 Other Communication Mechanisms","0500",{"path":3740,"stem":3741,"title":3742,"date":3697,"chapterOrder":3743,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0600-launch","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0600-Launch","Launch","0600",{"path":3745,"stem":3746,"title":3747,"date":3697,"chapterOrder":3748,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0700-hui-su-rosbag2","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0700-回溯rosbag2","Replaying rosbag2","0700",{"path":3750,"stem":3751,"title":3752,"date":3697,"chapterOrder":3753,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0800-zuo-biao-bian-huan-tf","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0800-坐标变换TF","Coordinate Transformation TF","0800",{"path":3755,"stem":3756,"title":3757,"date":3697,"chapterOrder":3758,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0900-ke-shi-hua-ping-tai-rviz2-yu-urdf-jian-mo-yu-yan","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F0900-可视化平台RVIZ2与URDF建模语言","Visualization Platform RVIZ2 and URDF Modeling Language","0900",{"path":3694,"stem":3711,"title":5,"date":3697,"chapterOrder":3696,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},{"path":3761,"stem":3762,"title":3763,"date":3697,"chapterOrder":3764,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0100-gazeboclassic","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0100-GazeboClassic","Gezebo Classic","1100-0100",{"path":3766,"stem":3767,"title":3768,"date":3697,"chapterOrder":3769,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0200-ignitiongazebo","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0200-IgnitionGazebo","Ignition Gazebo（Gazebo Fortress）","1100-0200",{"path":3771,"stem":3772,"title":3773,"date":3697,"chapterOrder":3774,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0300-gazebosim","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0300-GazeboSim","Gz Sim（Gazebo Harmonic）","1100-0300",{"path":3776,"stem":3777,"title":3778,"date":3697,"chapterOrder":3779,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0400-igngz2gzsim","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-0400-Igngz2gzsim","Migrate Ign Gazebo to Gz Sim","1100-0400",{"path":3781,"stem":3782,"title":3783,"date":3697,"chapterOrder":3784,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-gezebo-fang-zhen-ping-tai","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1100-Gezebo仿真平台","Gazebo simulation platform","1100",{"path":3786,"stem":3787,"title":3788,"date":3697,"chapterOrder":3789,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-0100-humble-ban-ben","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-0100-Humble版本","Humble Navigation Simulation","1200-0100",{"path":3791,"stem":3792,"title":3793,"date":3697,"chapterOrder":3794,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-0200-jazzy-ban-ben","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-0200-Jazzy版本","Jazzy Navigation Simulation","1200-0200",{"path":3796,"stem":3797,"title":3798,"date":3697,"chapterOrder":3799,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-0300-humble2jazzy","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-0300-Humble2Jazzy","Differences in Navigation between Humble and Jazzy","1200-0300",{"path":3801,"stem":3802,"title":3803,"date":3697,"chapterOrder":3804,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-ji-qi-ren-dao-hang-navigation2-fang-zhen-pian","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1200-机器人导航Navigation2(仿真篇)","Robot Navigation with Navigation2 (Simulation)","1200",{"path":3806,"stem":3807,"title":3808,"date":3697,"chapterOrder":3809,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0100-0100-boost-aiso","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0100-0100-Boost.Aiso","Boost.Asio库","1300-0100-0100",{"path":3811,"stem":3812,"title":3813,"date":3697,"chapterOrder":3814,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0100-0200-ros2-serial-driver","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0100-0200-ros2_serial_driver","ROS2 Serial Driver Library","1300-0100-0200",{"path":3816,"stem":3817,"title":3818,"date":3697,"chapterOrder":3819,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0100-chuan-kou-tong-xin","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0100-串口通信","UART serial communication","1300-0100",{"path":3821,"stem":3822,"title":3823,"date":3697,"chapterOrder":3824,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0200-0100-socketcan","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0200-0100-socketcan","SocketCAN","1300-0200-0100",{"path":3826,"stem":3827,"title":3828,"date":3697,"chapterOrder":3829,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0200-0200-ros2-socketcan","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0200-0200-ros2_socketcan","ROS2_SocketCAN","1300-0200-0200",{"path":3831,"stem":3832,"title":3833,"date":3697,"chapterOrder":3834,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0200-can-tong-xin","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0200-CAN通信","CAN communication","1300-0200",{"path":3836,"stem":3837,"title":3808,"date":3697,"chapterOrder":3838,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0300-0100-boost-aiso","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0300-0100-Boost.Aiso","1300-0300-0100",{"path":3840,"stem":3841,"title":3842,"date":3697,"chapterOrder":3843,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0300-tcp-tong-xin","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0300-TCP通信","TCP communication","1300-0300",{"path":3845,"stem":3846,"title":3808,"date":3697,"chapterOrder":3847,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0400-0100-boost-aiso","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0400-0100-Boost.Aiso","1300-0400-0100",{"path":3849,"stem":3850,"title":3851,"date":3697,"chapterOrder":3852,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0400-udp-tong-xin","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-0400-UDP通信","UDP communication","1300-0400",{"path":3854,"stem":3855,"title":3856,"date":3697,"chapterOrder":3857,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-linux-ying-jian-tong-xin","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1300-Linux硬件通信","Linux hardware communication","1300",{"path":3859,"stem":3860,"title":3861,"date":3697,"chapterOrder":3862,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0100-ji-qi-ren-zu-cheng","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0100-机器人组成","Robot Composition","1400-0100",{"path":3864,"stem":3865,"title":3866,"date":3697,"chapterOrder":3867,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0200-0100-yuan-cheng-kai-fa-ssh","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0200-0100-远程开发SSH","Remote Development SSH","1400-0200-0100",{"path":3869,"stem":3870,"title":3871,"date":3697,"chapterOrder":3872,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0200-0200-yuan-cheng-fang-wen-zhuo-mian","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0200-0200-远程访问桌面","Remote Desktop Access","1400-0200-0200",{"path":3874,"stem":3875,"title":3876,"date":3697,"chapterOrder":3877,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0200-gong-kong-ji-zhi-yuan-cheng-kai-fa-huan-jing","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0200-工控机之远程开发环境","Remote Development Environment for Industrial PC","1400-0200",{"path":3879,"stem":3880,"title":3881,"date":3697,"chapterOrder":3882,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0300-gong-kong-ji-zhi-wai-jie-usb-she-bei","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0300-工控机之外接USB设备","External USB Devices for the Industrial PC","1400-0300",{"path":3884,"stem":3885,"title":3886,"date":3697,"chapterOrder":3887,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0400-fen-bu-shi-da-jian","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0400-分布式搭建","Distributed setup","1400-0400",{"path":3889,"stem":3890,"title":3891,"date":3697,"chapterOrder":3892,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0500-you-hua-ri-zhi","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0500-优化日志","Optimize logs","1400-0500",{"path":3894,"stem":3895,"title":3896,"date":3697,"chapterOrder":3897,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0100-li-cheng-ji-odom","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0100-里程计Odom","odometry","1400-0600-0100",{"path":3899,"stem":3900,"title":3901,"date":3697,"chapterOrder":3902,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0200-guan-xing-ji-imu","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0200-惯性计IMU","Inertial Measurement Unit (IMU)","1400-0600-0200",{"path":3904,"stem":3905,"title":3906,"date":3697,"chapterOrder":3907,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0300-ji-guang-lei-da-lidar","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0300-激光雷达LiDAR","LiDAR","1400-0600-0300",{"path":3909,"stem":3910,"title":3911,"date":3697,"chapterOrder":3912,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0400-xiang-ji-camera","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0400-相机Camera","Camera","1400-0600-0400",{"path":3914,"stem":3915,"title":3916,"date":3697,"chapterOrder":3917,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0500-quan-qiu-ding-wei-gnss","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0500-全球定位GNSS","Global Navigation Satellite System (GNSS)","1400-0600-0500",{"path":3919,"stem":3920,"title":3921,"date":3697,"chapterOrder":3922,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0600-shou-bing-joy","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0600-手柄joy","The query \"手柄JOY\" is a bit ambiguous. To help you better, could you please provide more details? For example:","1400-0600-0600",{"path":3924,"stem":3925,"title":3926,"date":3697,"chapterOrder":3927,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0700-jian-pan-kong-zhi-jie-dian","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-0700-键盘控制节点","Keyboard control node","1400-0600-0700",{"path":3929,"stem":3930,"title":3931,"date":3697,"chapterOrder":3932,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-ying-jian-ping-tai","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0600-硬件平台","Hardware platform","1400-0600",{"path":3934,"stem":3935,"title":3936,"date":3697,"chapterOrder":3937,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0700-zuo-biao-xi-yu-hua-ti-guan-xi","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0700-坐标系与话题关系","Coordinate System and Topic Relationship","1400-0700",{"path":3939,"stem":3940,"title":3941,"date":3697,"chapterOrder":3942,"chapterDepth":99,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0100-0100-lun-shi-li-cheng-ji-biao-ding","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0100-0100-轮式里程计标定","Wheel odometry calibration","1400-0800-0100-0100",{"path":3944,"stem":3945,"title":3946,"date":3697,"chapterOrder":3947,"chapterDepth":99,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0100-0200-lun-shi-li-cheng-ji-yu-imu-rong-he","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0100-0200-轮式里程计与IMU融合","Fusion of Wheel Odometry and IMU","1400-0800-0100-0200",{"path":3949,"stem":3950,"title":3951,"date":3697,"chapterOrder":3952,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0100-lun-shi-li-cheng-ji-biao-ding-yu-rong-he","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0100-轮式里程计标定与融合","Wheel odometry calibration and fusion","1400-0800-0100",{"path":3954,"stem":3955,"title":3956,"date":3697,"chapterOrder":3957,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0200-ji-guang-lei-da-gong-ju","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0200-激光雷达工具","Lidar Tool","1400-0800-0200",{"path":3959,"stem":3960,"title":3961,"date":3697,"chapterOrder":3962,"chapterDepth":88,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0300-xiang-ji-shi-yong-jin-jie","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-0300-相机使用进阶","Advanced Camera Usage","1400-0800-0300",{"path":3964,"stem":3965,"title":3966,"date":3697,"chapterOrder":3967,"chapterDepth":81,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-ying-jian-ping-tai-jin-jie","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-0800-硬件平台进阶","Advanced Hardware Platform","1400-0800",{"path":3969,"stem":3970,"title":3971,"date":3697,"chapterOrder":3972,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-ji-qi-ren-ying-jian","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1400-机器人硬件","Robot hardware","1400",{"path":3974,"stem":3975,"title":3976,"date":3697,"chapterOrder":3977,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1500-ros2-control","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1500-ROS2_Control","ROS2_Control","1500",{"path":3979,"stem":3980,"title":3981,"date":3697,"chapterOrder":3982,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1600-moveit2-gong-ye-ji-qi-ren-ji-xie-bi","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1600-Moveit2工业机器人机械臂","MoveIt2 industrial robot arm","1600",{"path":3984,"stem":3985,"title":3986,"date":3697,"chapterOrder":3987,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1700-ji-qi-ren-dao-hang-navigation2-shi-ti-pian","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1700-机器人导航Navigation2(实体篇)","Robot Navigation with Navigation2 (Physical Robot)","1700",{"path":3989,"stem":3990,"title":3991,"date":3697,"chapterOrder":3992,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1800-microros","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1800-MicroROS","MicroROS","1800",{"path":3994,"stem":3995,"title":3996,"date":3697,"chapterOrder":3997,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1900-webots-fang-zhen-ping-tai","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1900-Webots仿真平台","Webots simulation platform","1900",{"path":3999,"stem":4000,"title":4001,"date":3697,"chapterOrder":4002,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":3704},"\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F2000-opencv","_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F2000-OpenCV","OpenCV","2000",{"path":3700,"stem":4004,"title":4005,"date":3697,"chapterOrder":3705,"chapterDepth":3695,"docKey":3699,"docRoot":3700,"docTitle":3701,"isWikiDoc":115,"isWikiIndex":115},"_i18n\u002Fen-us\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002Findex","ROS2 Robot Operating System Tutorial",{"variants":4007},[4008,4009,4012,4015,4018],{"path":3694,"localeSlug":3707,"i18nKey":3703},{"path":4010,"localeSlug":4011,"i18nKey":3703},"\u002Fzh-hant\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai","zh-hant",{"path":4013,"localeSlug":4014,"i18nKey":3703},"\u002Fzh-hk\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai","zh-hk",{"path":4016,"localeSlug":4017,"i18nKey":3703},"\u002Fzh-tw\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai","zh-tw",{"path":4019,"localeSlug":4020,"i18nKey":3703},"\u002Fzh-cn\u002Fwiki\u002F2023-12-30-ros2-tutorial\u002F1000-stage-ros2-fang-zhen-ping-tai","zh-cn",[3694,3710,4010,3710,4013,3710,4016,3710,4019,3710],1784646852931]