Transform from map to odom for robot using rtabmap
I built a custom robot using URDF and I'm trying to view the position of the robot using the "odom" published from rtabmap. I managed to create a transform from odom to base_footprint but when I run rtabmap I get the following warning:
Could not get transform from base_footprint to kinect2_rgb_optical_frame
I've tried to create the transforms within rgbd_mapping_kinect2.launch by changing my fixed frame to base_footprint and adding the following transforms:
<node pkg="tf" type="static_transform_publisher" name="base_to_kinect"
args="0 0 0.1 0 0 0 base_link kinect2_link 100" />
<node pkg="tf" type="static_transform_publisher" name="kinect2_base_link"
args="$(arg optical_rotate) kinect2_base_link kinect2_link 100" />
My Kinect input for my robot model looks like this:
<joint name="kinect2_in_joint"
type="fixed">
<insert_block name="origin"/>
<parent link="${parent}"/>
<child link="kinect2_link"/>
</joint>
<link name="kinect2_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh
filename="package://beast/meshes/kinect2_origin_on_rgb_optical_frame.stl"
</scale="0.001 0.001 0.001"/>
</geometry>
<material name="Kinect2Grey"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh
filename="package://beast/meshes/kinect2_origin_on_rgb_optical_frame.stl"
</scale="0.001 0.001 0.001"/>
</geometry>
</collision>
</link>
and my tf Tree looks like :http://imgur.com/a/6hTf1
As you can see, kinect2_base_link isn't connected to kinect2_link. Could you plese help with this?