ROS serial is designed to communicate between a ROS node and a simple peripheral device which isn't running ROS such as a micro-controller.
If you're trying to communicate between two ROS nodes running on two different raspberry Pis all you need to do is make sure that they are both on a shared network (Wi-Fi or ethernet) and then the distributed nature of ROS will handle everything for you automatically.
Is there any particular reason why you thought about using a serial connection for this?
Update
Okay I understand your task now. To be honest, you could do this with a much lower power device such as an arduino or teensy on the drone. A raspberry pi is overkill unless it's doing other work as well. I'll emphasise again ROSSerial doesn't connect ROS nodes together it connects peripheral devices to ROS.
Using an arduino you could follow the tutorials, the blink tutorial controls an LED which is one of your tasks. You should be able to extend this to control a servo as well.
Originally posted by PeteBlackerThe3rd with karma: 9529 on 2019-07-18
This answer was NOT ACCEPTED on the original site
Post score: 2
Original comments
Comment by stevemacenski on 2019-07-18:
In case the author isn't tied to serial and that's just an assumption of the right way -- you can put them both on the same network (ethernet) and then use the typical ROS setup for multiple computers.
Comment by TechBoii on 2019-07-19:
Thanks, guys for the feedback.
In the current situation, I am not able to use ethernet as one pi is a drone and I would need more distance than wifi.
I basically want to establish a connection with each other over wireless serial. like a base station and a drone.
So any other option than rosserial?
Comment by TechBoii on 2019-07-19:
Well, I wanted an option to connect ROS nodes together over serial.
If that is not possible, I think this is the next best thing!
Probably keep an Arduino in between the two ROS systems!
Comment by gvdhoorn on 2019-07-19:
I'm not sure it'd be a good thing to use here, but it's actually possible to run regular TCP/IP over a serial line. Lookup "SLIP".
Comment by TechBoii on 2019-07-20:
@gvdhoorn Thanks for the lead, Would need to find out how to implement that then.
Cheers