Skip to content

Conversation

vincentpierre
Copy link
Contributor

Proposed change(s)

Adding a SensorName field to BufferSensor in order to have more than one BufferSensor per Agent.
Modified the changelog to include the new BufferSensor (Was missing before)

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@vincentpierre vincentpierre self-assigned this Mar 1, 2021
@vincentpierre vincentpierre requested a review from chriselion March 1, 2021 23:10
/// Name of the generated <see cref="bufferSensor"/> object.
/// Note that changing this at runtime does not affect how the Agent sorts the sensors.
/// </summary>
public string SensorName
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, I think all of these (name, ObservableSize, MaxNumObservables) need

  • private storage
  • public get/set accessors.
  • a custom editor (don't let any of the fields get updated during play mode)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I just found the CameraSensorComponentEditor and I will use that as a base.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. I think this might even be simpler than CameraSensorComponentEditor, since I don't think there's anything that reasonably editable at runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -98,7 +100,7 @@ public SensorCompressionType GetCompressionType()

public string GetName()
{
return "BufferSensor";
return m_Name;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: add /// <inheritdoc/> to this and GetCompressionType()

@vincentpierre vincentpierre merged commit 7f178d5 into main Mar 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix-adding-name-field-to-var-len-obs-and-adding-to-changelog branch March 2, 2021 19:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants