0
$\begingroup$

Rosanswers logo

I have two urdf files: one of a robot w/ a front camera and the other of a camera that I have floating in the air as a top view perspective.

The cameras in the xacro files are as follows: (camera.urdf.xacro)

<gazebo reference="camera_optical_frame">
    <sensor:camera name="top_view_camera_sensor">
        <imageSize>640 480</imageSize>
        <imageFormat>R8G8B8</imageFormat>
        <hfov>90</hfov>
        <nearClip>0.01</nearClip>
        <farClip>100</farClip>
        <updateRate>10.0</updateRate>
        <controller:gazebo_ros_camera name="top_camera_controller" plugin="libgazebo_ros_camera.so">
            <alwaysOn>true</alwaysOn>
            <updateRate>10.0</updateRate>
            <imageTopicName>top_view/image_raw</imageTopicName>
            <interface:camera name="top_camera_iface" />
        </controller:gazebo_ros_camera>
    </sensor:camera>
    <turnGravityOff>true</turnGravityOff>
    <material>Gazebo/Blue</material>
</gazebo>

And the one for the robot is similar:

<gazebo reference="base_camera_optical_frame">
    <sensor:camera name="base_camera_sensor">
        <imageSize>640 480</imageSize>
        <imageFormat>R8G8B8</imageFormat>
        <hfov>90</hfov>
        <nearClip>0.01</nearClip>
        <farClip>100</farClip>
        <updateRate>10.0</updateRate>
        <controller:gazebo_ros_camera name="base_camera_controller" plugin="libgazebo_ros_camera.so">
            <alwaysOn>true</alwaysOn>
            <updateRate>20.0</updateRate>
            <imageTopicName>my_robot/camera</imageTopicName>
            <frameName>base_camera_optical_frame</frameName>
        </controller:gazebo_ros_camera>
    </sensor:camera>
    <turnGravityOff>true</turnGravityOff>
    <material>Gazebo/Blue</material>
</gazebo>

When I try and view the "image" of each camera back in rxbag I get images from both cameras in each video. Is something wrong in my setup?

Both cameras display fine during runtime with image_view.


Originally posted by jimmycuff on ROS Answers with karma: 58 on 2011-12-07

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This might be related to this bug. You can check with rosbag info if that is the case for your logfile.


Originally posted by dornhege with karma: 31395 on 2011-12-07

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by jimmycuff on 2011-12-09:
Actually that was the problem. I built rxbag and not rosbag. Thanks for pointing that out to me!

Comment by Brian Gerkey on 2011-12-08:
Definitely sounds like it could be the bug that @dornhege pointed to. Does rosbag info show that both of the image topics are in the .bag file? If you post your .bag somewhere, I can have a look at it.

Comment by jimmycuff on 2011-12-08:
Looks like a similar problem, but all of my topics were recorded in the bag file. I made the changes in the patch but still no luck. Thanks for the response, though! Any other ideas what it could be?

$\endgroup$

Your Answer

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