Difference between revisions of "Turtlebot3 URDF Editing 20240524"

From wikidb
Jump to: navigation, search
(Test Run)
(Help)
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Main References =
+
= References =
 +
== Main References ==
  
* [https://docs.ros.org/en/foxy/Tutorials/Intermediate/URDF/URDF-Main.html URDF Main]
+
* [https://docs.ros.org/en/humble/Tutorials/Intermediate/URDF/URDF-Main.html URDF Humble Version] 2024
* [https://docs.ros.org/en/foxy/Tutorials/Intermediate/URDF/Building-a-Visual-Robot-Model-with-URDF-from-Scratch.html Build a URDF from Scratcfh]
+
  
= Installing urdf_tutorial =
+
== Other ==
  
<pre>
+
* [https://discourse.ros.org/t/web-based-urdf-visualization-tool-and-library-opensourced-from-nasa-jpl/14404 Web-based URDF visualization tool and library opensourced from NASA JPL]
$ sudo apt install ros-humble-urdf-tutorial
+
* [http://wiki.ros.org/urdf ROS URDF XML Specificaton]
[sudo] password for eepp:
+
* [http://wiki.ros.org/urdf/Tutorials URDF Tutorials] 2016
Reading package lists... Done
+
Building dependency tree... Done
+
Reading state information... Done
+
The following packages were automatically installed and are no longer required:
+
  libwpe-1.0-1 libwpebackend-fdo-1.0-1
+
Use 'sudo apt autoremove' to remove them.
+
The following additional packages will be installed:
+
  ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui
+
  ros-humble-urdf-launch
+
The following NEW packages will be installed:
+
  ros-humble-joint-state-publisher ros-humble-joint-state-publisher-gui
+
  ros-humble-urdf-launch ros-humble-urdf-tutorial
+
0 upgraded, 4 newly installed, 0 to remove and 454 not upgraded.
+
Need to get 773 kB of archives.
+
After this operation, 1,222 kB of additional disk space will be used.
+
Do you want to continue? [Y/n] Y
+
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-joint-state-publisher amd64 2.4.0-1jammy.20240517.174241 [16.1 kB]
+
Get:2 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-joint-state-publisher-gui amd64 2.4.0-1jammy.20240517.174502 [15.5 kB]
+
Get:3 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-urdf-launch amd64 0.1.1-1jammy.20240517.212028 [6,438 B]
+
Get:4 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-urdf-tutorial amd64 1.1.0-1jammy.20240517.212335 [735 kB]
+
Fetched 773 kB in 1s (915 kB/s)                 
+
Selecting previously unselected package ros-humble-joint-state-publisher.
+
(Reading database ... 314116 files and directories currently installed.)
+
Preparing to unpack .../ros-humble-joint-state-publisher_2.4.0-1jammy.20240517.1
+
74241_amd64.deb ...
+
Unpacking ros-humble-joint-state-publisher (2.4.0-1jammy.20240517.174241) ...
+
Selecting previously unselected package ros-humble-joint-state-publisher-gui.
+
Preparing to unpack .../ros-humble-joint-state-publisher-gui_2.4.0-1jammy.202405
+
17.174502_amd64.deb ...
+
Unpacking ros-humble-joint-state-publisher-gui (2.4.0-1jammy.20240517.174502) ..
+
.
+
Selecting previously unselected package ros-humble-urdf-launch.
+
Preparing to unpack .../ros-humble-urdf-launch_0.1.1-1jammy.20240517.212028_amd6
+
4.deb ...
+
Unpacking ros-humble-urdf-launch (0.1.1-1jammy.20240517.212028) ...
+
Selecting previously unselected package ros-humble-urdf-tutorial.
+
Preparing to unpack .../ros-humble-urdf-tutorial_1.1.0-1jammy.20240517.212335_am
+
d64.deb ...
+
Unpacking ros-humble-urdf-tutorial (1.1.0-1jammy.20240517.212335) ...
+
Setting up ros-humble-joint-state-publisher (2.4.0-1jammy.20240517.174241) ...
+
Setting up ros-humble-joint-state-publisher-gui (2.4.0-1jammy.20240517.174502) .
+
..
+
Setting up ros-humble-urdf-launch (0.1.1-1jammy.20240517.212028) ...
+
Setting up ros-humble-urdf-tutorial (1.1.0-1jammy.20240517.212335) ...
+
  
</pre>
+
= Installing urdf_tutorial =
 +
 
 +
* [[URDF Tutorial Install Log 20240524]]
  
 
= Test Run =
 
= Test Run =
Line 91: Line 49:
 
</pre>
 
</pre>
  
[[File:ColorSensorConfiguration.png  | 400px]]
+
[[File:ScreenshotFirstIRDFTutorial.png  | 500px]]
 +
 
 +
== Hints ==
 +
 
 +
=== TF Setting ===
 +
 
 +
You can manage the amount of clutter in redering using TF Setting in the Display Window. Select and deselect the following check boxes:
 +
 
 +
* Show Names
 +
* Show Axes
 +
* Show Arrows
 +
 
 +
=== Global Options ===
 +
 
 +
* Background Color
 +
 
 +
Make it white
 +
 
 +
=== Robot Model Error ===
 +
 
 +
* "No transform from front left wheel to  base link"
 +
* [https://answers.ros.org/question/365391/rviz-status-error-no-transform/ RVIZ Status Error No Transform ]
 +
 
 +
'''in new Terminal'''
 +
 
 +
<pre>
 +
$ launch turtlebot3_bringup turtlebot3_model.launch
 +
Command 'launch' not found, did you mean:
 +
  command 'launchy' from deb ruby-launchy (2.5.0-3)
 +
  command '0launch' from deb 0install-core (2.16-2)
 +
  command 'launchn' from deb csmith (2.3.0-6build1)
 +
Try: sudo apt install <deb name>
 +
</pre>
 +
 
 +
Or bring up the Turtle3
 +
 
 +
  source scripts/bringup.sh
 +
 
 +
Or maybe just: To be tested (This must be pretty much the same as doing the bringup script
 +
  ros2 launch turtlebot3_bringup robot.launch.py
 +
 
 +
= Tools =
 +
 
 +
== Check URDF ==
 +
 
 +
<pre>
 +
$ check_urdf /home/eepp/turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_waffle.urdf
 +
robot name is: turtlebot3_waffle
 +
---------- Successfully Parsed XML ---------------
 +
root Link: base_footprint has 1 child(ren)
 +
    child(1):  base_link
 +
        child(1):  camera_link
 +
            child(1):  camera_depth_frame
 +
                child(1):  camera_depth_optical_frame
 +
            child(2):  camera_rgb_frame
 +
                child(1):  camera_rgb_optical_frame
 +
        child(2):  caster_back_left_link
 +
        child(3):  caster_back_right_link
 +
        child(4):  imu_link
 +
        child(5):  base_scan
 +
        child(6):  wheel_left_link
 +
        child(7):  wheel_right_link
 +
</pre>
 +
 
 +
== urdf_to_graphiz Visualizer ==
 +
 
 +
* [https://wilselby.com/research/ros-integration/model-dynamics-sensors/ Model Dynamics & Sensors]
 +
 
 +
  $ urdf_to_graphiz turtlebot3_waffle_nuc.urdf
 +
        WARNING: The executable named 'urdf_to_graphiz' is deprecated. Use 'urdf_to_graphviz' instead.
 +
        WARNING: OUTPUT not given. This type of usage is deprecated!Usage: urdf_to_graphviz input.xml [OUTPUT]  Will create either $ROBOT_NAME.gv & $ROBOT_NAME.pdf in CWD  or OUTPUT.gv & OUTPUT.pdf.
 +
        Created file turtlebot3_waffle.gv
 +
        Created file turtlebot3_waffle.pdf
 +
 
 +
  $ evince turtlebot3_waffle.pdf
 +
 
 +
= Modify the Waffle Model =
 +
 
 +
== Hack ==
 +
 
 +
  $ cd turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/
 +
 +
  $ ls
 +
      common_properties.urdf  turtlebot3_waffle_pi.urdf
 +
      turtlebot3_burger.urdf  turtlebot3_waffle.urdf
 +
 +
  $ cp turtlebot3_waffle.urdf turtlebot3_waffle_nuc.urdf
 +
 +
  $ ros2 launch urdf_tutorial display.launch.py model:=/home/eepp/turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_waffle_nuc.urdf
 +
 
 +
'''Note:''' change to turtlebot3_ws done by create a duplicate file. '''To be fixed'''

Latest revision as of 10:27, 23 June 2024

References

Main References

Other

Installing urdf_tutorial

Test Run

$ ros2 launch urdf_tutorial display.launch.py model:=/home/eepp/turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_waffle.urdf 
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2024-05-24-11-49-45-781551-adams-7966
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [7968]
[INFO] [joint_state_publisher_gui-2]: process started with pid [7970]
[INFO] [rviz2-3]: process started with pid [7972]
[rviz2-3] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[robot_state_publisher-1] [INFO] [1716576585.961610516] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1716576585.961690756] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1716576585.961699112] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-1] [INFO] [1716576585.961704997] [robot_state_publisher]: got segment camera_depth_frame
[robot_state_publisher-1] [INFO] [1716576585.961710258] [robot_state_publisher]: got segment camera_depth_optical_frame
[robot_state_publisher-1] [INFO] [1716576585.961715547] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1716576585.961720610] [robot_state_publisher]: got segment camera_rgb_frame
[robot_state_publisher-1] [INFO] [1716576585.961725931] [robot_state_publisher]: got segment camera_rgb_optical_frame
[robot_state_publisher-1] [INFO] [1716576585.961730857] [robot_state_publisher]: got segment caster_back_left_link
[robot_state_publisher-1] [INFO] [1716576585.961735832] [robot_state_publisher]: got segment caster_back_right_link
[robot_state_publisher-1] [INFO] [1716576585.961740778] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-1] [INFO] [1716576585.961746293] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-1] [INFO] [1716576585.961752376] [robot_state_publisher]: got segment wheel_right_link
[joint_state_publisher_gui-2] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[rviz2-3] [INFO] [1716576586.227491510] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1716576586.227546765] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-3] [INFO] [1716576586.240909522] [rviz2]: Stereo is NOT SUPPORTED
[joint_state_publisher_gui-2] [INFO] [1716576586.360249499] [joint_state_publisher]: Waiting for robot_description to be published on the robot_description topic...
[joint_state_publisher_gui-2] [INFO] [1716576586.367835448] [joint_state_publisher]: Centering
[joint_state_publisher_gui-2] [INFO] [1716576586.438988982] [joint_state_publisher]: Centering


^C

ScreenshotFirstIRDFTutorial.png

Hints

TF Setting

You can manage the amount of clutter in redering using TF Setting in the Display Window. Select and deselect the following check boxes:

  • Show Names
  • Show Axes
  • Show Arrows

Global Options

  • Background Color

Make it white

Robot Model Error

in new Terminal

$ launch turtlebot3_bringup turtlebot3_model.launch
Command 'launch' not found, did you mean:
  command 'launchy' from deb ruby-launchy (2.5.0-3)
  command '0launch' from deb 0install-core (2.16-2)
  command 'launchn' from deb csmith (2.3.0-6build1)
Try: sudo apt install <deb name>

Or bring up the Turtle3

 source scripts/bringup.sh

Or maybe just: To be tested (This must be pretty much the same as doing the bringup script

 ros2 launch turtlebot3_bringup robot.launch.py

Tools

Check URDF

$ check_urdf /home/eepp/turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_waffle.urdf 
robot name is: turtlebot3_waffle
---------- Successfully Parsed XML ---------------
root Link: base_footprint has 1 child(ren)
    child(1):  base_link
        child(1):  camera_link
            child(1):  camera_depth_frame
                child(1):  camera_depth_optical_frame
            child(2):  camera_rgb_frame
                child(1):  camera_rgb_optical_frame
        child(2):  caster_back_left_link
        child(3):  caster_back_right_link
        child(4):  imu_link
        child(5):  base_scan
        child(6):  wheel_left_link
        child(7):  wheel_right_link

urdf_to_graphiz Visualizer

 $ urdf_to_graphiz turtlebot3_waffle_nuc.urdf 
       WARNING: The executable named 'urdf_to_graphiz' is deprecated. Use 'urdf_to_graphviz' instead.
       WARNING: OUTPUT not given. This type of usage is deprecated!Usage: urdf_to_graphviz input.xml [OUTPUT]  Will create either $ROBOT_NAME.gv & $ROBOT_NAME.pdf in CWD  or OUTPUT.gv & OUTPUT.pdf.
       Created file turtlebot3_waffle.gv
       Created file turtlebot3_waffle.pdf
 $ evince turtlebot3_waffle.pdf

Modify the Waffle Model

Hack

 $ cd turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/

 $ ls
     common_properties.urdf  turtlebot3_waffle_pi.urdf
     turtlebot3_burger.urdf  turtlebot3_waffle.urdf

 $ cp turtlebot3_waffle.urdf turtlebot3_waffle_nuc.urdf

 $ ros2 launch urdf_tutorial display.launch.py model:=/home/eepp/turtlebot3_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_waffle_nuc.urdf

Note: change to turtlebot3_ws done by create a duplicate file. To be fixed