May – June 2019 Sailing

I’ve been out sailing loads the last months, racing and practising as well as instructing kids the last twelve weeks as part of my club‘s junior training.

Team racing

My race results continue to improve and I managed a reputable 3rd in the Spring evening series. There’s still work to do on consistency in stronger winds but I am getting more able in higher winds though at my weight it’s a challenge.

Current practice focus is two fold, firstly spinnaker work and among other things holding tighter angles and keeping speed up on lower angles. Gybes are pretty smooth, the faster the better.

Secondly better control and keeping boat speed on in gusty conditions. It’s all very well practising with even winds, but races never seem to have this perfect conditions (funny that!).

My fitness isn’t bad and I’m able to hike hard for decent periods now and looking forward to the longer out of the bay races. Sheet loads are relatively high on the Vareo which is also good for upper body strength, all good stuff.

Experiment with ROS, Python and Raspberry Pi

I’ve always been a robotics geek and have started exploring ROS. This might help as a ‘how to get started’ post if you’ve wondered how to use ROS with the Raspberry Pi and want to stick to Python.

Why ROS?

Using ROS is likely absolute overkill for most home projects but I am working up to quite a complex project involving different sensors, GPS and at least two motors, so ROS is actually a good fit for where I’m headed.

It will also allow me to keep everything very decoupled and simple. ROS has a heap of features that will come in handy in the future e.g. logging, data play back, data management, test framework, state and config management and more.

I intuitively like the architecture because I know it will keep things simple and it has decent Python libraries which will make for speedy development. I don’t want to be writing a framework, rather I want to focus on motor, sensor and logic code.

Caveat

ROS only supports up to Python 2.7 which’ll be a problem if your Raspberry Pi HATs or pHATs have supporting Python 3 libs only.

Assumptions

I’m going to assume you know some programming, are comfortable on the linux shell, know the basics about Raspberry PI GPIO pins so won’t do much extra explanation.

Here we go…

Raspberry PI setup.

Put simple push switches on pins 18 and 24 on a breadboard.

image

Raspberry PI ROS installation

Follow the instructions over here.

If something fails, it’ll most likely to be an environment variable issue, e.g. for me this solved packages not being found.

export ROS_PACKAGE_PATH=/home/pi/catkin_ws/src:$ROS_PACKAGE_PATH

Also, I only installed the shell version, not the full desktop version.

The Python code

See my code in GitHub. Everything other than the scripts directory was autogenerated by a ROS.

I created a new ROS package first as explained here, my two python scripts live in the scripts directory. The code is based on this tutorial code.

To Run

You can configure a launch file #, but the simplest way to test this is to run the following in three separate shells:

All from within catkin workspace directory:

/home/pi/catkin_ws/

Run the ROS OS.

roscore

Run the talker

rosrun test talker.py

Run the listener

rosrun test listener.py

Test it

Press one one of the buttons and the output might look like:

pi@raspberrypi:~/catkin_ws/src/test/scripts $ rosrun test listener.py 
[INFO] [1556918461.361843]: heading 360
[INFO] [1556918461.964700]: heading 15
[INFO] [1556918462.867729]: heading 30
[INFO] [1556918463.667803]: heading 15
[INFO] [1556918464.167762]: heading 0
[INFO] [1556918464.372864]: heading 345
[INFO] [1556918464.778167]: heading 330

‘heading’ is just a variable name that corresponds to a compass heading where the buttons turn left or right deducting or subtracting 15 degrees from the previous value.

What’s next?

In this example, we see ROS decoupling sensor reading code from the action code. It would be possible to add more hardware to the PI and wire it together with more publisher/subscriber code and custom logic. See more on publishers and subscribers.

e.g. instead of just outputting data in the listener like this:

[INFO] [1556918464.372864]: heading 345
[INFO] [1556918464.778167]: heading 330

logic could be triggered to drive a motor, move a servo or trigger a solenoid. With a more complicated robot, ROS is ideal to keep the application simple and all parts decoupled, and allow incremental development.

Resources

RS Vareo Storm Sail, Meh!

It was the first race of the season yesterday with the same wind forecast by both the Met Office and Windfinder. It looked quite fruity from the shore, so I opted for the storm sail.

That turned out to be a mistake, firstly the wind wasn’t nearly as strong as forecast (race 11:00 – 12:00), in fact there was way more sea than wind.

Secondly I was reminded of what a dog the boat is upwind with a small sail, especially into waves and they were decent yesterday. The boat is heavy, it really needs that bigger sail.

Thirdly I’m used to the power of the standard sail so the whole sense of boat balance is thrown out with anything less. Downwind with the kite was fine but reaching was slow too.

I don’t think I’ll bother with the storm sail just for myself in the future (with child maybe) and will prefer to abandon a race if it’s too hairy rather than be too slow with a smaller sail.

Where’s the fun if you aren’t hanging off the back quarter on your toes (?) 🙂

Edit: 12th April, I went out similar conditions (14-18 kts) with the full sail the other day. So much better.

March, seems there’s a routine

This is a common sight when I’m prepping to go out, local fishermen out and about, sea birds lining up to pick up their throwaways. There’s only one bird in this picture, but a queue of birds is not uncommon. Herring gulls and lesser black backed gulls mainly.

It’s not surprising really as they’re out around high tide too, close to slack water the same as me. Not that I’m very tide dependent but pulling a boat out at a higher tide is less effort.

The sailing season starts soon, I can’t wait. The frostbiting season has been a success I’d say, and I’ve been out mostly once a week at least throughout the winter regardless of the cold. 🙂

DInghy Vareo 239 sailing in Swanage Bay
Photo Gill Richards

February 2019

I did quite a bit of work travel in the first weeks of February including a stopover on Holbox in Mexico. The Hobie Cat in the beach garden was tantalising, sadly unseaworthy amidst that beautiful environment with nice even onshore winds.

And this past week back in the UK I did a RYA Dinghy Instructor course (yep, passed 🙂 ). We were super lucky with the weather which was mild and apart from one day had enough of wind.

Photo credits Gill Richards

The DI course week was pretty intense with very packed days and homework in the evening. It feels a meaningful qualification to me, you can’t fake time on the water and sailing experience.

Apart from learning to teach sailing itself, the RYA instruction methods are excellent with much attention being paid to different learning styles, session planning, communications, feedback and everything else that goes into teaching effectively.

Not to mention learning new sailing and power boat skills, a lot on safety, protection of children and vulnerable adults, organising your training fleet and conducting sessions on land or water. All good stuff and also a nice consolidation of my own sailing skills where more advanced manoeuvres need to be at demo level and work every time.

As always, especially with sailing there is so much still to learn (it’s endless) and this stage still feels like the beginning. I’m grateful to Swanage Sailing Club for sponsoring the course and our great instructor during the week and coach/assessor on the final day.

If you’re in the UK and want to learn to sail check out the RYA website. It’s a great scheme to learn with, consistent in method across the country and you might be surprised to find a training centre not too far from where you are be it sea, river or lake.