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

Optical Tactile Sensor Plugin #229

Merged
merged 33 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0aca10d
Initial commit
mcres Jun 4, 2020
222d65b
Added plugin files
mcres Jun 4, 2020
7be1771
Initial .sdf file
mcres Jun 8, 2020
c3d91fb
Pipeline for getting sensor contacts
mcres Jun 8, 2020
16a268e
Added visualization of postion and forces
mcres Jun 9, 2020
5cd5d5f
Added plugin for Transform Control
mcres Jun 9, 2020
cd58ae6
Added initial interpolation
mcres Jun 10, 2020
40a87ef
Code check
mcres Jun 11, 2020
5b85a48
Update info after specified milliseconds
mcres Jun 12, 2020
93918eb
Set marker lifetime for better performance
mcres Jun 15, 2020
d480c54
Added Depth Camera
mcres Jun 17, 2020
3774efc
Added callback and unpacking to Depth Camera messages
mcres Jun 17, 2020
2bab9c8
Compute and visualize normal forces
mcres Jun 25, 2020
6c32ba0
Merge master
mcres Jun 26, 2020
badd572
PR Feedback 1
mcres Jul 9, 2020
70774f4
Update sdf example to a more realistic environment
mcres Jul 9, 2020
1652081
Allow moving Depth Camera from model origin
mcres Jul 9, 2020
4bccc6c
Make markers dimensions available as parameters
mcres Jul 9, 2020
16732f6
Visualize sensor as a marker instead of <visual> and filter out norma…
mcres Jul 13, 2020
2a45a84
PR Feedback 2
mcres Jul 31, 2020
6050673
Merge 'master'
mcres Aug 7, 2020
e216bb2
PR Feedback 3
mcres Aug 13, 2020
b321a00
Minor fixes for sdf, sensor marker and profiler
mcres Aug 20, 2020
886f904
PR Feedback 4
mcres Aug 25, 2020
5331ec5
Merge branch 'master' into mcres/optical_tactile_plugin
mcres Aug 26, 2020
bfce5ee
Merge branch 'master' into optical_tactile_plugin
chapulina Sep 1, 2020
7dd644e
Merge branch 'master' into optical_tactile_plugin
chapulina Sep 14, 2020
ee80a3d
Merge branch 'master' into optical_tactile_plugin
chapulina Sep 23, 2020
b17e904
Merge branch 'ign-gazebo4' into optical_tactile_plugin
chapulina Oct 14, 2020
16807b6
fix mac warning
mabelzhang Nov 5, 2020
4a47c92
Merge pull request #2 from ignitionrobotics/mabelzhang/patch_optical_…
mcres Dec 1, 2020
703a916
Merge branch 'ign-gazebo4' into optical_tactile_plugin
mabelzhang Dec 1, 2020
af74f4c
Merge branch 'ign-gazebo4' into optical_tactile_plugin
mabelzhang Dec 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 233 additions & 0 deletions examples/worlds/optical_tactile_sensor_plugin.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
<?xml version="1.0" ?>

<sdf version="1.6">
mcres marked this conversation as resolved.
Show resolved Hide resolved
<world name="optical_tactile_plugin">
<plugin
filename="libignition-gazebo-physics-system.so"
name="ignition::gazebo::systems::Physics">
</plugin>
<plugin
filename="libignition-gazebo-contact-system.so"
name="ignition::gazebo::systems::Contact">
</plugin>
<plugin
filename="libignition-gazebo-user-commands-system.so"
name="ignition::gazebo::systems::UserCommands">
</plugin>
<plugin
filename="libignition-gazebo-scene-broadcaster-system.so"
name="ignition::gazebo::systems::SceneBroadcaster">
</plugin>
<plugin
filename="libignition-gazebo-sensors-system.so"
name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>

<gui fullscreen="0">

<!-- 3D scene -->
<plugin filename="GzScene3D" name="3D View">
<ignition-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</ignition-gui>

<engine>ogre2</engine>
<scene>scene</scene>
<ambient_light>0.4 0.4 0.4</ambient_light>
<background_color>0.8 0.8 0.8</background_color>
<camera_pose>-6 0 6 0 0.5 0</camera_pose>
</plugin>

<!-- World control -->
<plugin filename="WorldControl" name="World control">
<ignition-gui>
<title>World control</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
<property type="double" key="height">72</property>
<property type="double" key="width">121</property>
<property type="double" key="z">1</property>

<property type="string" key="state">floating</property>
<anchors target="3D View">
<line own="left" target="left"/>
<line own="bottom" target="bottom"/>
</anchors>
</ignition-gui>

