Servers by jDrones

Rover in GUIDE mode

I have some questions about GUIDE mode:
What controller are enabled in GUIDE mode?
I want to try GUIDE with ROS. I have a pixhawk connected to a rasp pi 3, running ubuntu and ros kinetic. Which topic do I need to publish to in order to command my boat? I have a skid steer boat.
I’m looking this video: https://www.youtube.com/watch?v=se5ANNFHUzc
Is that RQT window a ros node or is it a program?

Thank!

@elgrabe I have been also trying to do something similar. The rqt is a ros program to be able to both visualise information on topics and send commands to topics.

Ok, I see.
I read about sending new WP and read about publishing on cmd_vel topic. But I want to know wich ArduRover controller will be enabled with each method…

Thank

Hello,
in guided mode you will have acces to velocity, position (both global and local) and attitude controler.
To use them I recommand to use Mavros. You can see here http://ardupilot.org/dev/docs/ros-sitl.html how to connect mavros and SITL. For a real vehicle, just change the fcu_url for your vehicle.
To send goal to the control you need to use the setpoints commands.
If you just want to send speed, you can use the cmd_vel topic of mavros (beware it is twistStamped) or cmd_vel_unstamped (that work with rqt and ros navstack) See old example here https://m.youtube.com/watch?v=JvAzjPYTl6Y

For the position setpoints look at http://wiki.ros.org/mavros for topics name and messages !

In manual and steering mode you can use rc_override or manual_control message to simulated rc radio inputs. Beware that you need to set SYSID_MYGCS 1 on your rover (rosrun mavros mavparam set SYSID_MYGCS 1 to do it for example).

That should do it! Let me know if it doesn’t work or you have difficulties

Thank for quick reply!
The problem with APMRover controllers is that, for skid steer boats, there are some problems tunning skid turns. I have a boat and need autonomous navigation, with WPs. What ROS package could I use for that purpose? I don’t have vision neither other sensors, just a pixhawk with GPS. I know that the way to go is tunning APMRover and send WPs by mavros. But, in case that I want to use just cmd_vel, what are my options for navigation?
Navigation stack need laser, in section 2 HARDWARE point 2:
It requires a planar laser mounted somewhere on the mobile base. This laser is used for map building and localization.
I need some light here…

Thank again!

Hi there. To be clear, the skid steering for boats should work, it’s just that the pivot turns are a big rough.

I have a pivot steer boat and it seems to be working although i haven’t done a mission quite yet (hopefully in the next week).

Oh, sorry, I thought that it’s not working.
Wich version do I have to flash? last master o some beta?

Leonardo,

3.2.1 should work. Rover-3.2.2-rc1 is also available as a beta release but is only slightly different than 3.2.1.
I wonder what it was that made it seem like skid-steering boats wouldn’t work… Below is an image of a skid-steering boat from a user involved in the 3.2.1 beta testing.

If you just need navigation with WP, you don’t need ROS. ArduPilot is already abke to follow WPs mission. Why do you want to use ROS ?

If you want to stick with cmd_vel then you need to find a ros package that take wp as input and output twist message. But that already what ArduPilot does internally…

Well, there is a couple of post concerning to pivot turn tunning problem.
Here Pixhawk 2 tuning help appreciated you say that pivot turn will be solved in rover 3.3.
Anyway, I will try it again with latest firmware and report back on another post.

Thank!

I’m working on a cooperative control between a UAV and an ASV. This kind of control will be running on ROS.
Right now I’m making my first steps working with ASV. WP navigation with APM will be a nice feature to add and show an intermediate work. But I will need to command the ASV by ROS soon.
Right now I have a RP3, connected to Pixhawk, running ROS and could make a map (using hector mapping) of some part of stern coast. But driven in manual mode.
So both help will be apretiated!

I will try to start testing guided and cmd_vel with just publishing to cmd_vel topic. I will report later.

Thank!

If you get map, just use a global planner to feed ardurover with wp in local coordinate, or a local planner with cmd_vel. You don’t need laser to use ros nav stack, it is use if you want to avoid obstacles.

if I run
rostopic pub /mavros/cmd_vel_unstamped geometry_msgs/Twist -r 10 – ‘[0.5,0.0,0.0]’ ‘[0.0, 0.0, 0.0]’ with my boat in GUIDE mode, it will move forward at 0.5 m/sec, right?
So, I will need to tune Speed control (http://ardupilot.org/rover/docs/rover-tuning-throttle-and-speed.html) right?
The same for
rostopic pub /mavros/cmd_vel_unstamped geometry_msgs/Twist -r 10 – ‘[0.0,0.0,0.0]’ ‘[0.0, 0.0, 0.785]’ it will make my boat turn at 45°/sec and it will need that I previosly tune APM for steering (http://ardupilot.org/rover/docs/rover-tuning-steering-rate.html) right?
So, those 2 controller are enabled in GUIDE mode. Am I right?

Thank!

BTW the correct sintax for the topic published is:

rostopic pub -r 10 /mavros/setpoint_velocity/cmd_vel_unstamped geometry_msgs/Twist ‘{linear: {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}’

This works on my boat.

1 Like

I’ll have to leave the ROS question for @khancyr to answer but for the speed tuning question I think the answer is “yes”, you’ll need to tune it using the web link you’ve provided. Tuning the speed controller is relatively easy, the most important part is getting a good cruise-speed and cruise-throttle value and that can be done easily using a ch7 option as mentioned on the wiki.

Hey Leonardo ,

I’ll get back to you on this soon. I’ll speak to one of our software engineers who is currently working on this. I’m currently travelling

Auto mode is working ok now in my boat (Success tunning for Auto mode)
So I have now a long way working with my boat with ROS.

Auto mode gives me the chance to make several experiments, but the final goal of my reserch needs the ASV to be controlled with ROS. So I will be using this post to share experiences on Boats and ROS.

1 Like

Do I need to start mavros before power up pixhawk?
I found that launching MAVRos after pixhawk boots, then mavros don’t start. is it ok or it just happened to me?

Thank

It shouldn’t matter…
what error did you get ?

it does not show any error, but it seems to hang waiting for FC.
The last INFO I get is MAVROS started. MY ID 1.240, TARGET ID 1.1

I wait for a minute or so, if I reboot pixhawk, in that moment, then mavros continue starting.

Servers by jDrones