Ask Your Question
1

RVIZ visualize the data in the different plane. How to fix that?

asked 2018-06-01 00:55:08 -0500

updated 2018-06-11 09:27:05 -0500

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

image description.

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???

edit retag flag offensive close merge delete

Comments

Try setting the rpy (roll pitch yaw) of the kinect_link_joint in your urdf.

lucasw gravatar imagelucasw ( 2018-06-11 11:08:58 -0500 )edit

I tried but that changed view(other than front) also. even in gazebo model, the same issue is there.

simbha gravatar imagesimbha ( 2018-06-12 00:08:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-02 03:55:02 -0500

updated 2018-07-02 04:00:36 -0500

Finally, I Solved the problem by myself. I created a dummy link on which Kinect plugin was attached and then in the launch file use robot_sttae_publisher and static_tranform between dummy link and kinect_link. I changed the static transform in such a way it solved my issue

<node pkg="tf" type="static_transform_publisher" name="kinect_frame" args="0 0 0 -1.58 0 -1.58 /kinect_link /kinect_tf_link 100" />

Here kinect_link is the dummy link and kinect_tf_link is the link on which Kinect plugin is attached

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-06-01 00:55:08 -0500

Seen: 145 times

Last updated: Jul 02 '18