Ask Your Question
1

trying to play back images from multiple cameras in rxbag causes both videos to flip between cameras

asked 2011-12-07 08:03:37 -0500

jimmycuff gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-12-07 09:12:27 -0500

dornhege gravatar image

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

edit flag offensive delete link more

Comments

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?
jimmycuff gravatar imagejimmycuff ( 2011-12-08 02:30:42 -0500 )edit
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.
Brian Gerkey gravatar imageBrian Gerkey ( 2011-12-08 02:43:09 -0500 )edit
Actually that was the problem. I built rxbag and not rosbag. Thanks for pointing that out to me!
jimmycuff gravatar imagejimmycuff ( 2011-12-09 06:30:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-07 08:03:37 -0500

Seen: 397 times

Last updated: Dec 07 '11