I would suggest you separate the motor control, encoders, and accelerometer (and various other sensors) out into a separate microcontroller. As mentioned above, the Linux kernel will not handle realtime very well by default. I suggest using an arduino and the avr_bridge package to get information to and from ros. There should be examples of using an arduino as a motor control interface with ros odometry, and similarly plenty of arduino based balancing robots. Between the two examples, you could manage a balancing robot with ros odometry.
The segway route is the "easy way out" if you want to utilize the higher level ros software such as mapping, navigation, etc without messing with the PID and feedback loops of doing a balancing robot implementation yourself... the problem is that the segway bases are quite expensive.
You should be able to mesh multiple arduino examples together to make a balancing robot, then add ros control via the pandaboard.
However you approach it, I would suggest for the ROS portion that you isolate the balancing section of the robot into its own function and make the robot work with ROS with standard motor control (using outriggers to keep it balanced). Treat them as separate projects until you get far enough along in both to meld them together.