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

TrajectoryBuffer: take inspiration from m3t_tracker_ros #103

Open
MaximilienNaveau opened this issue Dec 5, 2024 · 1 comment
Open

TrajectoryBuffer: take inspiration from m3t_tracker_ros #103

MaximilienNaveau opened this issue Dec 5, 2024 · 1 comment
Assignees

Comments

@MaximilienNaveau
Copy link
Collaborator

          I made similar thing, but with sorting of the results based on timestamps. This might come in handy if we decide to stream points instead of buffering them. You can find in the [m3t_tracker_ros](https://gitlab.laas.fr/kwojciecho/m3t_tracker_ros/-/blob/main/m3t_tracker_ros/m3t_tracker_ros/image_time_buffer.py?ref_type=heads)

Originally posted by @Kotochleb in #97 (comment)

@Kotochleb
Copy link
Contributor

To continue on the topic...
TrajectoryBuffer might overwrite functions

def append(self, x: Any) -> None:
    bisect.insort(self.__super__(), x) 

And

def extend(self, x: Any) -> None:
    self.__super__().extend(x)
    self.__super__() = sorted(self.__super__()) 

I am not 100% confident with the suggested implementation, but I would see it like this. Additionally, I am not sure about the efficiency of the lather. Maybe an if statement to avoid resorting every time would be useful.

@MedericFourmy MedericFourmy changed the title I made similar thing, but with sorting of the results based on timestamps. This might come in handy if we decide to stream points instead of buffering them. You can find in the [m3t_tracker_ros](https://gitlab.laas.fr/kwojciecho/m3t_tracker_ros/-/blob/main/m3t_tracker_ros/m3t_tracker_ros/image_time_buffer.py?ref_type=heads) MPC Buffer: take inspiration from m3t_tracker_ros Dec 9, 2024
@MedericFourmy MedericFourmy changed the title MPC Buffer: take inspiration from m3t_tracker_ros TrajectoryBuffer: take inspiration from m3t_tracker_ros Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants