[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: how to configure and use the WGE100 camera.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Running the WGE100 camera in externally triggered mode

Description: This tutorial covers using an external trigger with the WGE100 camera on the PR2.

Tutorial Level: INTERMEDIATE

This tutorial is out of date and needs to be updated. Please do not attempt to follow it.

The WGE100 camera can use an external trigger to synchronize its exposure with other cameras or motion-control systems. On the PR2, this is done through the motor-controllers. The following tutorial assumes that you are working on a PR2 running pr2_etherCAT.

Follow the instructions in wge100_camera/Tutorials/ConfiguringAndUsingTheWGE100Camera tutorial except that now you should base yourself on wge100_camera_triggered.launch. You now need to set trigger_controller, trigger_rate and trigger_phase to configure the triggering. The motor controller board that does the triggering needs to be set in trigger_controller.xml.

The trigger_rate should be such that there is at least 1 to 2 ms of slack between it and the frame rate in video_mode or some triggers could be missed.

An example wge100_camera_triggered.launch file:

<launch>
  <node pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x $(find wge100_camera)/mb_configuration.xml" output="screen"/>
  <node pkg="pr2_controller_manager" type="spawner" args="$(find wge100_camera)/trigger_controller.xml" />
  <group ns="wge100_camera_node">
    <param name="if_name" type="str" value="eth2"/>
    <param name="ip_address" type="str" value="192.168.202.2"/>
    <param name="serial_number" type="int" value="7"/>
    <param name="video_mode" type="str" value="640x480x30"/>
    <!--param name="frame_id" type="str" value="???"/-->
    <param name="do_colorize" type="bool" value="True"/>
    <param name="do_rectify" type="bool" value="True"/>
    <param name="ext_trigger" type="bool" value="True"/>
    <param name="trigger_controller" type="string" value="trig_controller"/>
    <param name="trigger_rate" type="double" value="10"/>
    <param name="trigger_phase" type="double" value="0"/>
    <param name="port" type="int" value="60000"/>
  </group>
  <node name="wge100_camera_node" pkg="wge100_camera" type="wge100_camera_node" respawn="false" output="screen"/>
  <node name="wge100_camera_proc" pkg="stereo_image_proc" type="imageproc" respawn="false" output="screen">
    <remap from="camera" to="wge100_camera_node"/>
  </node>
</launch>

The trigger_controller.xml file:

<controller name="trig_controller" type="TriggerControllerNode">
    <actuator name="fl_caster_l_wheel_motor" />
    <waveform rep_rate="1" active_low="0" phase="0" duty_cycle=".5" running="0" pulsed="1" />
</controller>

And the mb_configuration.xml file:

<robot name="pr2"> </robot>



2019-09-21 13:21