Maritime-Robotics-Student-Society / sailing-robot

Southampton sailing robot
http://www.sotonsailrobot.org
Other
88 stars 46 forks source link

See when manual remote control is active #141

Closed takluyver closed 7 years ago

takluyver commented 8 years ago

Can we tell from the Raspi which state the multiplexer is in? It would be really useful to display this in the dashboard and record it in ROS bags.

tsaoyu commented 8 years ago

We have an extra wire reserved between RPi and Multiplexer for this purpose. An easy way is to pass selection signal on channel 5 to RPi. On software side, use pigpio read to monitor http://abyz.co.uk/rpi/pigpio/python.html#read .

takluyver commented 8 years ago

Sounds like this should be a matter of one simple ROS node to turn the GPIO state into ROS messages, then :-)

takluyver commented 8 years ago

I've implemented a node, it remains to be tested when we have the multiplexer handy (it's still in the boat for now).

Nanoseb commented 8 years ago

The code also have to handle when the remote is off. The multiplexer have a failure state for that to switch to autonomous when no signal is received. This doesn't need to be a 3rd state but need to be seen as autonomous mode.

takluyver commented 8 years ago

I'm hoping that the multiplexer will show us the same thing for that case as when the RC is on but with autonomous control enabled. But this will all have to be tested when we've got the multiplexer.

Nanoseb commented 8 years ago

The idea was to connect the raspberry pi to the receiver pin, so I am not really sure about that, but yes anyway this will have to be tested with the multiplexer.

takluyver commented 7 years ago

This is working nicely.