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

Modeling New Quads #67

Open
zcase opened this issue Dec 13, 2024 · 5 comments
Open

Modeling New Quads #67

zcase opened this issue Dec 13, 2024 · 5 comments

Comments

@zcase
Copy link

zcase commented Dec 13, 2024

If I wanted to model another quadcopter that is not a crazyflie. What are the places in the base Quadx code that would need to be updated or a potential gotcha when modeling a new quad? OR can I just do a new urdf and config and we should be good?

@jjshoots
Copy link
Owner

Hi, thanks for the issue and apologies for the late reply.

You should be able to just use a new urdf and config.

Here's an example:

Your expected file structure:

/your_drone_folder
  /your_drone_name
    your_drone_name.urdf
    your_drone_name.yaml

The code to spawn the drone into the Aviary:

env = Aviary(
    start_pos=start_pos,
    start_orn=start_orn,
    drone_type="quadx",
    drone_options={"model_dir": "/path/to/your_drone_folder", "drone_model": "your_drone_name"},
)

That said, the urdf and yaml files are expected to be in the same form as that of the crazyflie. You can see what they look like here.

@zcase
Copy link
Author

zcase commented Dec 16, 2024

@jjshoots Thank you for your response. Does anything have to happen with the motor mapping? I know the crazyfile have an unconventional yaw pitch and roll (i think the its the roll that has the left hand rule instead of the right hand rule but everything else is the same) Does that have to be taken account of or by just doing the folder structure and urdf files map that into account?

@jjshoots
Copy link
Owner

jjshoots commented Dec 17, 2024

As long as the motor locations in the urdf are similar to the pre-implemented one, it should be fine. We actually use the same convention as the PX4 one. Ie; the order of components in the urdf must be similar.

@zcase
Copy link
Author

zcase commented Dec 17, 2024

@jjshoots just to clarify your saying that as long as they are in the the same order like the comment says here:

        DRONE CONTROL
            motor ids correspond to quadrotor X in PX4,
            -------------------------
            |  (cw)2  0(ccw)        |
            |      \\//           x |
            |      //\\         y_| |
            | (ccw)1  3(cw)         |
            -------------------------
            using the ENU convention
            control commands are in the form of roll-pitch-yaw-thrust
        """

@jjshoots
Copy link
Owner

That is correct. :)

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