RVIZ visualize the data in the different plane. How to fix that?
I have set up an environment in gazebo with Kinect sensor. Sensor position and the joint is fine.
But I visualize the pointcloud
data in Rviz it is showing in XZ plane instead of XY plane. Take a look at the following image
.
In the image above, it is capturing the image from the front in gazebo but showing on the top of the robot in Rviz.
I tried to put the static transform between frames.
<node pkg="tf" type="static_transform_publisher" name="kinect_frame" args="0 0 0 -1.58 0 -1.58 /middle_link /kinect_link 100" />
But its conflicting with the transform published by robot_state_publisher
.
<link name="kinect_link">
<inertial>
<mass value="0.1"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<!--The 3x3 rotational inertia matrix. -->
<inertia ixx="0.0000282916666667" ixy="0" ixz="0" iyy="0.0000282916666667" iyz="0" izz="0.00005625"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="package://simbha_model/urdf/meshes/kinect.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="Black"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="0.065" radius="0.005"/>
</geometry>
<material name="Black"/>
</collision>
</link>
<joint name="kinect_link_joint" type="fixed">
<parent link="middle_link"/>
<child link="kinect_link"/>
<origin rpy="0 0 0" xyz="0.075 0.0 0.155"/>
</joint>
How to set the kinect frame???
Try setting the rpy (roll pitch yaw) of the kinect_link_joint in your urdf.
I tried but that changed view(other than front) also. even in gazebo model, the same issue is there.