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

Adapted main loops for simulator and player applications. #6

Open
wants to merge 1 commit into
base: ros1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 28 additions & 19 deletions gaden_demo/demo/gaden_filament_simulator.rviz
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Panels:
- Class: rviz/Displays
Help Height: 81
Help Height: 96
Name: Displays
Property Tree Widget:
Expanded: ~
Expanded:
- /Status1
- /Grid1
- /Map1
- /Filaments_Dispersion1
- /Environment_CAD1
- /Gas_Dispersion1
- /Gas_Dispersion1/Status1
- /Gas_Sources1
- /Gas_Sources1/Namespaces1
- /Simulated_Sensors1
Splitter Ratio: 0.594443977
Tree Height: 758
Tree Height: 749
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expand Down Expand Up @@ -44,7 +54,7 @@ Visualization Manager:
Z: 0
Plane: XY
Plane Cell Count: 200
Reference Frame: <Fixed Frame>
Reference Frame: map
Value: true
- Class: rviz/Axes
Enabled: false
Expand All @@ -57,18 +67,17 @@ Visualization Manager:
Class: rviz/Map
Color Scheme: map
Draw Behind: false
Enabled: true
Enabled: false
Name: Map
Topic: /map
Unreliable: false
Use Timestamp: false
Value: true
Value: false
- Class: rviz/Marker
Enabled: true
Marker Topic: /filament_visualization
Name: Filaments_Dispersion
Namespaces:
{}
filaments: true
Queue Size: 100
Value: true
- Class: rviz/MarkerArray
Expand All @@ -84,7 +93,7 @@ Visualization Manager:
Marker Topic: /Gas_Distribution
Name: Gas_Dispersion
Namespaces:
Gas_Dispersion: true
{}
Queue Size: 100
Value: true
- Class: rviz/MarkerArray
Expand All @@ -100,7 +109,7 @@ Visualization Manager:
Marker Topic: /Mox00/Sensor_display
Name: Simulated_Sensors
Namespaces:
sensor_visualization: true
{}
Queue Size: 100
Value: true
Enabled: true
Expand All @@ -126,32 +135,32 @@ Visualization Manager:
Views:
Current:
Class: rviz/XYOrbit
Distance: 18.3090649
Distance: 18.1148739
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 0.733855963
Y: -2.98371601
Z: -5.97928229e-05
X: 2.21766186
Y: 0.438620567
Z: -5.78854742e-05
Focal Shape Fixed Size: true
Focal Shape Size: 0.0500000007
Name: Current View
Near Clip Distance: 0.00999999978
Pitch: 1.18479669
Pitch: 1.15479672
Target Frame: <Fixed Frame>
Value: XYOrbit (rviz)
Yaw: 4.72364616
Yaw: 5.0386281
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1001
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd00000004000000000000016a00000388fc0200000007fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006700fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000004300000388000000e300fffffffb00000014005200470042002d00430061006d006500720061020000006d0000003e000004840000034efb0000001800440065007000740068002d00430061006d0065007200610000000302000000c90000000000000000000000010000016300000388fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000004300000388000000b300fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004a00000003efc0100000002fb0000000800540069006d00650000000000000004a00000022300fffffffb0000000800540069006d00650100000000000004500000000000000000000005200000038800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd0000000400000000000001c00000038efc0200000007fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000007600fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000400000038e0000010100fffffffb00000014005200470042002d00430061006d006500720061020000006d0000003e000004840000034efb0000001800440065007000740068002d00430061006d0065007200610000000302000000c90000000000000000000000010000016300000388fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000004300000388000000c300fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004a00000003efc0100000002fb0000000800540069006d00650000000000000004a00000023300fffffffb0000000800540069006d00650100000000000004500000000000000000000004ca0000038e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
Expand All @@ -161,5 +170,5 @@ Window Geometry:
Views:
collapsed: true
Width: 1680
X: 1680
Y: 0
X: 526
Y: 45
34 changes: 34 additions & 0 deletions gaden_demo/launch/gaden_environment.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- DEMO mission file for GADEN filament simulator -->

<launch>

<arg name="FixedFrame" default="/map" />

### NODE environment (for RVIZ visualization) ###
<node pkg="gaden_environment" type="environment" name="environment" output="screen">
<param name="/fixed_frame" value="$(arg FixedFrame)"/>

