Cannot spawn a model in Gazebo
I've been trying to spawn a robot model in Gazebo after successfully converted from .xacro to .urdf. But when I tried to spawn the robot with terminal command, it gave me this error
nuttaworn@nuttaworn-Lenovo-Z50-70:~/valkyrie_ws/src/val_description/model/robots$ rosrun gazebo_ros spawn_model -file 'rospack find val_description'/model/robots/valkyrie_sim.urdf -urdf -z 1 -model valkyrie
spawn_model script started
[INFO] [WallTime: 1477593321.260120] [0.000000] Loading model xml from file
Error: file does not exist rospack find val_description/model/robots/valkyrie_sim.urdf
I checked the path to the urdf file and it's the exact path. I tried finding the package with rospack
and it located the package without any problem. Can somebody point out what I missed? Thank you.