- From the command line
ros2 topic pub /initialpose geometry_msgs/msg/PoseWithCovarianceStamped "{header: {stamp: {sec: 0}, frame_id: 'map'}, pose: {pose: {position: {x: 3.45, y: 2.15, z: 0.0}, orientation: {z: 1.0, w: 0.0}}}}"
- Notes
pub --once
is not enough!- The publication should be terminated once the initial pose takes (and any goal is set) because it wreaks havoc on the localization and, thus, the mappings.
sudo apt update
sudo apt install ros-galactic-nav2-simple-commander
- Code origin
Specifically, in robot_navigator.py
- (Action) Navigate to pose
Definition (NavigateToPose.action
):
#goal definition
geometry_msgs/PoseStamped pose
string behavior_tree
---
#result definition
std_msgs/Empty result
---
# feedback definition
geometry_msgs/PoseStamped current_pose
builtin_interfaces/Duration navigation_time
builtin_interfaces/Duration estimated_time_remaining
int16 number_of_recoveries
float32 distance_remaining
Nodes:
user:~$ ros2 action info /navigate_to_pose
Action: /navigate_to_pose
Action clients: 1
/bt_navigator
Action servers: 1
/bt_navigator
- (Action) Navigate through poses
Definition (NavigateThroughPoses.action
):
#goal definition
geometry_msgs/PoseStamped[] poses
string behavior_tree
---
#result definition
std_msgs/Empty result
---
#feedback definition
geometry_msgs/PoseStamped current_pose
builtin_interfaces/Duration navigation_time
builtin_interfaces/Duration estimated_time_remaining
int16 number_of_recoveries
float32 distance_remaining
int16 number_of_poses_remaining
Nodes:
user:~$ ros2 action info /navigate_through_poses
Action: /navigate_through_poses
Action clients: 0
Action servers: 1
/bt_navigator
- Waypoint following
Documentation: Waypoint Follower
Definition (FollowWaypoints.action
):
#goal definition
geometry_msgs/PoseStamped[] poses
---
#result definition
int32[] missed_waypoints
---
#feedback definition
uint32 current_waypoint
Nodes:
user:~$ ros2 action info /follow_waypoints
Action: /follow_waypoints
Action clients: 0
Action servers: 1
/waypoint_follower
- Keepout filters
Narrative is poor. See notebook. Maps with filters are in map_server/maps
.
- Speed limits
Notes:
-
Seems like keepout-zone filters and speed-limit filters are mutually exclusive. At least this is what the materials imply, but of course that is not reliable.
-
Drawing rectangles with different hues of gray in Preview on Mac OS results in invalid cells for speed filters, obviously some out-of-range error.