<play_pause>true</play_pause>
<step>true</step>
<start_paused>true</start_paused>
<service>/world/optical_tactile_plugin/control</service>
<stats_topic>/world/optical_tactile_plugin/stats</stats_topic>
<service>/world/depth_camera_sensor/control</service>
<stats_topic>/world/depth_camera_sensor/stats</stats_topic>

</plugin>

<!-- World statistics -->
<plugin filename="WorldStats" name="World stats">
<ignition-gui>
<title>World stats</title>
<property type="bool" key="showTitleBar">false</property>
<property type="bool" key="resizable">false</property>
<property type="double" key="height">110</property>
<property type="double" key="width">290</property>
<property type="double" key="z">1</property>

<property type="string" key="state">floating</property>
<anchors target="3D View">
<line own="right" target="right"/>
<line own="bottom" target="bottom"/>
</anchors>
</ignition-gui>

<sim_time>true</sim_time>
<real_time>true</real_time>
<real_time_factor>true</real_time_factor>
<iterations>true</iterations>
<topic>/world/optical_tactile_plugin/stats</topic>
<topic>/world/depth_camera_sensor/stats</topic>
</plugin>

<plugin filename="ImageDisplay" name="Image Display">
<ignition-gui>
<property key="state" type="string">docked</property>
</ignition-gui>
</plugin>

<!-- Transform Control -->
<plugin filename="TransformControl" name="Transform Control">
<ignition-gui>
<property key="x" type="double">0</property>
<property key="y" type="double">0</property>
<property key="width" type="double">263</property>
<property key="height" type="double">50</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#03a9f4</property>
</ignition-gui>
</plugin>

<!-- Entity tree -->
<plugin filename="EntityTree" name="Entity tree">
<ignition-gui>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
</ignition-gui>
</plugin>
<plugin filename="ComponentInspector" name="Component inspector">
</plugin>

</gui>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>1 1 1 1</diffuse>
<specular>0.5 0.5 0.5 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>

<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
</plane>
</geometry>
</collision>
<visual name="visual">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<ambient>0.8 0.8 0.8 1</ambient>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
</material>
</visual>
</link>
</model>

<model name="tactile_sensor">
<pose>-0.005 -0.001 0.847 0 1.57 -1.57</pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>0.005 0.02 0.02</size>
</box>
</geometry>
</collision>
<sensor name="depth_camera" type="depth_camera">
<update_rate>1</update_rate>
<topic>depth_camera</topic>
<pose relative_to="tactile_sensor">-0.05 0 0 0 0 0</pose>
<camera>
<image>
<width>640</width>
<height>480</height>
<format>R_FLOAT32</format>
</image>
<clip>
<near>0.030</near>
<far>10.0</far>
</clip>
</camera>
</sensor>
<sensor name="contact_sensor" type="contact">
<contact>
<collision>collision</collision>
</contact>
</sensor>

</link>
<static>true</static>
<plugin
filename="libignition-gazebo-opticaltactileplugin-system.so"
name="ignition::gazebo::systems::OpticalTactilePlugin">
<enabled>true</enabled>
<visualization_resolution>15</visualization_resolution>
<visualize_forces>true</visualize_forces>
<visualize_sensor>true</visualize_sensor>
<force_length>0.01</force_length>
<extended_sensing>0.001</extended_sensing>
</plugin>
</model>

<include>
<pose>0 0 0 0 0 0</pose>
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/SurgicalTrolleyMed</uri>
</include>

<include>
<pose>0 0 0.7 0 0 0</pose>
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke</uri>
</include>

<include>
<pose>0 -0.7 0 0 0 3.14</pose>
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/OfficeChairBlue</uri>
</include>

<include>
<pose>-1.5 0 0 0 0 0</pose>
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/VendingMachine</uri>
</include>

</world>
</sdf>
1 change: 1 addition & 0 deletions src/systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ add_subdirectory(logical_camera)
add_subdirectory(magnetometer)
add_subdirectory(multicopter_motor_model)
add_subdirectory(multicopter_control)
add_subdirectory(optical_tactile_plugin)
add_subdirectory(performer_detector)
add_subdirectory(physics)
add_subdirectory(pose_publisher)
Expand Down
7 changes: 7 additions & 0 deletions src/systems/optical_tactile_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gz_add_system(opticaltactileplugin
SOURCES
OpticalTactilePlugin.cc
Visualization.cc
PUBLIC_LINK_LIBS
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
)
Loading