Skip to content

Commit aaaaa20

Browse files
committed
Add Tf Tree View mode
Add Tf Tree View mode that also allows user to echo transforms between frames.
1 parent 59890cb commit aaaaa20

File tree

6 files changed

+596
-2
lines changed

6 files changed

+596
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ rosrust = "0.9.11"
2525
rosrust_msg = "0.1.7"
2626
rustros_tf = { git = "https://github.com/maximaerz/rustros_tf" }
2727
serde = { version = "*", features = ["derive"] }
28+
serde_yaml = "0.9"
2829
serde_derive = "*"
2930
strum = "0.23"
3031
strum_macros = "0.23"
3132
timer = "0.1.6"
3233
tokio = { version = "1.16", features = ["full"] }
3334
tui = "0.18.0"
3435
tui-image = { git = "https://github.com/arraypad/tui-image", version = "*" }
36+
tui-tree-widget = { git = "https://github.com/AlexKaravaev/tui-rs-tree-widget", branch = "alex/v0.9.0-pub-text" }
3537

3638
[dependencies.confy]
3739
version = "0.5.0"

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ This mode allows to visualize images received on the topics specified under `ima
6262
The topic manager can add and remove topics int the termviz config. When confirmed the config will be stored and termviz must be restarted.
6363
Only supported topics are displayed, topics can only be in the active or in the available list.
6464

65+
### Tf Tree View
66+
67+
Similar to rqt_tf_tree, it displays the TF tree and allows users to interactively echo any two arbitrary frames.
68+
6569
## Default config
6670

6771
Here is the commented default config file:
@@ -148,6 +152,7 @@ teleop: # Parameters for the Teleoperate mode.
148152
increment_step: 0.1 # Step for increasing the velocity increment.
149153
cmd_vel_topic: cmd_vel # Topic on which to publish the velocity commands.
150154
publish_cmd_vel_when_idle: true # If true keep publishing 0 velocities, only publish once otherwise
155+
tf_frames_service_name: /tf_service/tf2_frames
151156
```
152157
153158
## Maintainers

src/app.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,18 @@ impl<B: Backend> App<B> {
6060
viewport.clone(),
6161
));
6262
let teleop = Box::new(app_modes::teleoperate::Teleoperate::new(
63-
viewport,
63+
viewport.clone(),
6464
config.teleop,
6565
));
6666
let topic_manager = Box::new(app_modes::topic_managment::TopicManager::new(config_copy));
67+
let tf_tree_view = Box::new(app_modes::tf::TfTreeView::new(viewport, config.tf_frames_service_name));
68+
6769
let image_view = Box::new(app_modes::image_view::ImageView::new(config.image_topics));
6870
App {
6971
mode: 1,
7072
show_help: false,
7173
keymap: config.key_mapping,
72-
app_modes: vec![send_pose, teleop, image_view, topic_manager],
74+
app_modes: vec![send_pose, teleop, image_view, topic_manager, tf_tree_view],
7375
}
7476
}
7577

src/app_modes/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub mod image_view;
44
pub mod send_pose;
55
pub mod teleoperate;
66
pub mod topic_managment;
7+
pub mod tf;
78
pub mod viewport;
89

910
use tui::backend::Backend;
@@ -35,6 +36,7 @@ pub mod input {
3536
pub const DECREMENT_STEP: &str = "Decrement step";
3637
pub const NEXT: &str = "Next";
3738
pub const PREVIOUS: &str = "Previous";
39+
pub const UPDATE: &str = "Update";
3840
pub const SHOW_HELP: &str = "Show help";
3941
pub const UNMAPPED: &str = "Any other";
4042
}

0 commit comments

Comments
 (0)