Skip to content

Conversation

@gmfricke
Copy link
Contributor

@gmfricke gmfricke commented Aug 2, 2018

This is an initial version with basic functionality. Holding shift and drawing in the map frame creates a virtual fence.

  1. In the future, we would like to add text boxes where the exact dimensions can be added rather than having to draw.
  2. There is currently no way to remove a virtual fence once added without replacing it with another virtual fence.
  3. There are cases where robots move out of the virtual fence in simulation. The most common is when two rovers collide and to avoid the collision they move outside the virtual fence.

gmfricke added 8 commits July 18, 2018 17:18
This will allow users to define the rectangle map. The "center" is currently the corner of the rectangle. Variable names should be changed to reflect this (center to corner) and the center and dimensions calulated when the rectangle has finished being drawn and the ROS message is ready to be published.
Also added support for circles but they are not drawable yet.
They now reflect that the region is defined using the corners not the center
Also fixed a debug output error. Can't put < and > in the string because that is parsed as an html tag.
While the virtual fence is being drawn the center, width and height of the rectangle is displayed.
The units are currently pixels. Next they need to be converted into meters.
Converted fence geometry from pixel space to meters for display as the user is drawing the fence.
Implemented Virtual Fence commands as a custom message type and setup QT signals and slots.
The next step is to add a sendVirtualFenceCmd call when the user finishes drawing a fence. Then the pipeline can be debugged.
The center calculation in meters was not properly offset in the conversion from pixel space.
Added the VirtualFence msg type - should have been added previously
ROS adapter had comments that were added to the call back handler since the virtual fence branch was created. This commit fixes the merge conflict.
Copy link
Contributor

@wfvining wfvining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended behavior w.r.t. global/local frame when the box is draw? It seems that if the box is drawn in the local frame then it is in a different position for each robot.

It seems to me that the box should always be treated as if it were drawn in the global frame.

@wfvining
Copy link
Contributor

It also appears that a bug has been introduced causing rqt to crash if the pop-out map is open when the simulation is ended.

@wfvining
Copy link
Contributor

Just a comment, not a change that I need before merge:

Shoud there be a different box displayed for each robot when global frame is not selected?

@wfvining
Copy link
Contributor

One last change:

  • The virtual fence should not persist between simulation runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants