Robotics is a lot of fun! You can pivot from pure software to a software/hardware job. Lots of process automation, or hardware test engineer jobs at robotics and manufacturing companies require basic familiarity with hardware stuff and a focus on software. This can be a good way to pivot away from pure software. A good way to get started is to get a basic arduino kit, blink some LEDs and move some servos, then get a raspberry pi and make a little robot (without the arduino, for variety). Get a 3D printer and do a little CAD.
All these skills will become useful once it is time to build a motor test stand for a robotics startup's assembly production line. After every assembly step they need to run a hardware test cycle that checks all the sensors. Pure software engineers don't always know how to handle hardware, but with a little practice you can build up those skills.
Once you've taken on one role like this professionally, you can pivot even further to hardware as desired. Good luck!
This probably depends a lot on where you are in your software career path, but in Silicon Valley robotics skills are in high demand. Most software engineers have trouble crossing the gap in to any kind of hardware interaction, so you ought to be able to charge a premium for this skill set.
I personally am more concerned with doing work I care about, so I've never been too focused on getting paid the maximum, so I don't have the most expertise here. But I worked at Google X Robotics as a hardware test engineer. I was a contractor so I don't really know what the pay packages were like, but I would say that even the people who were primarily software engineers on that team pretty much all had hardware skills too. When you're working in robotics, you tend to at least play with all the stuff I mentioned above, and I would expect this experience to factor in to hiring decisions. And the people working at Google writing software for robotics seemed like they were all highly paid engineers, though I never asked anyone specifics.
But if someone feels like software is a dead end job for them, moving in to robotics is a great way to make things more interesting. At one of my jobs I wrote C++ to help a researcher implement some of his ideas around locating specific individuals in a room, and I basically got to play hide and go seek with a Toyota HSR robot all day long. Working with robots is way more fun and interesting than writing web forms all day.
All these skills will become useful once it is time to build a motor test stand for a robotics startup's assembly production line. After every assembly step they need to run a hardware test cycle that checks all the sensors. Pure software engineers don't always know how to handle hardware, but with a little practice you can build up those skills.
Once you've taken on one role like this professionally, you can pivot even further to hardware as desired. Good luck!