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

[drone_teleop] Cameras and pos/vel freeze in new GUI #38

Closed
diegomrt opened this issue May 29, 2020 · 4 comments · Fixed by #48
Closed

[drone_teleop] Cameras and pos/vel freeze in new GUI #38

diegomrt opened this issue May 29, 2020 · 4 comments · Fixed by #48
Labels
bug Something isn't working

Comments

@diegomrt
Copy link
Collaborator

Each 20/30 sec both the cameras and the position/velocities freeze in the new drone_teleop GUI, as it's seen in the screenshot below. Tested using the new drone_teleop_all.perspective.

Clicking in some precise points/controls of the GUI unfreeze the perspective temporarily.

Captura de pantalla de 2020-05-29 18-37-03

@diegomrt diegomrt added the bug Something isn't working label May 29, 2020
@diegomrt
Copy link
Collaborator Author

diegomrt commented Jun 5, 2020

I think we should try if throttling the mavros pose and vel topics to rates < 5 Hz (now they publish at 30 Hz) avoids this issue.

I've checked the cameras perspective alone and it doesn't freeze.

@pariaspe
Copy link
Collaborator

pariaspe commented Jun 8, 2020

The problem seems to be that the GUI can not update itself as fast as the Subscribers receive msgs with the pose and twist. Then, as you suggest, msgs have to be throttled to reduce the GUI update rate.

This bug could be fixed by creating a Thread which periodically updates the position and velocity info:

threading.Timer(0.5, self.update_status_info).start()

I've tried more ROS friendly solutions using rospy.Timer, throttle or drop, but I didn't get any working solution.

@diegomrt
Copy link
Collaborator Author

diegomrt commented Jun 8, 2020

Hi @pariaspe, I seems good to me if it works and it doens't overload the CPU.

In any case, ROS-based solutions could rely on suscribing the GUI to new throttled pose and vel topics, that can be published at least in two different ways:

  • Launching a ROS throttling node directly from the exercise .launch (easiest way, a line of code)
  • Building our own "republish 1, discard the next 14 messages" solution within the drone_wrapper, which is capable of handling easily the actual 30 Hz callbacks

@pariaspe
Copy link
Collaborator

pariaspe commented Jun 8, 2020

I've just created a new issue to implement a new ROS-based solution that fixes this issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants