int main(int argc, char **argv)
{


	ros::init(argc, argv, "hermes_robot_interface");
	ros::NodeHandle n;

	ros::Publisher joint_state_pub = n.advertise<sensor_msgs::JointState>("joint_states", 1);


	HermesRobotInterface hermes(n);
	hermes.init();

	sensor_msgs::JointState joint_msg;
	joint_msg.name.resize(36);
	joint_msg.position.resize(36);
	joint_msg.velocity.resize(36);
	joint_msg.effort.resize(36);


	ros::Rate loop_rate(10);




	while (ros::ok)
	{
		hermes.getJointState(joint_msg);
		joint_msg.header.stamp = ros::Time::now();
		joint_state_pub.publish(joint_msg);
		ros::spinOnce();
		loop_rate.sleep();
	}
	return 0;
}
void MainController::load(QString filename)
{
    LoadController zeus(filename);
    int athena = zeus.exec();
    switch(athena)
    {
    case -1:
        QMessageBox::warning(0, tr("Error"), tr("FILE: Unable to open ") + filename);
        break;
    case -2:
        QMessageBox::warning(0, tr("Error"), tr("XML: Document not well formed") + filename);
        break;
    case -3:
    {
        QMessageBox::information(0, tr("Connection error"), tr("Guest user connect"));
        UserSPointer hermes(new User);
        hermes->setUsername("Guest");
        hermes->setType(User::Viewer);
    }
    default:
        m_mw->setCategoryList(categories().keys());
        if(categories().keys().size() > 0)
            setCurrentTable(categories().keys().first());


        m_mw->setUserOk(UserController::currentUser()->type());
        m_currentFile = filename;
        userChange();
        break;
    }

}