Skip to main content

virtual_wall

Message type: map_manager/msg/VirtualWall

Description​

Virtual-wall definition for adding an impassable virtual obstacle to a map.

GRW usage​

GRW manages virtual walls for the current map through /wall/add, /wall/list, /wall/update, and /wall/remove. A successful add returns a numeric wall_id; list results and update requests identify the wall by numeric id. The wall geometry is defined by the x and y values of start and end.

Field definition​

Fields​

FieldTypeGRW behavior
idint32Numeric wall identifier; returned by listing and used by update. Assigned by GRW on add.
startgeometry_msgs/PointStart point; GRW uses x and y.
endgeometry_msgs/PointEnd point; GRW uses x and y.
floor_idstringIDL compatibility field; ignored.

Example​

Use in a service​

Bash
ros2 service call /wall/add map_manager/srv/AddVirtualWall \
"{wall: {start: {x: 0.0, y: 5.0}, end: {x: 10.0, y: 5.0}}}"

Construct in Python​

Python
from geometry_msgs.msg import Point
from map_manager.msg import VirtualWall

wall = VirtualWall()
wall.id = 1
wall.start = Point(x=0.0, y=0.0, z=0.0)
wall.end = Point(x=5.0, y=0.0, z=0.0)