add AR tag in gazebo

The main website: http://wiki.ros.org/ar_track_alvar
The main instruction I follow is this video: https://youtu.be/WDhIaVOUwsk
How to generate the AR tag: $rosrun ar_track_alvar createMarker -ucm -s 12.0 -p
https://github.com/ros-perception/ar_track_alvar/issues/18

If there is an error: " Invalid roslaunch XML syntax: not well-formed (invalid token) “
It may mean you forget or modify “<" , " />" in urdf file.
https://answers.ros.org/question/323389/invalid-roslaunch-xml-syntax-not-well-formed-invalid-token/

I noticed there are two blender in Ubuntu software shop.

I first tried the newest version 3.0, “blender", but it cannot show the texture, which I added.
I guess it may be Python problem.
My default python 2.7 and ubuntu 18.04.
Thus, I suggest you install the old version, “Blender"

After that, how to roslaunch and spawn ar_tag in the gazebo world.

Let me explain the hierarchy.

mavros_posix_sitl.launch > urdf_spawn.launch > ar_tag.urdf
https://get-help.robotigniteacademy.com/t/understanding-urdf-spawn-launch/10715


urdf_spawn.launch
https://get-help.robotigniteacademy.com/t/understanding-urdf-spawn-launch/10715

ar_tag.urdf
Remember to change the robot_name:
https://gist.github.com/RDaneelOlivav/990addc733fbeb8549c3979d5bca41b2


Remember to use package name, instead of directory folder name

2023 Feb 13 updated
If you want to add multiple objects in the spawn launch file please use <group ns = “robotname">

ref: https://answers.ros.org/question/52115/spawn-multiple-objects-in-gazebo/?answer=412470#post-id-412470

ref: https://stackoverflow.com/questions/65033394/how-to-spawn-multiple-objects-in-gazebo-using-libgazebo-ros-camera-so/65067457#65067457

ref: https://www.theconstructsim.com/ros-qa-130-how-to-launch-multiple-robots-in-gazebo-simulator/


If the marker is too dark, you can change the ambient color and try this
ref: https://answers.gazebosim.org//question/8475/imported-mesh-dae-with-texture-too-dark-in-gazebo/

if you want to change the sampling rate, you can
<param name="max_frequency" type="double" value="30.0/">
However, I found the default sampling rate is about 10 Hz and the max sampling rate is about 20 Hz (17~18)


發表留言