Re: zed camera frame won't rotate to map

Posted by radisc85 on
URL: http://official-rtab-map-forum.206.s1.nabble.com/zed-camera-frame-won-t-rotate-to-map-tp2712p3718.html

Hi,

I was too, trying to run rtabmap with zed odometry and i stumble on the upward cloud problem.

I tried this setup with the latest versions of wrapper and sdk, but i'm still recieving this message,


i think i'm missing a static transform or some default frame name has changed since the version you are showing

Thank you very much

EDIT: Eureka, it works! I needed to add some other transform and specify some other values, here's my launch file:

<launch>

<arg name="camera"          default="zed"/>

<arg name="pi/2" value="1.5707963267948966" />
<arg name="optical_rotate" value="0 0 0 -$(arg pi/2) 0 -$(arg pi/2)" />
<arg name="no_rotate" value="0 0 0 0 0 0 1" />
<arg name="tf_prefix" default="" />
<arg name="stereo_namespace"        default="zed"/>


<node pkg="tf" type="static_transform_publisher" name="$(arg camera)_base_link3"
    args="$(arg optical_rotate) $(arg camera)_current_frame ZED_left_camera 100" />

  <node pkg="tf2_ros" type="static_transform_publisher" name="zed_base_link4"
    args="0 0 1.0 -$(arg pi/2) 0 -$(arg pi/2) $(arg tf_prefix)/zed_current_frame depth_frame" />

<node name="zed_wrapper_node" pkg="zed_wrapper" type="zed_wrapper_node">
        <param name="odometry_frame"        value="zed_initial_frame" />
        <param name="base_frame"            value="zed_current_frame" />
</node>


<group ns="rtabmap">
   <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
	  <param name="frame_id"            type="string" value="$(arg camera)_current_frame"/>
	
	  <remap from="rgb/image"       to="/rgb/image_rect_color"/>
  	  <remap from="depth/image"     to="/depth/depth_registered"/>
  	  <remap from="rgb/camera_info" to="/rgb/camera_info"/>
      <remap from="odom" to="/odom"/>
	  
	  <param name="odom_frame_id" value=""/>
   </node>
</launch>