Implementation of ROS on hardware

asked 2017-10-23 14:39:26 -0500

kumar12 gravatar image

updated 2017-10-27 02:27:42 -0500

Hey guys,

I am new to entire UAV design and testing, I would really appreciate it if some of you could offer guidance.

I want to implement a 2D localization (AMCL) on PX4. From what I understand, I've to use MAVROS to communicate between ROS and PX4.

I not understand is how will the PX4 navigate based on the computation made by ROS? Will MAVROS take care of that?

Also, I've my model in Gazebo. Is there any way where I can send the data from the sensor(like LIDAR) to the PX4 without actually having to use one in hardware? Is there any tutorial for the same?

I am interested in learning, but I am unsure how or where to start. I would really appreciate any assistance offered :)

UPDATE: I managed to link MAVROS with the PX4, but I still do not understand how to send flying messages to PX4. Is there any simple template using which I can understand it?

edit retag flag offensive close merge delete



Px4 is just autopilot you send commands to. So basically your ROS program will send some flying commands through MAVROS to autopilot. MAVROS is just communication layer between ROS (your code) and px4's autopilot.

l4ncelot gravatar image l4ncelot  ( 2017-10-24 01:19:15 -0500 )edit

To send LIDAR data to your firmware it's little advanced. I think you can have a look at how MAVROS sends data to px4 and modify MAVROS to send LIDAR messages. Then you would probably have to modify px4 firmware to accept those messages and do something about them.

l4ncelot gravatar image l4ncelot  ( 2017-10-24 01:21:19 -0500 )edit

Is there any reason why you want to do it in this way?

l4ncelot gravatar image l4ncelot  ( 2017-10-24 01:21:48 -0500 )edit

Thank you so much for your quick response. I do not have the LIDAR sensor with me now, and I am hesitant to invest in it. So I was exploring other avenues to try it on my PX4.

kumar12 gravatar image kumar12  ( 2017-10-25 08:27:11 -0500 )edit

I just want to perform a 2D localization and navigation, there is no mapping involved so another reason why I do not want to invest in LIDAR (I am assuming LIADR is not necessary, Kindly feel free to correct me if I am wrong). Can I just make use of a static map to do the navigation and localization

kumar12 gravatar image kumar12  ( 2017-10-25 08:31:27 -0500 )edit

If you don't plan to use LIDAR on your px4, there's no point in sending the sensor data to firmware. Use the LIDAR only on ROS side i.e. sense the environment around your robot and generate commands for your autopilot based on your observation.

l4ncelot gravatar image l4ncelot  ( 2017-10-25 09:52:28 -0500 )edit

By sensing you are referring to the sensing process done in the Gazebo environment?

kumar12 gravatar image kumar12  ( 2017-10-25 09:56:05 -0500 )edit

You don't need to use LIDAR if you're not planning to do some mapping or obstacle avoidance. Static map should be fine. But you have to figure out how to localize yourself in the environment (map). There're a lot of methods to do this depending on used sensors.

l4ncelot gravatar image l4ncelot  ( 2017-10-25 09:56:13 -0500 )edit