Hello everyone.
I want to create .urdf file from the file lwa.urdf.xacro.
My OS is Ubuntu 14.04 and ROS distribution is indigo.
In the folder: `opt/ros/indigo/stacks/schunk_description/urdf/lwa`
There are 3 files:
- lwa.gazebo.xacro
- lwa.transmission.xacro
- lwa.urdf.xacro
In terminal, I direct to this directory and command:
ros@ros:~$ rosrun xacro xacro.py lwa.urdf.xacro > lwa.urdf
ros@ros:/opt/ros/indigo/stacks/schunk_modular_robotics/schunk_description/urdf/lwa$ rosrun xacro xacro.py lwa.urdf.xacro > lwa.urdf
bash: lwa.urdf: Permission denied
I know that my question might be somehow silly. I am sorry but it probably refers to my lack of proper knowledge, esp. with Linux. I just guess it must have something to do with permissions.
I would appreciate if someone help me or share his/her experience in creating .urdf files with me.
Thanks a lot,
Damon
P.S.
Why do I need .urdf file? Gazebo works with .xacro files smoothly and I already can load the robot in gazebo or send the commands to it.
The point is that I want to use Moveit! Moveit has an "assistant" which helps you make Moveit recognize your robot. When I load xacro file of PR2 robot in Moveit, the assistant works fine and seemingly creates a .urdf file for itself. But this doesn't work when I load xacro file of schunk. And the reason is that Moveit tries to build .urdf file and fails.
This makes me feel if I want moveit work, I should first be able to create .urdf files.
---
Edit:
First of all, thanks for your time and attention. :)
xacro has been introduced to replace urdf. Basically we should be able to create urdf from xacro. My schunk package (schunk_description) is in:
opt/ros/indigo/stacks/schunk_modular_robotics
I thought if the problem is permissions, what if I try to make a copy of the package somewhere else and try again. So I copied the package to /Documents. And:
ros@ros:~$ cd Documents
ros@ros:~/Documents$ cd schunk_modular_robotics/schunk_description/urdf/lwa
ros@ros:~/Documents/schunk_modular_robotics/schunk_description/urdf/lwa$ rosrun xacro xacro.py lwa.urdf.xacro > lwa.urdf
This created an empty .urdf file. Here is the contents:
Moveit used to use .urdf file. But recently, they say the user can also browse to .xacro file as well.
I think this is exactly what Moveit tries to do automatically, and probably the urdf file is also created. But since it is empty, Moveit fails.
Here is when I try to browse the lwa.urdf.xacro file in Moveit:
An error message shown by setup assistant in a small window: "URDF/COLLADA file is not a valid robot model."
And when I look at the terminal, I see this:
[rospack] Error: no package given
[librospack]: error while executing command
[ INFO] [1434379501.633977236]: Running 'rosrun xacro xacro.py /opt/ros/indigo/share/schunk_modular_robotics/schunk_description/urdf/lwa/lwa.urdf.xacro'...
[ERROR] [1434379501.934726406]: No name given for the robot.
As you see, it seemingly tries to do what I try and fail: creating .urdf from .xacro.
Then I do another experiment: I was able to create the urdf, when I copied the whole package in my "Documents", where probably permissions are not troublesome. In there the .urdf is created, but empty. This time, I browse that empty .urdf file to see the reaction of Moveit:
[rospack] Error: no package given
[librospack]: error while executing command
[ERROR] [1434379684.002977198]: No name given for the robot.
The same thing! Which possibly means, the problem is not Moveit. The problem is created .urdf file, and as you mentioned, maybe there is something wrong with schunk .xacro file. :(
↧