Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ rosrust = "0.9.11"
rosrust_msg = "0.1.7"
rustros_tf = { git = "https://github.com/maximaerz/rustros_tf" }
serde = { version = "*", features = ["derive"] }
serde_yaml = "0.9"
serde_derive = "*"
strum = "0.23"
strum_macros = "0.23"
timer = "0.1.6"
tokio = { version = "1.16", features = ["full"] }
tui = "0.18.0"
tui-image = { git = "https://github.com/arraypad/tui-image", version = "*" }
tui-tree-widget = { git = "https://github.com/AlexKaravaev/tui-rs-tree-widget", branch = "alex/v0.9.0-pub-text" }

[dependencies.confy]
version = "0.5.0"
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ This mode allows to visualize images received on the topics specified under `ima
The topic manager can add and remove topics int the termviz config. When confirmed the config will be stored and termviz must be restarted.
Only supported topics are displayed, topics can only be in the active or in the available list.

### TF Tree View

Similar to rqt_tf_tree, it displays the TF tree and allows users to interactively echo any two arbitrary frames.

#### Prerequisites

Ensure the tf2_frames service is available by running the [tf_service server](https://github.com/magazino/tf_service) with the --frames_service argument:

```sh
rosrun tf_service server --frames_service
```
**Note**: tf service server is required since [rustros_tf](https://github.com/arjo129/rustros_tf) doesn't advertise by default tf2_frames service like C++/Python versions do.


## Default config

Here is the commented default config file:
Expand Down Expand Up @@ -148,6 +162,7 @@ teleop: # Parameters for the Teleoperate mode.
increment_step: 0.1 # Step for increasing the velocity increment.
cmd_vel_topic: cmd_vel # Topic on which to publish the velocity commands.
publish_cmd_vel_when_idle: true # If true keep publishing 0 velocities, only publish once otherwise
tf_frames_service_name: /tf_service/tf2_frames
```

## Maintainers
Expand Down
6 changes: 4 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,18 @@ impl<B: Backend> App<B> {
viewport.clone(),
));
let teleop = Box::new(app_modes::teleoperate::Teleoperate::new(
viewport,
viewport.clone(),
config.teleop,
));
let topic_manager = Box::new(app_modes::topic_managment::TopicManager::new(config_copy));
let tf_tree_view = Box::new(app_modes::tf::TfTreeView::new(viewport, config.tf_frames_service_name));

let image_view = Box::new(app_modes::image_view::ImageView::new(config.image_topics));
App {
mode: 1,
show_help: false,
keymap: config.key_mapping,
app_modes: vec![send_pose, teleop, image_view, topic_manager],
app_modes: vec![send_pose, teleop, image_view, topic_manager, tf_tree_view],
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/app_modes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pub mod image_view;
pub mod send_pose;
pub mod teleoperate;
pub mod topic_managment;
pub mod tf;
pub mod viewport;

use tui::backend::Backend;
Expand Down Expand Up @@ -35,6 +36,7 @@ pub mod input {
pub const DECREMENT_STEP: &str = "Decrement step";
pub const NEXT: &str = "Next";
pub const PREVIOUS: &str = "Previous";
pub const UPDATE: &str = "Update";
pub const SHOW_HELP: &str = "Show help";
pub const UNMAPPED: &str = "Any other";
}
Expand Down
Loading