-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Offboard mode queries. #347
Comments
When you launch, are you setting the autopilot ID to 1 and the component ID to 1 as well? You need this with current master. @aperture-laboratories Could you also report your success / status here once you iterated on your current state? |
Well this could answer to a lot of things. @tanmayshankar what branch of mavros are you using right now? |
|
Hi TSC21 and Lorenz, The Odroid is running a binary of mavros, which apparently is Hydro according to your comment. (default value is 50 in the launch file). I am going to check after setting it to 1, and get back to you in a few minutes. Thanks for the quick responses, I really appreciate it! |
Is it a problem that my diagnostics is shouting out APM? |
Regarding this: if you have doubts, you can always ask. For |
Well I can't really tell... but I think it depends. What firmware are you using? APM or native PX4? |
What branch have you cloned to your Odroid? Having component ID of 50 doesn't mean it's the hydro version, can be that it's an older |
I'm using native PX4, I upgraded it from the stable release using QGC a while ago (just to be sure I wasn't running into issues because of old firmware). It must have been Hydro - I installed it as apt-get install ros-hydro-mavros and mavros-extras. Thanks for clarifying the topic name. When I looked up the source, I was a little confused due to the namespace resolution and reading up on different issues, where the topic renaming was done. |
So is it working now? |
Hmm. Now when I try it, it says - FCU: Flight mode: MANUAL Earlier, it used to say it is in POSCTL mode, and even though I switched to OFFBOARD, it did not "reject offboard". The Hex was still responsive to the RC controls though, which means it wasn't in OFFBOARD. |
Right now, it is not in offboard. I tried switching to POSCTL through the RC, after publishing the setpoints. It goes into ALTCTL, and is still responsive to my RC controls. |
If position control is rejected its most likely because you have no GPS lock. No position hold without GPS. |
Well for rejecting POSCTL means that there's no valid position lock... But you can switch to OFFBOARD without having to switch through POSCTL. Is your node sending a continuos stream of setpoints? Can you try |
Well this doesn't make sense to do cause you just have to publish setpoints if you want to switch to |
And just a recommendation: I totally recommend you to upgrade your Ubuntu release to 14.04 or above (you just have to check for the custom images that exists on the odroid forum) and use ROS Indigo/Jade, cause from |
I do have a GPS lock, the node that publishes setpoints subscribes to that to generate the setpoints. @TSC21 Sorry, I meant offboard. I am going to try setpoint_demo, and another version of the setpoint publisher I wrote. I'll be back with updates in a few minutes. |
Hi, It is back to where I started from. I tried running the setpoint_demo, There is no explicit message of Reject Offboard anywhere, but the copter is still responsive. Also, I will probably switch to Indigo soon, I just need to port some other things I have developed on that. |
Strange. Do you have gitter account so we can talk? |
I can create one, in about 20-25 minutes. Is that okay? |
I have a feeling I am making a fundamental error somewhere. |
Well sure. Also (off-topic), I'm pretty interested on what you are trying to achieve (had the chance to take a look that you have forked RTAB-Map). |
Sure! I'll be back in a while, we can continue this then. Thanks a lot again for all the help so far! |
Contact me on gitter when you are able to. We have to do a step-by-step debug on this. |
@LorenzMeier Status is good. I was able to get into offboard mode once I changed component_id to 1 instead of 50. This was under tgt_component in px4.launch. You should be able to see it rejecting offboard in the console/terminal that you launched roslaunch (which should also give you a series of tones). If not, then there's something else wrong. |
Mavros master branch still buildable in Hydro, because travis still uses 12.04. So at least try to build master yourself. Compilling on rpi2 tooks about 20 minuts, XU should be faster. |
Hi Vladimir, I will try compiling master from source. I will post the launch files / nodes I am using soon, if there are any errors we can stop with those. Also, I have a switch on my RC corresponding to RC mode. When I flip it on (trying to enable offboard), it does not give me any message, however, when I switch it back off (what I think is disabling offboard), it says reject offboard. I have tried running offboard in both situations, in case I had my switches mapped the wrong way, neither works. |
Hey Tanmay, double check what we set on the etc/extras.txt, i think you might be running mavlink passthrough or a custom mavlink app? maybe that's causing issues. also, is the system id important here? i think the frame you're running is something other than 1. |
Hey Trent, Thanks for the quick response. #Telem 1 for Testing #Telem 2 #ODroid I am running the UART over the /dev/ttyUSB0 device, at a 460800 baud rate (like the CAS code). Any idea what I should be adding / changing to the extras.txt file? Thanks! |
I think it would be something like (I am really not sure, just guessing). |
What port on pixhawk you use for odroid? Your extras.txt seems not correct. |
Hi Vladimir, I think the extras.txt had been set up according to https://pixhawk.org/dev/mavlink_message_passthrough . We are using the serial port (Serial 4) on the pixhawk, wired to a USB on the Odroid, in accordance with https://pixhawk.org/dev/companion_link . The telem2 port is used up by telemetry radio for communication with the ground station, although I think this could be changed. @aerialhedgehog Does the above sound about right? Also, do you know if switching this setup makes sense in this case? |
And TELEM1 too? |
I will try changing this set up (putting the Odroid on Telem2) and update the status. in my extras.txt? |
On TELEM2 only SYS_COMPANION setup required. extras.txt not needed, if you don't need RC channels. |
Hi Vladimir, I changed the setup such that the Odroid connects to the Pixhawk using the Telem 2 port, It finally displayed "Offboard mode" with my custom C++ code. I am yet to flight test it (hopefully I can in a few hours). I will modify my txt according to your example, and then get back to you with the status. But thanks so much for all the help, I am really glad to see it accepting offboard, if not yet flying. |
Much thanks to Lorenz, Trent, Nuno, Vladimir and Bryan! |
Glad it worked! Sounds like Telem2 or the 921600 baud is hardcoded On Wed, Jul 22, 2015 at 2:05 PM, tanmayshankar notifications@github.com
|
Great :) let's see that thing fly eheh |
Hi guys. I reverted back to the serial port, with a baud rate of 460800, and I tried flight testing the entire system yesterday. It rejected the offboard mode, unfortunately. If all of this fails, I will revert to telem and flight test. |
I changed the baud rate on the serial port, and flight tested the thing. When I tried to dynamically change the setpoint value based on a subscription from another node, it rejected offboard. The other node was running on another Hexcopter at a slower baud rate. I am pretty sure this has something to do with the speed of the topic being published. I plan to change that tomorrow and flight test it again. |
I think it's now confirmed that it is best to use a 921600 baud rate on the serial port. I had 2 vehicles up in the air, both with Odroids running ROS, connected via UART /Serial port at a 921600 baud rate. I dynamically changed the setpoint value for Vehicle A based on the local position of vehicle B, and it worked pretty well. They were both running along with a ground station with ROS, connected through a wifi hotspot. |
@tanmayshankar |
Hi @killerlayup , Yes, I had solved it thanks to the help I got above. |
hi @tanmayshankar |
Sure, I just messaged you. |
Hello everyone,
I am running the Pixhawk with an Odroid XU3 on my Hexcopter, I've got Ubuntu 12.04 / ROS Hydro set up on it. mavros, mavros-extras installed as binaries. I've been trying to get Offboard mode and setpoint position control to work for a while now, with no success.
I create a custom C++ node that publishes geometry_msgs::PoseStamped messages onto several topics. I was unsure of what the topic name was for ROS Hydro, so I published it over "/mavros/setpoint_position/local", "/mavros/setpoint_position/local_position", "/mavros/setpoint/local_position". The rate of publishing is around 3 Hz.
Here are the steps I followed -
b) Flip the switches on the RC corresponding to offboard, and position control mode.
This still doesn't work, the Hexcopter hovers in the same place when I tried this. I also tried running
rosrun mavros mavsys mode -c OFFBOARD, instead of the RC, but it times out.
I also tried running the setpoint_demo.py executable, with the same result.
Any ideas on what could be going wrong? (Details below).
My diagnostics mentions APM somewhere, and I2C errors, but I'm not sure what that means.
My mavros says - Flight mode: POSCTL
Reset pos sp : (3,-6), (or something similar).
On echoing /mavros/state, it says ARMED :True, GUIDED: True.
/diagnostics is as follows:
The text was updated successfully, but these errors were encountered: