I’ve been using the R1 rover mixer for controlling a boat with differential drive. In RC mode, it works well. However, the final goal is to be able to control the robot in offboard mode. Before actually using offboard mode on the boat though, I’ve been trying to run the simulation and faced issues.
I have been able to run the simulation and send offboard mode commands to go to a X,Y position. It works well for other frames but R1 rover. The R1 rover just seems to spin around before it enters failsafe mode and stops moving.
I wonder if this has to do with the PID tuning of the R1 rover? I am using the default configurations that are in the mixer, so I would presume that the parameters are correct. Has anyone else faced a similar issue? A fix would save a ton of time on my end here.
The issue, as well as it’s duplicate don’t seem to be solved but I wonder why my GPS is failing in the simulation in the first place? I have QGroundControl connected as well to monitor the simulation. After some spinning, QGroundControl enables failsafe saying “no global position” and then the robot starts sliding.
The simulations for the generic rover with ackerman steering works fine too.
@Jaeyoung-Lim I can confirm that there is definitely something wrong with the R1 rover simulation. Just built a small DIY rover today and things seem fine in Mission and offboard mode.
Thank you for that continuous support you people! I’m sure I’ll find a way to contribute back as I explore the codebase!
@utkarsh867 Hi, sorry to bring this thread up again - we’ve been trying to get OFFBOARD control for PX4 rovers working and I can’t seem to find any recent instructions/posts/issues apart from this one!
Which commands are you sending to the rover to get it to move anywhere in offboard mode - are you sending positions, or doing lower level control? Also does your vehicle have GPS (ours doesnt we’re indoors…)?
We are also trying to send X,Y commands, but the vehicle (ackermann Rover for us) just moves backwards regardless of position! From looking we are using SET_POSITION_TARGET_LOCAL_NED, but it doesn’t appear to be doing anything as POSITION_TARGET_LOCAL_NED is always empty.
Thanks - Any help is appreciated, we have been stuck on this for weeks now!
Sorry again, just clearing my own question for anybody in the future - the answer is yes you can OFFBOARD control but only with velocity setpoints on SET_POSITION_TARGET_LOCAL_NED ! See this answer for more details: PX4 Rover *Indoor* Offboard control - #2 by mhl787156
It’s been a while I am not sure what behaviour you are seeing but I ended up not using the R1 rovers on simulation ever since. I have stuck with other models to run tests for my code in general, using the latest v1.14 and v1.15 firmware.
As of now, the only way to do offboard control for rovers is to use the old rover module. If you are using the latest upstream version of PX4 only the gazebo classic rover models still use this module in SITL by default.
The new rover modules that have been added to upstream do not yet support offboard mode but it is on the list of requested features to be implemented.