Skip to content

Rover doesn't stop in offboard mode #19169

@JohnnyLiu2886

Description

@JohnnyLiu2886

According to RoverPositionControl, rover should stop when the distance to waypoint is smaller than the loiter radius. It sets INDEX_YAW and INDEX_THROTTLE to 0.0f and publish it through uorb messages actuator_controls, vehicle_torque_setpoint and vehicle_thrust_setpoint.
image

However, when the distance to waypoint is smaller than 2 (the default NAV_LOITER_RAD), all the PWM becomes 1100.
In my setting, the minimum PWM is 1100. It means that the PWM outputs are set to the minimum when throttle is 0.
image

However, I think it shouldn't be happened. The PWM for the rover to stop should not be the minimum PWM. It should be the middle one as minimum PWM means reverse motion for the motors. It means negative throttle.

As you can see here, when I disarm the rover, the PWM outputs are 1500. 1500 is the real PWM for stopping the rover.
image

Apart from that, I am using aion Robotics R1 UGV as the airframe of the rover.
I also find the following:
''''''''''''''''''''''''''

TODO: Set to -1.0, to allow reversing. This will require many changes in the codebase

to support negative throttle.

param set-default GND_THR_MIN 0
''''''''''''''''''''''''''

Does it mean when throttle is 0, the pwm will be minimum in default?

Does anyone know how to set the PWM outputs to 1500 when trajectory_setpoint reaches its destination in offboard mode?
My PWM range is from 1100 to 1900.

There is no problem for the RC manual control mode. The problem only happens for offboard control

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions