ROS实验笔记之---改变“/dvs/events“的发布频率

Posted gwpscut

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ROS实验笔记之---改变“/dvs/events“的发布频率相关的知识,希望对你有一定的参考价值。

对于dvxplorer而言,要改变其事件的发布频率很简单,只需要如下设置launch文档即可:

<launch>
  <!-- camera driver -->
  <node name="dvxplorer_ros_driver" pkg="dvxplorer_ros_driver" type="dvxplorer_ros_driver" >
          <param name="bias_sensitivity" value="0"/>
          <!-- 每个包最大的event的数目,0就是没有限制,默认是0 -->
            <param name="max_events" value="0"/>

            <!-- 整合的时间,0就是立马发送,默认30 -->
            <!-- 最大也只有100 -->
            <param name="streaming_rate" value="100"/>

          <!-- <remap from="events" to="/dvs/events" /> -->
          <remap from="/dvs/camera_info" to="/1" />
          <remap from="/dvs/calibrate_imu" to="/2" />
          <remap from="/dvs/reset_timestamps" to="/3" />

  </node>

  <!-- Publish the calibration -->
  <!-- <include file="$(find evio)/launch/cam_info_launcher/hku/dvxplorer_calib_info.launch" /> -->

  <!-- visualization -->
      <!-- <remap from="events" to="/dvs/events" /> -->
    <!-- <remap from="camera_info" to="/dvs/camera_info" /> -->
  <node name="dvs_renderer" pkg="dvs_renderer" type="dvs_renderer">
    <param name="display_method" value="red-blue"/>
     <remap from="events" to="/dvs/events" />
  </node>

  <!-- display -->
  <!-- <node name="image_view" pkg="rqt_image_view" type="rqt_image_view">
  	<remap from="image" to="dvs_rendering"/>
  </node> -->

  <!-- configure -->
  <!-- <node name="rqt_reconfigure" pkg="rqt_reconfigure" type="rqt_reconfigure" /> -->

</launch>

但是相同的方法对于davis346却不行.仔细的看一下驱动代码,会发现某个地方写死了,需要设置才可以

  // current_config_.streaming_rate = 30;
  current_config_.streaming_rate;
  delta_ = boost::posix_time::microseconds(long(1e6/current_config_.streaming_rate));

更改一下,编译即可.下面直接给出对应的launch文档

<launch>
  <!-- camera driver -->
  <node name="davis_ros_driver" pkg="davis_ros_driver" type="davis_ros_driver" >
        <!-- <rosparam command="load" file="$(find davis_ros_driver)/config/myDAVIS346.yaml" /> -->

          <param name="streaming_rate" value="100"/>
          <!-- <param name="max_events" value="0"/> -->
           <param name="autoexposure_enabled" value="true"/>

             <!-- <param name="display_method" value="red-blue"/>
            <remap from="events" to="/dvs/events" />
             <remap from="image" to="/dvs/image_raw" />
             <remap from="/dvs/camera_info" to="camera_info_num" /> -->
        </node>

<!-- Publish the calibration -->
<!-- <include file="$(find esvo_time_surface)/launch/rosbag_launcher/hku/my_calib_info.launch" /> -->
  <!-- <include file="$(find evio)/launch/cam_info_launcher/hku/davis346_calib_info.launch" /> -->

<!-- visual the event -->
  <node name="dvs_renderer" pkg="dvs_renderer" type="dvs_renderer">
    <param name="display_method" value="red-blue"/>
    <remap from="events" to="/dvs/events" />
  </node>


  <!-- display -->
  <node name="image_view" pkg="rqt_image_view" type="rqt_image_view">
  	<remap from="image" to="dvs_rendering"/>
  </node>

  <!-- configure -->
  <node name="rqt_reconfigure" pkg="rqt_reconfigure" type="rqt_reconfigure" />

</launch>

以上是关于ROS实验笔记之---改变“/dvs/events“的发布频率的主要内容,如果未能解决你的问题,请参考以下文章

ROS实验笔记之——无人机在VICION下试飞

ROS实验笔记之——无人机在VICION下试飞

ROS实验笔记之——PX4仿真

ROS实验笔记之——DAVIS346测试

ROS实验笔记之——基于VSCODE的ROS开发

ROS实验笔记之——基于Kalibr标定event 与imu