You can not make a single subscriber for the four different topics, but you could store values from each sensor in global variables.
Define variables for all sensors
double sensor_fl;
double sensor_fr;
double sensor_rl;
double sensor_rr;
In callback for each sensor update value of appropriate variable:
void sensor_fl_callback(const sensor_msgs::Range::ConstPtr msg){
sensor_fl = msg->range;
}
In main loop process the ranges and publish cmd_vel:
ros::Rate loop_rate(10);
while (ros::ok())
{
// Process ranges here
// place your output into cmd_vel_msg
cmd_vel_pub.publish(cmd_vel_msg);
ros::spinOnce();
loop_rate.sleep();
}