Skip to content

Commit

Permalink
Enhanced tracking camera and user visualization experience (gazebosim…
Browse files Browse the repository at this point in the history
…#619)

Signed-off-by: Benjamin Perseghetti <[email protected]>
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
bperseghetti and ahcorde authored May 22, 2024
1 parent b4a0f36 commit 1a04fbb
Show file tree
Hide file tree
Showing 10 changed files with 820 additions and 73 deletions.
40 changes: 32 additions & 8 deletions examples/standalone/scene_provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugin to update the scene using Gazebo Transport.

## Build

```
```bash
cd examples/standalone/scene_provider
mkdir build
cd build
Expand All @@ -21,14 +21,14 @@ make

In one terminal, start the scene provider:

```
```bash
cd examples/standalone/scene_provider/build
./scene_provider
```

On another terminal, start the example config:

```
```bash
gz gui -c examples/config/scene3d.config
```

Expand All @@ -42,24 +42,48 @@ Some commands to test camera tracking with this demo:

Move to box:

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

Echo camera pose:

```
```bash
gz topic -e -t /gui/camera/pose
```

Follow box:
Echo camera tracking information:

```bash
gz topic -e -t /gui/currently_tracked
```
gz service -s /gui/follow --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "box_model"'

Follow box from track topic:

```bash
gz topic -t /gui/track -m gz.msgs.CameraTrack -p 'track_mode: 2, follow_target: { name: "box_model"}'
```

Update follow offset:
Follow box from track topic:

```bash
gz topic -t /gui/track -m gz.msgs.CameraTrack -p 'track_mode: 2, follow_target: "box_model", follow_offset: {x: -1, y: 0, z: 1}'
```

Update follow offset from track topic:

```bash
gz topic -t /gui/track -m gz.msgs.CameraTrack -p 'track_mode: 2, follow_target: {name: "box_model"}, follow_offset: {x: -1, y: 0, z: 1}'
```

Follow box from service (deprecated):

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

Update follow offset from follow offset service (deprecated):

```bash
gz service -s /gui/follow/offset --reqtype gz.msgs.Vector3d --reptype gz.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 @@ -116,6 +116,7 @@ endfunction()
# Plugins
add_subdirectory(camera_fps)
add_subdirectory(camera_tracking)
add_subdirectory(camera_tracking_config)
add_subdirectory(grid_config)
add_subdirectory(image_display)
add_subdirectory(interactive_view_control)
Expand Down
Loading

0 comments on commit 1a04fbb

Please sign in to comment.