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

Ground Truth for Sim Backend #296

Open
mwlock opened this issue Oct 5, 2023 · 3 comments
Open

Ground Truth for Sim Backend #296

mwlock opened this issue Oct 5, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mwlock
Copy link

mwlock commented Oct 5, 2023

Hey all, for the simulation backend, I am wondering if there is a mechanism for getting the state of the UAV? For example, after stepping one could publish an Odometry message. Perhaps at a lower rate.

uav.step(action, self.dt)

If this does not exist and might be useful, I would be happy to create something simple and make a PR 😄

@whoenig
Copy link

whoenig commented Oct 5, 2023

Where do you want to get/query the state? Each visualization has access to it, see https://github.com/IMRCLab/crazyswarm2/tree/main/crazyflie_sim/crazyflie_sim/visualization. For example, one can write the state(s) to a CSV file for later plotting. A new visualization could be written for publishing a ROS message, but then it would make most sense to use the /pose message that is also used in the real drone (if logging is enabled).

@mwlock
Copy link
Author

mwlock commented Oct 9, 2023

I am looking to subscribe to a ROS topic to mimic the MOCAP system/state estimation as per your second suggestion. I have yet to perform experimentation on the real platform and am looking to test in sim first, hence why I am looking for the ground truth

@whoenig
Copy link

whoenig commented Oct 9, 2023

In that case this would be simulating the motion_capture_ros package, which publishes on /pose as well as via tf. Another option would be /<robotname>/pose, which would simulate the behavior when using the on-board estimated state from the EKF rather than the global mocap state.

@whoenig whoenig added enhancement New feature or request good first issue Good for newcomers labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants