ros-drivers / pointgrey_camera_driver

ROS driver for Pt. Grey cameras, based on the official FlyCapture2 SDK.
128 stars 180 forks source link

How to set parameters for a chameleon 3 camera ? #161

Open suddarsun opened 6 years ago

suddarsun commented 6 years ago

I am trying to set parameters such as height, width etc for a chameleon 3 camera I have connected. If I echo the rostopic /camera/image, the height, width, x_offset, and y_offset are all zero. How can I configure these?

fabrizioschiano commented 6 years ago

You should be able to configure them via a launch file in this way for example:

(you need to put these where you launch your node)


      <param name="frame_rate" value="30" />
      <param name="video_mode" value="format7_mode1" />
      <param name="format7_color_coding" value="mono8"/>
      <param name="auto_shutter" value="3"/>
      <param name="shutter_speed" value="0.010"/>
      <param name="auto_exposure" value="3"/>
      <param name="exposure" value="-0.0746"/>
      <param name="auto_gain" value="3"/>
      <param name="gain" value="0"/>
      <param name="brightness" value="7.91"/>
      <param name="gamma" value="1.301"/>

Remember that:

#Auto-Control States 

#Off (0): turns the feature off 

#Query (1): returns the current mode and (if possible) the value of the feature, with no change to the device 

#Auto (2): the camera sets the value continuously 

#Manual (3): sets a specific value from the corresponding parameter 

#OnePush (4): the camera sets the value once, then holds it constant 

#None (5): the camera does not provide this feature  

This is why I put the 3 wherever you want to set a specific value.

I am not sure the frame_rate setting will work. For me it doesn't. Give it a try and let me know.

Let us know if it works. If you want more help also share the launch file you are currently using to launch your camera node.