Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMU data #18

Open
kc944201 opened this issue Jul 14, 2020 · 5 comments
Open

IMU data #18

kc944201 opened this issue Jul 14, 2020 · 5 comments

Comments

@kc944201
Copy link

Hi

I use Intel D435i for simulation in Gazebo
I want to add IMU data to simulate

Could you offer some instructions to me?
or some else plugin could suggest

Thanks you!!!

@khaledgabr77
Copy link

i have same issue, if you know how to add imu let me know
thanks

@shonigmann
Copy link

shonigmann commented Nov 30, 2020

I was able to add an IMU link and sensor to the D435 URDF output using the standard gazebo plugin. I haven't gotten around to modifying the xacro yet, but in case it helps, the following addition worked for me:

  <link name="imu_link">
    <inertial>
      <mass value="0.0005"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.00003" ixy="0.0" ixz="0.0" iyy="0.000004" iyz="0.0" izz="0.00003"/>
    </inertial>
  </link> 
  <joint name="imu_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <parent link="camera_link"/>
    <child link="imu_link"/>
  </joint>
  <gazebo reference="imu_link">
    <sensor name="imu_sensor" type="imu">
      <always_on>true</always_on>
      <update_rate>300</update_rate>
      <visualize>true</visualize>
      <topic>__default_topic__</topic>
      <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin">
      	<robotNamespace>camera</robotNamespace>
        <topicName>imu</topicName>
        <bodyName>imu_link</bodyName>
        <updateRateHZ>300.0</updateRateHZ>
        <gaussianNoise>0.0</gaussianNoise>
        <xyzOffset>0 0 0</xyzOffset>
        <rpyOffset>0 0 0</rpyOffset>
        <frameName>camera_link</frameName>
      </plugin>
      <pose>0 0 0 0 0 0</pose>
    </sensor>
  </gazebo>

I haven't done too much testing, but this seems to work well enough. Note that, unlike a real D435i, the IMU data will not be synchronized with the image frames.. I haven't found a good way to achieve this yet.

@m-tartari
Copy link

I've made a fork of this repo where I've added gazebo plugins to publish IMU data on the same topics as the Intel D435i.
You can find it as m-tartari/realsense_gazebo_plugin, I've put instructions on how to use it in the README file.

@v-lopez
Copy link
Contributor

v-lopez commented Dec 2, 2020

@m-tartari If you want to submit a PR we'll happily review it.

At the moment we don't have the resources to add new features to this repo, but we can accept contributions.

@m-tartari
Copy link

m-tartari commented Dec 2, 2020

@v-lopez I've opened a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants