0
$\begingroup$

Rosanswers logo

I am trying to modify hector_quadrotor in gazebo. because I am quite new to ROS and Gazebo while processing roslaunch hector_quadrotor_gazebo spawn_quadrotor_with_kinect.launch which exists in the original packages i failed.it shows following error:

in file: /home/ayatoshi/hector_quadrotor_tutorial/src/hector_quadrotor/hector_quadrotor_description/urdf/quadrotor_with_kinect.gazebo.xacro
while processing /home/ayatoshi/hector_quadrotor_tutorial/src/hector_quadrotor/hector_quadrotor_gazebo/launch/spawn_quadrotor.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/lib/xacro/xacro '/home/ayatoshi/hector_quadrotor_tutorial/src/hector_quadrotor/hector_quadrotor_description/urdf/quadrotor_with_kinect.gazebo.xacro' base_link_frame:=/base_link world_frame:=world] returned with code [2]. 
Param xml is <param command="$(find xacro)/xacro '$(arg model)' base_link_frame:=$(arg base_link_frame) world_frame:=$(arg world_frame)" name="robot_description"/>
The traceback for the exception was written to the log file

i dont know how to solve the problem Can you give me some information about how to solve the problem? thanks a lot. here is the spawn_quadrotor_with_kinect.launch:

<?xml version="1.0"?>
<launch>
   <arg name="name" default="quadrotor"/>
   <arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/>
   <arg name="x" default="0.0"/>
   <arg name="y" default="0.0"/>
   <arg name="z" default="0.3"/>

   <arg name="use_ground_truth_for_tf" default="true"/>
   <arg name="use_ground_truth_for_control" default="true"/>
   <arg name="use_pose_estimation" if="$(arg use_ground_truth_for_control)" default="false"/>
   <arg name="use_pose_estimation" unless="$(arg use_ground_truth_for_control)" default="true"/>

   <include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor.launch">
     <arg name="name" default="$(arg name)"/>
     <arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_kinect.gazebo.xacro"/>
     <arg name="tf_prefix" default="$(arg tf_prefix)"/>
     <arg name="x" default="$(arg x)"/>
     <arg name="y" default="$(arg y)"/>
     <arg name="z" default="$(arg z)"/>   
     <arg name="use_ground_truth_for_tf" value="$(arg use_ground_truth_for_tf)"/>
     <arg name="use_ground_truth_for_control" value="$(arg use_ground_truth_for_control)"/>
     <arg name="use_pose_estimation" value="$(arg use_pose_estimation)"/>
   </include>

</launch>`

Originally posted by canoe on ROS Answers with karma: 1 on 2017-04-28

Post score: 0


Original comments

Comment by lakehanne on 2017-04-28:
Can you paste the link to the spawn_quadrotor.launch file? It would be difficult for anyone to debug your problem without access to the launch file.

Comment by canoe on 2017-04-28:
I have just pasted the spawn_quadrotor_with_kinect.launch.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I'm not sure why the whole file is encased in ` (backtick) marks. Try deleting those and trying again.


Originally posted by Airuno2L with karma: 3460 on 2017-04-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by canoe on 2017-04-28:
oh,sorry,that is a mistake when i edit the question ,the original launch doesnt have (backtick) marks.

Comment by Airuno2L on 2017-04-28:
Hmm, it looks like it should work. Maybe it's not finding the hector_quadrotor_description package from some reason. Can you try roscd hector_quadrotor_description and see if it takes you to that package and make sure there is the file /urdf/quadrotor_with_kinect.gazebo.xacro there.

Comment by canoe on 2017-04-28:
yeah,it takes me to the package .it is so weird.

ayatoshi@ayatoshi-K46CM:~/hector_quadrotor_tutorial$ roscd hector_quadrotor_description
ayatoshi@ayatoshi-K46CM:~/hector_quadrotor_tutorial/src/hector_quadrotor/hector_quadrotor_description$

Comment by Airuno2L on 2017-05-01:
And the file ~/hector_quadrotor_tutorial/src/hector_quadrotor/hector_quadrotor_description/urdf/quadrotor_with_kinect.gazebo.xacro is there?

Comment by canoe on 2017-05-01:
yes。oh i find another model with depth camera and that works。so I decide not to entangle this issue. anyway,thanks a lot for helping me。

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.