Skip to content

Commit

Permalink
Merge 3a5ae75 into 6f50c9c
Browse files Browse the repository at this point in the history
  • Loading branch information
ahcorde authored Jul 2, 2021
2 parents 6f50c9c + 3a5ae75 commit 9c4df01
Show file tree
Hide file tree
Showing 11 changed files with 859 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})

#--------------------------------------
# Find ignition-common
ign_find_package(ignition-common4 REQUIRED VERSION 4.1)
ign_find_package(ignition-common4 REQUIRED COMPONENTS profiler VERSION 4.1)
set(IGN_COMMON_VER ${ignition-common4_VERSION_MAJOR})

#--------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions examples/config/scene3d.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
<deletion_topic>/example/delete</deletion_topic>
<scene_topic>/example/scene</scene_topic>
</plugin>
<plugin filename="CameraTracking" name="Camera tracking">
<ignition-gui>
<anchors target="View 1">
<line own="right" target="right"/>
<line own="top" target="top"/>
</anchors>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</plugin>
<plugin filename="WorldControl">
<ignition-gui>
<title>Controls</title>
Expand Down
29 changes: 29 additions & 0 deletions examples/standalone/scene_provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,32 @@ ign gui -c examples/config/scene3d.config

You should see a black box moving around the scene.

## Testing other plugins

### Camera tracking

Some commands to test camera tracking with this demo:

Move to box:

```
ign service -s /gui/move_to --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.Boolean --timeout 2000 --req 'data: "box_model"'
```

Echo camera pose:

```
ign topic -e -t /gui/camera/pose
```

Follow box:

```
ign service -s /gui/follow --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.Boolean --timeout 2000 --req 'data: "box_model"'
```

Update follow offset:

```
ign service -s /gui/follow/offset --reqtype ignition.msgs.Vector3d --reptype ignition.msgs.Boolean --timeout 2000 --req 'x: 5, y: 5, z: 5'
```
1 change: 1 addition & 0 deletions src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function(ign_gui_add_plugin plugin_name)
endfunction()

# Plugins
add_subdirectory(camera_tracking)
add_subdirectory(grid_3d)
add_subdirectory(grid_config)
add_subdirectory(image_display)
Expand Down
11 changes: 11 additions & 0 deletions src/plugins/camera_tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ign_gui_add_plugin(CameraTracking
SOURCES
CameraTracking.cc
QT_HEADERS
CameraTracking.hh
TEST_SOURCES
# CameraTracking_TEST.cc
PUBLIC_LINK_LIBS
ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER}
ignition-common${IGN_COMMON_VER}::profiler
)
Loading

0 comments on commit 9c4df01

Please sign in to comment.