-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an r2r_info example to dump the ROS environment report
- Loading branch information
1 parent
28e89bf
commit b46e374
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//! Prints the environmental information for r2r. | ||
use r2r_common::RosMsg; | ||
|
||
fn main() { | ||
println!("# r2r Information"); | ||
|
||
println!("## Env Hash"); | ||
println!("{}", r2r_common::get_env_hash()); | ||
println!(); | ||
|
||
println!("## Messages"); | ||
println!(); | ||
for msg in r2r_common::get_wanted_messages() { | ||
let RosMsg { | ||
module, | ||
prefix, | ||
name, | ||
} = msg; | ||
println!("- `{module}/{prefix}/{name}`"); | ||
} | ||
println!(); | ||
|
||
println!("## Cargo ROS Distro"); | ||
println!(); | ||
println!("```"); | ||
r2r_common::print_cargo_ros_distro(); | ||
println!("```"); | ||
println!(); | ||
|
||
println!("## Cargo Link Watches"); | ||
println!(); | ||
println!("```"); | ||
r2r_common::print_cargo_watches(); | ||
println!("```"); | ||
println!(); | ||
|
||
println!("## Cargo Link Search"); | ||
println!(); | ||
println!("```"); | ||
r2r_common::print_cargo_link_search(); | ||
println!("```"); | ||
println!(); | ||
} |