@@ -40,10 +40,10 @@ Tasks
4040
4141 mkdir -p ~/dev_ws/src # change as needed
4242 cd ~/dev_ws/src
43- ros2 pkg create urdf_tutorial --build-type ament_python --dependencies rclpy
44- cd urdf_tutorial
43+ ros2 pkg create urdf_tutorial_r2d2 --build-type ament_python --dependencies rclpy
44+ cd urdf_tutorial_r2d2
4545
46- You should now see a ``urdf_tutorial `` folder.
46+ You should now see a ``urdf_tutorial_r2d2 `` folder.
4747Next you will make several changes to it.
4848
49492 Create the URDF File
@@ -55,16 +55,16 @@ Create the directory where we will store some assets:
5555
5656 mkdir -p urdf
5757
58- Download the :download: `URDF file <r2d2.urdf.xml >` and save it as ``~/dev_ws/src/urdf_tutorial /urdf/r2d2.urdf.xml ``.
59- Download the :download: `Rviz configuration file <r2d2.rviz >` and save it as ``~/dev_ws/src/urdf_tutorial /urdf/r2d2.rviz ``.
58+ Download the :download: `URDF file <r2d2.urdf.xml >` and save it as ``~/dev_ws/src/urdf_tutorial_r2d2 /urdf/r2d2.urdf.xml ``.
59+ Download the :download: `Rviz configuration file <r2d2.rviz >` and save it as ``~/dev_ws/src/urdf_tutorial_r2d2 /urdf/r2d2.rviz ``.
6060
61613 Publish the state
6262^^^^^^^^^^^^^^^^^^^
6363
6464Now we need a method for specifying what state the robot is in.
6565To do this, we must specify all three joints and the overall odometry.
6666
67- Fire up your favorite editor and paste the following code into ``urdf_tutorial /state_publisher.py ``
67+ Fire up your favorite editor and paste the following code into ``urdf_tutorial_r2d2 /state_publisher.py ``
6868
6969.. code-block :: python
7070
@@ -178,7 +178,7 @@ Open your editor and paste the following code, saving it as ``launch/demo.launch
178178
179179 urdf_file_name = ' r2d2.urdf.xml'
180180 urdf = os.path.join(
181- get_package_share_directory(' urdf_tutorial ' ),
181+ get_package_share_directory(' urdf_tutorial_r2d2 ' ),
182182 urdf_file_name)
183183 with open (urdf, ' r' ) as infp:
184184 robot_desc = infp.read()
@@ -196,7 +196,7 @@ Open your editor and paste the following code, saving it as ``launch/demo.launch
196196 parameters = [{' use_sim_time' : use_sim_time, ' robot_description' : robot_desc}],
197197 arguments = [urdf]),
198198 Node(
199- package = ' urdf_tutorial ' ,
199+ package = ' urdf_tutorial_r2d2 ' ,
200200 executable = ' state_publisher' ,
201201 name = ' state_publisher' ,
202202 output = ' screen' ),
@@ -233,7 +233,7 @@ Edit the ``setup.py`` file as follows:
233233.. code-block :: python
234234
235235 ' console_scripts' : [
236- ' state_publisher = urdf_tutorial .state_publisher:main'
236+ ' state_publisher = urdf_tutorial_r2d2 .state_publisher:main'
237237 ],
238238
239239 Save the ``setup.py `` file with your changes.
@@ -244,7 +244,7 @@ Save the ``setup.py`` file with your changes.
244244.. code-block :: console
245245
246246 cd ~/dev_ws
247- colcon build --symlink-install --packages-select urdf_tutorial
247+ colcon build --symlink-install --packages-select urdf_tutorial_r2d2
248248 source install/setup.bash
249249
250250
@@ -255,13 +255,13 @@ Launch the package
255255
256256.. code-block :: console
257257
258- ros2 launch urdf_tutorial demo.launch.py
258+ ros2 launch urdf_tutorial_r2d2 demo.launch.py
259259
260260 Open a new terminal, the run Rviz using
261261
262262.. code-block :: console
263263
264- rviz2 -d ~/dev_ws/install/urdf_tutorial /share/urdf_tutorial /r2d2.rviz
264+ rviz2 -d ~/dev_ws/install/urdf_tutorial_r2d2 /share/urdf_tutorial_r2d2 /r2d2.rviz
265265
266266 See the `User Guide <http://wiki.ros.org/rviz/UserGuide >`__ for details on how to use Rviz.
267267
0 commit comments