# Plot source positions
<param name="/number_of_sources" value="3"/>
<param name="/source_0_position_x" value="-2.5"/>
<param name="/source_0_position_y" value="-3.0"/>
<param name="/source_0_position_z" value="1"/>

<param name="/source_1_position_x" value="2.5"/>
<param name="/source_1_position_y" value="-3.0"/>
<param name="/source_1_position_z" value="1"/>

<param name="/source_2_position_x" value="0.5"/>
<param name="/source_2_position_y" value="-1.5"/>
<param name="/source_2_position_z" value="1"/>

# Plot CAD models
<param name="/occupancy3D_data" value="$(find gaden_demo)/demo/OccupancyGrid3D.csv" />
<param name="/number_of_CAD" value="5"/>
<param name="/CAD_0" value="package://gaden_demo/demo/CADmodels/MAPIRlab_furniture_walls_cad_model.dae"/>
<param name="/CAD_1" value="package://gaden_demo/demo/CADmodels/MAPIRlab_furniture_windows_cad_model.dae"/>
<param name="/CAD_2" value="package://gaden_demo/demo/CADmodels/MAPIRlab_furniture_doors_cad_model.dae"/>
<param name="/CAD_3" value="package://gaden_demo/demo/CADmodels/MAPIRlab_furniture_tables_cad_model.dae"/>
<param name="/CAD_4" value="package://gaden_demo/demo/CADmodels/MAPIRlab_furniture_wardrobes_cad_model.dae"/>
</node>
</launch>
5 changes: 3 additions & 2 deletions gaden_demo/launch/gaden_player_demo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
### NODE PLAYER ###
#-------------------
<node pkg="gaden_player" type="gaden_player" name="gaden_player" output="screen">
<param name="/single_stepping" value="yes"/>
<param name="/verbose" value="false" />
<param name="/player_freq" value="20" /> ###(Hz) Freq for loading the simulation log_files
<param name="/num_simulators" value="1" /> ### Number of simulations to load [1-inf] (useful for multiple sources and gases)
<param name="/player_freq" value="20" /> ###(Hz) Freq for loading the simulation log_files
<param name="/num_simulators" value="1" /> ### Number of simulations to load [1-inf] (useful for multiple sources and gases)

# Data from the "filament_simulator" pkg
# Multiple sources can be set here
Expand Down
9 changes: 5 additions & 4 deletions gaden_demo/launch/gaden_simulator_demo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@
### NODE Filament Simulator ###
<node pkg="gaden_filament_simulator" type="filament_simulator" name="filament_simulator1" output="screen">
<param name="/sim_time" value="300" /> ### [sec] Total time of the gas dispersion simulation
<param name="/single_stepping" value="yes" />
<param name="/time_step" value="0.1" /> ### [sec] Time increment between snapshots. Set aprox = cell_size/max_wind_speed.
<param name="/num_filaments_sec" value="10" /> ### Num of filaments released each second
<param name="/ppm_filament_center" value="10"/> ### [ppm] Gas concentration at the center of the 3D gaussian (filament)
<param name="/filament_initial_std" value="10"/> ### [cm] Sigma of the filament at t=0-> 3DGaussian shape
<param name="/filament_growth_gamma" value="10"/> ### [cm²/s] Growth ratio of the filament_std
<param name="/filament_noise_std" value="0.02"/> ### [m] Range of the white noise added on each iteration
<param name="/ppm_filament_center" value="10"/> ### [ppm] Gas concentration at the center of the 3D gaussian (filament)
<param name="/filament_initial_std" value="10"/> ### [cm] Sigma of the filament at t=0-> 3DGaussian shape
<param name="/filament_growth_gamma" value="10"/> ### [cm²/s] Growth ratio of the filament_std
<param name="/filament_noise_std" value="0.02"/> ### [m] Range of the white noise added on each iteration
<param name="/gas_type" value="0" /> ### 0=Ethanol, 1=Methane, 2=Hydrogen, 6=Acetone
<param name="/temperature" value="298"/> ### [Kelvins]
<param name="/pressure" value="1"/> ### [Atm]
Expand Down
3 changes: 2 additions & 1 deletion gaden_filament_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ find_package(catkin REQUIRED COMPONENTS
std_msgs
nav_msgs
pcl_ros
gaden_msgs
)

find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)

catkin_package(
DEPENDS roscpp visualization_msgs std_msgs nav_msgs
DEPENDS roscpp visualization_msgs std_msgs nav_msgs gaden_msgs
)

include_directories(include)
Expand Down
Loading