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

subt.drone: draw control inputs #693

Merged
merged 4 commits into from
Oct 15, 2020
Merged

subt.drone: draw control inputs #693

merged 4 commits into from
Oct 15, 2020

Conversation

zbynekwinkler
Copy link
Member

No description provided.

Copy link
Member

@m3d m3d 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 tool - I would postpone merge 24 hours, i.e. after Cave Circuit final submission just in case we may need some changes in master, OK?

subt/drone.py Show resolved Hide resolved
#height = [(a[1], a[1] - a[2], a[1] + a[3], a[4]) for a in self.debug_arr]
#line_obj = plt.plot(t, height, '-o', linewidth=2)
#plt.legend(iter(line_obj), ('altitude', 'alt - bottom', 'alt + top', 'pose3D.z'))
#plt.xlabel('time (s)')
Copy link
Member

Choose a reason for hiding this comment

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

label would be nice (from the code I see that it is bottom_scan count. Ideal would be simulated time

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not that proficient with matplotlib and was in kind of a hurry.

a = [A for count, H, E, A in self.debug_arr2]
e = [E for count, H, E, A in self.debug_arr2]
h = [H for count, H, E, A in self.debug_arr2]
plt.plot(x, a)
plt.plot(x, e)
plt.plot(x, h)
plt.xlabel('sim time (s)')
Copy link
Member Author

Choose a reason for hiding this comment

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

It's approximation since the messages can be dropped out on the ROS side but I guess that does not really matter for this much.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it is misleading (the absolute time) - it can give us hint about period of the oscillations but as I was wondering why the mode changes at time 658s then the answer is that it is +/-100 because of initial simulation time offset. When things calms down I would add input also sim_time_sec and compensate for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if that is the best solution. I am thinking about a bigger change that would involve adding "time" to a lot of messages we are sending in osgar which would say at which point of time was the data relevant (ie. for a sensor - when was the data measured etc).

@zbynekwinkler zbynekwinkler mentioned this pull request Oct 15, 2020
@zbynekwinkler
Copy link
Member Author

Lets merge this and continue with #698

Copy link
Member

@m3d m3d left a comment

Choose a reason for hiding this comment

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

OK

@@ -72,6 +72,7 @@ def main():
format='%(name)-12s %(levelname)-8s %(message)s',
#datefmt='%Y-%m-%d %H:%M',
)
logging.getLogger("matplotlib").setLevel(logging.INFO)
Copy link
Member

Choose a reason for hiding this comment

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

what happens if there is not logger for matplotlib?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is created

@zbynekwinkler zbynekwinkler merged commit c9d4c7b into master Oct 15, 2020
@zbynekwinkler zbynekwinkler deleted the feature/height-draw branch October 15, 2020 14:47
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

Successfully merging this pull request may close these issues.

2 participants