Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to set the video_mode "format7_mode4" for a flea FL3-U3-32S2C #83

Closed
fabrizioschiano opened this issue Nov 8, 2016 · 4 comments

Comments

@fabrizioschiano
Copy link
Contributor

Hi,

I am trying to set a different mode for my flea FL3-U3-32S2C. I can do through the flycapture GUI but not through a launch file. In particular I would like to set:
<param name="video_mode" value="format7_mode4" />

The launch file I am using is the following.

<launch>
   <!-- Determine this using rosrun pointgrey_camera_driver list_cameras.
       If not specified, defaults to first camera found. -->
  <arg name="camera_serial" default="15357017" />
  <arg name="calibrated" default="1" />

<!-- The camera flea3 that we have has the following Serial number : 15357017 -->

  <group ns="camera">
    <node pkg="nodelet" type="nodelet" name="camera_nodelet_manager" args="manager" />

    <node pkg="nodelet" type="nodelet" name="camera_nodelet"
          args="load pointgrey_camera_driver/PointGreyCameraNodelet camera_nodelet_manager" >
      <param name="frame_id" value="camera" />
      <param name="serial" value="$(arg camera_serial)" />

      <!-- When unspecified, the driver will use the default framerate as given by the
           camera itself. Use this parameter to override that value for cameras capable of
           other framerates. -->
      <param name="frame_rate" value="25" />
      <param name="video_mode" value="format7_mode4" />
      <!-- Use the camera_calibration package to create this file -->
      <param name="camera_info_url" if="$(arg calibrated)"
             value="file://$(env HOME)/.ros/camera_info/$(arg camera_serial).yaml" />
    </node>

  </group>
</launch>

The goal would be to change the resolution of the image without changing the Region of Interest. I know it should be possible but until now I did not succeed to do it via ROS.

Thanks for any help,
Fabrizio

@fabrizioschiano
Copy link
Contributor Author

fabrizioschiano commented Nov 8, 2016

I added to the file PointGreyCamera.cpp after the line 362 the following code:

  else if(vmode.compare("format7_mode4") == 0)
  {
    fmt7Mode = MODE_4;
    vmode_out = VIDEOMODE_FORMAT7;
  }

and it is working.

Is that a good solution?

Thanks.

@fabrizioschiano
Copy link
Contributor Author

You can see my entire modification here

Let me know if it makes sense.

@mikepurvis
Copy link
Member

Looks reasonable, please send a PR. Thanks!

@fabrizioschiano
Copy link
Contributor Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants