hector quadrotor camera change

asked 2018-12-26 12:18:56 -0500

jpaladin gravatar image

I am trying to change the camera that comes with the hector_quadrotor_demo that is a front facing camera.

I noticed that by using the command "roslaunch hector_quadrotor_demo outdoor_flight_gazebo.launch" the model that loads is the file "quadrotor_hokuyo_utm30lx.urdf.xacro".

There, I see a front facing camera. Somewhere in the files I see that there is a downward camera, but when I include the code it never shows up in RViz.

The quadrotor_hokuyo_utm30lx.urdf.xacro file has this code:

<!-- Forward facing camera -->
    <xacro:include filename="$(find hector_sensors_description)/urdf/generic_camera.urdf.xacro" />
    <xacro:generic_camera name="front_cam" parent="base_link" ros_topic="camera/image" cam_info_topic="camera/camera_info" update_rate="10" res_x="320" res_y="240" image_format="R8G8B8" hfov="90">
      <origin xyz="0.05 0.0 -0.06" rpy="0 0 0"/>
    </xacro:generic_camera>

But if I try to include the downward one, exactly as found in quadrotor_downward_cam.urdf.xacro:

<!-- Downward facing camera -->
    <xacro:include filename="$(find hector_sensors_description)/urdf/generic_camera.urdf.xacro" />
    <xacro:generic_camera name="downward_cam" parent="base_link" ros_topic="camera/image" cam_info_topic="camera/camera_info" update_rate="20" res_x="640" res_y="480" image_format="L8" hfov="100">
      <origin xyz="0.4 0.0 -0.0" rpy="0 ${M_PI/2} 0"/>
    </xacro:generic_camera>

It doesn't work.

I already tried to modify the files, and change the .urdf that is loaded, but no matter what I change, it always loads the same configurations. I also did catkin_make in the ~/catkin_ws directory, and nothing.

I am using ros kinetic and gazebo 1.7

edit retag flag offensive close merge delete