Skip to content

Commit

Permalink
added rviz plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Nov 25, 2024
1 parent 7a9944c commit 7d35770
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/50-features/autostart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ description: Autostart Takeoff Routine

The ROS node for automating takeoff routine for UAVs.
The code originates from the [mrs_uav_autostart](https://github.com/ctu-mrs/mrs_uav_autostart) package.

## General description

The **Autostart** checks the availability of essential parts of the system and validity of received data.
Once all modules and data are available, it waits for the UAV to be armed and switched to offboard mode.
Then, after a __safety timeout__, it initiates the takeoff procedure.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/50-features/rviz_plugins/fig/thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions docs/50-features/rviz_plugins/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: Rviz plugins
pagination_label: MRS Rviz plugins
description: MRS Rviz plugins
---

# MRS Rviz Plugins

The Rviz plugins originate from the package [mrs_rviz_plugins](https://github.com/ctu-mrs/mrs_rviz_plugins).

![](fig/thumbnail.jpg)

## Plugins

#### mrs_msgs/ObstacleSectors vizualization

"Bumper" vizualizations, integrates seamlessly.

#### mrs_msgs/PoseWithCovarianceStamped vizualization

Integrates seamlessly.

#### mrs_msgs/TrackArrayStamped vizualization

Integrates seamlessly.

#### mrs_msgs/UavStatus vizualization

Displays useful information about the UAV state and sensors, integrates seamlessly.
Use `mrs_rviz_plugins/UAV Status` display type.

#### nav_msgs/Odometry vizualization

Includes visualization of velocity and its covariance, integrates seamlessly.
Use `mrs_rviz_plugins/OdometryWithVelocity` display type.

#### NamedSetGoal

RViz goal tool with modifiable label.

#### Control tool

Integrates [mrs_uav_status](https://github.com/ctu-mrs/mrs_uav_status/tree/master) and Selection tool functionality into one tool.
Shortcut key for the tool is 'c'.

##### Mouse control

| Mouse event | Action |
|:-------------------------:|:----------------------------:|
| Click and drag | Select objects on the screen |
| Shift + Click and drag | Move 'UAV Status' display |
| Right-click (on drone) | Show services to be called |
| Alt + Left-click | Rotate |
| Alt + Middle-click | Move X/Y |
| Alt + Shift + Left-click | Move X/Y |
| Alt + Right-click | Move Z |
| Alt + Shift + Right-click | Move Z |

##### Controlling the UAV through RVIZ

Press the 'R' key to enter the "remote" mode. While in this mode, you can fly the UAV with your keyboard.
While in remote mode, press 'G' to switch to global frame.
Only one key at a time is registered, multiple key inputs are not supported.

| Key | Action |
|:----------------:|:--------------------:|
| 'wasd' or 'hjkl' | Fly laterally |
| 'qe' | Change UAV's heading |
| 'rf' | Fly up and down |

##### Custom services

You can add your own services to drone's menu.
* To add a service to the menu, publish a message to the topic ```mrs_uav_status/set_trigger_service```
* Only services of the [std_srvs/Trigger](http://docs.ros.org/melodic/api/std_srvs/html/srv/Trigger.html) type are supported
* The message is a [std_msgs/String](http://docs.ros.org/melodic/api/std_msgs/html/msg/String.html), and has to consist of two entries separated by spaces:
* Service name (```uav_manager/land_home```)
* Name to be displayed in the menu (```Land Home```) - this name can contain additional spaces
* The namespace of the UAV will be added automatically (```uav_manager/land_home``` -> ```/uav1/uav_managerland_home```)
* To a service outside of the namespace, use "/" as the first character (```/uav_manager/land_home```)

Press the 'm' key (as menu) to show services on selected drones. Custom services will not be shown, only the default ones.

#### WaypointPlanner

Allows sending a sequence of waypoints to drone.
The click-and-pull input supplies a 2D position with heading (a waypoint). Tool properties allow customization (height change, fly now, loop, use heading).

| Key | Action |
|:-----:|:----------------------:|
| w | Turn the plugin on/off |
| del | Delete last waypoint |
| enter | Trigger behaviour |

![Demonstration](fig/Waypoint_planner_demonstration.gif)

## ROS Nodes - the ROS-Rviz interface

#### RvizNavGoal

Allows giving a reference to a UAV using the "2D Nav Goal" button in Rviz.
The click-and-pull input supplies a 2D position with heading.

#### RvizPoseEstimate

Allows obtaining a coordinates from Rviz by using the "2D Pose Estimate" button in Rviz.
The coordinates will appear as a standard output

## Utils

#### UAV Airframe vizualization

```bash
roslaunch mrs_rviz_plugins load_robot.launch
```

0 comments on commit 7d35770

Please sign in to comment.