Robotics StackExchange | Archived questions

urdf to sdf conversion error

Hello,

I wanted to add a bumper contact sensor in hector quadrotor demo on theconstructsim. I changed the xacro file, converted to urdf and in the end I need to convert urdf to sdf with the following command

gz sdf -p /quadrotorbase.urdf > /quadrotorbase.sdf

but it is giving me the error

bash: /quadrotor_base.sdf: Permission denied

why can this be? How can I solve this?

Asked by jean01 on 2020-04-24 16:04:46 UTC

Comments

Answers

I need to convert urdf to sdf with the following command

gz sdf -p /quadrotor_base.urdf > /quadrotor_base.sdf

but it is giving me the error

bash: /quadrotor_base.sdf: Permission denied

why can this be?

Most likely because the paths you specify point to files in the root directory, which is a directory a normal user cannot write to.

How can I solve this?

Specify paths (at least for the output) where you do have write permissions.

Did you perhaps forget to add a dot (ie: .)? So /quadrotor_base.urdf would become ./quadrotor_base.urdf, which would mean: the quadrotor_base.urdf in the current directory.

Asked by gvdhoorn on 2020-04-25 07:08:39 UTC

Comments

Note that this is not something specific to ROS or Gazebo, but a general Linux problem.

Asked by gvdhoorn on 2020-04-25 07:09:04 UTC

thank you. I will notify if I confirm the answer is working.

Asked by jean01 on 2020-04-25 11:48:22 UTC