Skip to content

✨ Feat: Provide try-except feature in camera.py when update the render_participants. #216

@xiaoan17

Description

@xiaoan17

问题背景:在导入真实的交通场景时,并非所有车辆的frame范围都是对齐的。

异常现象:这会导致Camera采集到的图像数据有时会出现空白(没有获取到对应frame下的state信息)。

具体原因:在def _render_participants(self, participants: dict, participant_ids: list, frame: int = None)的参数逻辑下,大部分都是以某一个agent的frame来进行更新的。

修正措施:或许可以添加try-except来处理这部分state = participant.trajectory.get_state(frame)的更新。

函数位置:tactics2d/sensor/camera.py [@Version: 1.0.0]

Image

Metadata

Metadata

Assignees

Labels

enhancementNew feature, improvement, or request.

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions