Pixhawk - Raspberry PI - Navigation

asked 2018-03-28 17:57:23 -0500

elgarbe gravatar image

I have a raspberry pi running ROS kinetic, conected to a Pixhawk. On the Pi I run Mavros. On pixhawk runs Ardurover. With this setup I can move to GUIDED mode and send cmd_vel message via mavros to pixhawk and make my rover to move. Is there a package that get a waypoint as an input, get current position (from pixhawk) and solve the navigation algorithm and send cmd_vel back to pixhawk?

Thank

edit retag flag offensive close merge delete

Comments

Just to be clear, you want to know if there's a package that takes in a way point and gives you a path to that point from your current position?

jayess gravatar image jayess  ( 2018-03-28 19:14:42 -0500 )edit

not just a path. I'm looking for a package that takes in a waypoint and current position and send cmd_vel back to pixhawk to make my rover to move to the waypoint.

elgarbe gravatar image elgarbe  ( 2018-03-28 20:15:02 -0500 )edit

Does the navigation stack not work for you?

jayess gravatar image jayess  ( 2018-03-28 20:17:00 -0500 )edit

I'm not sure. I'm reading about it, but not sure that it is what I'm lloking for. What happend if I don't have a map? NS needs imu and odometry data. Ardurover provide IMU data and there is a topic called odometry (in mavros) is this topic the same tha NS needs? (I ask on ardurober forum too)

elgarbe gravatar image elgarbe  ( 2018-03-28 20:33:08 -0500 )edit

Yes, the ~local_position/odometry topic is correct for feeding odometry back to the navigation stack and rviz. We're not using the navigation stack for our current project, instead using the PixHawk to navigate to waypoints, but are using the odometry to visualize the robot position in rviz.

Mark Rose gravatar image Mark Rose  ( 2018-04-03 17:06:52 -0500 )edit

The problem is that my rover is a boat and there is no wheel encoders... so odom is not available.

Thank

elgarbe gravatar image elgarbe  ( 2018-04-03 19:59:37 -0500 )edit

Then the easiest way to navigate to the waypoint is to get the heading difference between the boat and the waypoint, and use that in a PID controller to adjust the steering. Use a 2nd PID controller to control the speed based on distance to the waypoint.

Mark Rose gravatar image Mark Rose  ( 2018-04-03 22:27:20 -0500 )edit