Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish IR Opcodes #66

Merged
merged 9 commits into from
Oct 15, 2021
Merged

Publish IR Opcodes #66

merged 9 commits into from
Oct 15, 2021

Conversation

rjcausarano
Copy link
Collaborator

@rjcausarano rjcausarano commented Oct 2, 2021

Description

This PR Adds:

  • Visual rays to the robot to represent the Omnidirectional IR receiver and the Forward facing IR receiver.
  • Visual rays to the dock to represent the Force Field (Halo) IR emitter and the Red and Green IR emitter Buoys.

rays-visualization

  • A gazebo plugin that published IR Opcodes that describe what the robot receivers see from the dock's emitters

Fixes #61 Fixes #84

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • To test you can teleop the robot and position it in different poses around the dock. The published IR Opcode should reflect what the rays visuals show in gazebo. When the robot's receivers intersect the dock's emitters the corresponding IR Opcode should be published.

  • Keep in mind that an IR Opcode msg with sensor = 0 represents the Omni receiver and sensor = 1 represents the forward facing receiver.

opcodes

opcodes_values

Checklist

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation

  • Remove hardcoded visualization flags before merge

@rjcausarano rjcausarano added the WIP PR is not ready for review label Oct 2, 2021
@rjcausarano rjcausarano added this to the release milestone Oct 2, 2021
@rjcausarano rjcausarano self-assigned this Oct 2, 2021
@rjcausarano rjcausarano added this to In progress in Create 3 via automation Oct 2, 2021
@rjcausarano
Copy link
Collaborator Author

As of now this PR is in WIP state. The dock's emitter range and fov parameters are hard-coded to the plugin. The idea is to detect these parameters within the plugin automatically.

@eborghi10
Copy link
Collaborator

  • Visual rays to the robot to represent the Omnidirectional IR receiver and the Forward facing IR receiver.
  • Visual rays to the dock to represent the Force Field (Halo) IR emitter and the Red and Green IR emitter Buoys.

Do you have a screenshot to see how it looks like?

irobot_create_description/urdf/create3.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_description/urdf/create3.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_description/urdf/dock/ir_emitter.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_description/urdf/dock/standard.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_description/urdf/dock/standard.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
Create 3 automation moved this from In progress to Review in progress Oct 4, 2021
@rjcausarano rjcausarano changed the title [WIP] Publish IR Opcodes Publish IR Opcodes Oct 11, 2021
@rjcausarano rjcausarano added please review PR is ready for review and removed WIP PR is not ready for review labels Oct 11, 2021
Copy link
Collaborator Author

@rjcausarano rjcausarano left a comment

Choose a reason for hiding this comment

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

All comments addressed!

Copy link
Collaborator

@apojomovsky apojomovsky left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, Rodri.
Left a round of comments for you. PTAL.

irobot_create_gazebo_plugins/src/docking_manager.cpp Outdated Show resolved Hide resolved
irobot_create_description/urdf/dock/standard.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_description/urdf/dock/standard.urdf.xacro Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/docking_manager.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/docking_manager.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp Outdated Show resolved Hide resolved
@rjcausarano
Copy link
Collaborator Author

@eborghi10 All your comments were addressed

@rjcausarano
Copy link
Collaborator Author

rjcausarano commented Oct 13, 2021

@apojomovsky @lchico @LolaSegura @eborghi10 I finally got pipelines to pass. Can I please get a review?

Copy link
Collaborator

@lchico lchico left a comment

Choose a reason for hiding this comment

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

Wow, the PR looks very nice! I left some comments! Thanks for the hard works done here!

fixed plugin

dock with links

Halo detection

Force field detection working

Buoy detection working

Publishing IR opcodes for both Force field and buoys detection

Fix clang format

Improved Red, Green and Yellow Buoys detection

Update gazebo_ros_ir_opcode.cpp

Fixes red and green buoy detection

Fix corner case when buoys are detected when they shouldn't

Update irobot_create_description/urdf/create3.urdf.xacro

Co-authored-by: Emiliano Borghi <creativa_eborghi@irobot.com>

Update irobot_create_description/urdf/dock/ir_emitter.urdf.xacro

Co-authored-by: Emiliano Borghi <creativa_eborghi@irobot.com>

Update irobot_create_description/urdf/dock/standard.urdf.xacro

Co-authored-by: Emiliano Borghi <creativa_eborghi@irobot.com>

Update irobot_create_description/urdf/dock/standard.urdf.xacro

Co-authored-by: Emiliano Borghi <creativa_eborghi@irobot.com>

Update irobot_create_gazebo_plugins/src/gazebo_ros_ir_opcode.cpp

Co-authored-by: Emiliano Borghi <creativa_eborghi@irobot.com>

Fix update_rate

Created docking_manager class

Improvements to class

renames file

Both sensors in a single plugin to ensure publish rate

self review

Address peer review comments

Unused includes removed, fixed clang_format

Address comments

Stop using Vector2d to represent polar coordinates

const references for docking manager

Adding const where needed

Address code style comments

New opcodes logic

Updates IR opcode logic

publish rate at 31 Hz

corrects comment

Debug message instead of WARN

fix base_link

Lint errors

Fix lint

restore file
@rjcausarano
Copy link
Collaborator Author

@eborghi10 @lchico @apojomovsky All your comments were addressed will you PTAL?

Copy link
Collaborator Author

@rjcausarano rjcausarano left a comment

Choose a reason for hiding this comment

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

@eborghi10 @lchico @apojomovsky Can I get a review?

Copy link
Collaborator

@apojomovsky apojomovsky left a comment

Choose a reason for hiding this comment

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

LGTM

@rjcausarano rjcausarano merged commit 3ee5792 into master Oct 15, 2021
Create 3 automation moved this from Review in progress to Done Oct 15, 2021
@rjcausarano rjcausarano deleted the rjcausarano/ir_opcode branch October 15, 2021 12:37
@apojomovsky apojomovsky mentioned this pull request Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please review PR is ready for review
Projects
Development

Successfully merging this pull request may close these issues.

Dock should produce buoy and forcefield codes separately. Publish IR Opcodes
6 participants