Skip to content

Map Motor to motor in urdf file #90

Description

@SchneiderHanna

Hey,
I have a question.

I have two motors in my urdf file:

And two motors in my fixedwing.py

        motor_params = all_params["motor_params"]
        tau = np.array([1.0] * 2) * motor_params["tau"]
        max_rpm = np.array([1.0] *2) * np.sqrt(
            (motor_params["total_thrust"]) /(2* motor_params["thrust_coef"])
        )
        thrust_coef = np.array([motor_params["thrust_coef"]]*2)
        torque_coef = np.array([motor_params["torque_coef"]]*2)
        thrust_unit = np.array([[1.0, 0.0, 0.0], [1.0, 0.0, 0.0]])
        noise_ratio =  np.array([1.0] * 2) * motor_params["noise_ratio"]
        self.motors = Motors(
            p=self.p,
            physics_period=self.physics_period,
            np_random=self.np_random,
            uav_id=self.Id,
            motor_ids=[0, 1],
            tau=tau,
            max_rpm=max_rpm,
            thrust_coef=thrust_coef,
            torque_coef=torque_coef,
            thrust_unit=thrust_unit,
            noise_ratio=noise_ratio,
        )

But how do I map the two motors from the urdf file to the motor IDs in fixedwing.py

Thanks for your help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions