The model
parameter takes either an absolute or relative path. For a relative path, you have to make sure that it is reachable from the current working directory. So before you run the above command, you have to be in the urdf_tutorial
directory already, as the urdf
directory is a subdirectory of urdf_tutorial
.
To use a relative path:
roscd urdf_tutorial
roslaunch urdf_tutorial display.launch model:=urdf/02-multipleshapes.urdf
Or, you could do this, which works from any directory:
roslaunch urdf_tutorial display.launch model:=`rospack find urdf_tutorial`/urdf/02-multipleshapes.urdf
rospack find PKG_NAME
will first try to find the package you gave it, and then returns the absolute path to that package. As you now have an absolute path to the urdf, this works regardless of what is your current working directory.