Updated Camera usage:

-now using uvc_camera (OpenCV capture is no longer supported in ROS : https://code.ros.org/trac/ros-pkg/ticket/4980)
-Added image_rate parameter in imageToSensorimotorState

Fixed synchronization in InputNode, between image (1Hz) and actions (10Hz)
Updated launch files

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@306 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2011-08-23 15:36:43 +00:00
parent b3c49ce59d
commit 259c8ec7a5
19 changed files with 344 additions and 262 deletions
+1 -9
View File
@@ -17,14 +17,6 @@
<include file="$(find rtabmap)/launch/rtabmap_sm.launch"/>
<!-- CAMERA -->
<node pkg="omni_camera_capture" type="omni_publisher"
name="omni_camera" respawn="false">
<param name="device" value="/dev/video0"/>
<param name="refresh_rate" value="2"/>
<param name="frame_id" value="omni_camera_link" />
<param name="image_encoding" value="RGB" /> <!-- GREY or RGB-->
<param name="image_size" value="FULL" /> <!-- PARTIAL or FULL -->
<param name="scale_divisor" value="1" /> <!-- 1, 2, 3, 4 or 6 in PARTIAL size-->
</node>
<include file="$(find rtabmap)/launch/camera.launch"/>
</launch>
@@ -0,0 +1,31 @@
<launch>
<!-- BRING UP TELEROBOT -->
<!-- BUS CAN MANAGER -->
<group ns="tr">
<param name="driver_type" value="TRCANDriver"/>
<node name="can_manager" type="can_manager" pkg="can_manager"
args="tr">
<remap from="/tr/tr/cmd_vel" to="/cmd_vel" />
</node>
</group>
<!-- TELEOP -->
<include file="$(find rtabmap)/launch/teleop.launch"/>
<!-- RTAB-MAP -->
<include file="$(find rtabmap)/launch/rtabmap_sm.launch"/>
<!-- CAMERA -->
<node pkg="omni_camera_capture" type="omni_publisher"
name="omni_camera" respawn="false">
<param name="device" value="/dev/video0"/>
<param name="refresh_rate" value="2"/>
<param name="frame_id" value="omni_camera_link" />
<param name="image_encoding" value="RGB" /> <!-- GREY or RGB-->
<param name="image_size" value="FULL" /> <!-- PARTIAL or FULL -->
<param name="scale_divisor" value="1" /> <!-- 1, 2, 3, 4 or 6 in PARTIAL size-->
<remap from="/image" to="/image_raw" />
</node>
</launch>
+8 -8
View File
@@ -1,10 +1,10 @@
<launch>
<!-- Camera parameters -->
<param name="cam/device_id" value="0" type="int"/>
<param name="cam/image_rate" value="1" type="int"/>
<param name="cam/image_width" value="640" type="int"/>
<param name="cam/image_height" value="480" type="int"/>
<!-- Nodes -->
<node name="camera" pkg="rtabmap" type="camera_node"/>
<node pkg="uvc_camera" type="camera_node" name="uvc_camera" output="screen">
<param name="width" type="int" value="640" />
<param name="height" type="int" value="480" />
<param name="fps" type="int" value="5" />
<param name="frame" type="string" value="wide_stereo" />
<param name="device" type="string" value="/dev/video0" />
<!-- <param name="camera_info_url" type="string" value="file://$(find uvc_camera)/example.yaml" /> -->
</node>
</launch>
+10
View File
@@ -0,0 +1,10 @@
<launch>
<!-- Camera parameters -->
<param name="cam/device_id" value="0" type="int"/>
<param name="cam/image_rate" value="1" type="int"/>
<param name="cam/image_width" value="640" type="int"/>
<param name="cam/image_height" value="480" type="int"/>
<!-- Nodes -->
<node name="camera" pkg="rtabmap" type="camera_node"/>
</launch>
+8 -8
View File
@@ -1,14 +1,14 @@
<launch>
<!-- RTAB-MAP LOOP CLOSURE DETECTION VERSION -->
<!-- Camera parameters -->
<param name="device_id" value="0" type="int"/>
<param name="image_rate" value="1" type="int"/>
<param name="image_width" value="640" type="int"/>
<param name="image_height" value="480" type="int"/>
<!-- Nodes -->
<node name="rtabmap_core" pkg="rtabmap" type="core_node"/>
<node name="rtabmap_gui" pkg="rtabmap" type="gui_node"/>
<node name="image_to_sms" pkg="rtabmap" type="image_to_sms_node"/>
<node name="camera" pkg="rtabmap" type="camera_node"/>
<node name="image_to_sms" pkg="rtabmap" type="image_to_sms_node">
<param name="image_rate" value="1" type="int"/>
<param name="resize_image_width" value="640" type="int"/>
<param name="resize_image_height" value="480" type="int"/>
</node>
<!-- CAMERA -->
<include file="$(find rtabmap)/launch/camera.launch"/>
</launch>
+8 -9
View File
@@ -2,10 +2,6 @@
<!-- RTAB-MAP SENSORY-MOTOR VERSION -->
<!-- WARNING : Database is automatically deleted on each startup -->
<!-- See "delete_db_on_start" option below... -->
<!-- image_to_sm parameters -->
<param name="resize_image_width" value="640" type="int"/>
<param name="resize_image_height" value="480" type="int"/>
<!-- Nodes -->
<!-- cmd_vel_a has priority on cmd_vel_b -->
@@ -28,13 +24,16 @@
</node>
<node name="rtabmap_input" pkg="rtabmap" type="input_node">
<remap from="cmd_vel" to="cmd_vel" />
<remap from="sm_state" to="sm_state" />
<remap from="camera_data" to="camera_data" />
<remap from="/cmd_vel" to="/cmd_vel" />
<remap from="/sm_state" to="/sm_state" />
<remap from="/camera_data" to="/camera_data" />
</node>
<node name="image_to_sms" pkg="rtabmap" type="image_to_sms_node">
<remap from="image" to="image" />
<remap from="sm_state" to="camera_data" />
<param name="image_rate" value="1" type="int"/>
<param name="resize_image_width" value="640" type="int"/>
<param name="resize_image_height" value="480" type="int"/>
<remap from="/image_raw" to="/image_raw" />
<remap from="/sm_state" to="/camera_data" />
</node>
</launch>
+9 -7
View File
@@ -1,11 +1,13 @@
<launch>
<!-- Camera parameters -->
<param name="cam/device_id" value="0" type="int"/>
<param name="cam/image_rate" value="10" type="int"/>
<param name="cam/image_width" value="640" type="int"/>
<param name="cam/image_height" value="480" type="int"/>
<!-- Nodes -->
<node name="cameraReceiver" pkg="rtabmap" type="camera_node_receiver" output="screen"/>
<node name="camera" pkg="rtabmap" type="camera_node"/>
<node pkg="uvc_camera" type="camera_node" name="uvc_camera" output="screen">
<param name="width" type="int" value="640" />
<param name="height" type="int" value="480" />
<param name="fps" type="int" value="30" />
<param name="frame" type="string" value="wide_stereo" />
<param name="device" type="string" value="/dev/video0" />
<!-- <param name="camera_info_url" type="string" value="file://$(find uvc_camera)/example.yaml" /> -->
</node>
</launch>