ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thank you Alireza, i did what you said. I create a new package

roscreate-qt-pkg yourpackagename

But now when i try to rus CMakeLists.txt i got this error:

CMake Error at CMakeLists.txt:12 (catkin_project):
  Unknown CMake command "catkin_project".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

I edit the CMakeLists.txt by adding cmake_minimum_required(VERSION 2.8) now i only got trouble with catkin_project as shown. What is catkin? i cant remember even install catkin

Thank you Alireza, i did what you said. I create a new package

roscreate-qt-pkg yourpackagename
roscreate-qt-legacy-pkg packagename

But now when i try to rus CMakeLists.txt i got this error:

CMake Error at CMakeLists.txt:11 (include):
  include could not find load file:

    /core/rosbuild/rosbuild.cmake


CMake Error at CMakeLists.txt:12 (catkin_project):
(rosbuild_init):
  Unknown CMake command "catkin_project".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)
"rosbuild_init".

I edit the CMakeLists.txt by adding cmake_minimum_required(VERSION 2.8) now i only got trouble with catkin_project as shown. What is catkin? i cant remember even install catkinPlease someone :)

Thank you Alireza, i did what you said. I create a new package

roscreate-qt-legacy-pkg packagename

But now when i try to rus run CMakeLists.txt i also got this damn error:

CMake Error at CMakeLists.txt:11 (include):
  include could not find load file:

    /core/rosbuild/rosbuild.cmake


CMake Error at CMakeLists.txt:12 (rosbuild_init):
  Unknown CMake command "rosbuild_init".

Please someone :)

Thank you Alireza, i did what you said. when i try to create a package with

roscreate-qt-legacy-pkg packagename

i got problems with catkin because not installed. Then I create a new package

roscreate-qt-legacy-pkg packagename

But now when i try to run CMakeLists.txt i also got this damn error:

CMake Error at CMakeLists.txt:11 (include):
  include could not find load file:

    /core/rosbuild/rosbuild.cmake


CMake Error at CMakeLists.txt:12 (rosbuild_init):
  Unknown CMake command "rosbuild_init".

Please someone :)

Thank you Alireza, Hello,

i did what you said. when i try to create a package with

roscreate-qt-legacy-pkg packagename

i got problems with catkin because not installed. Then I create a new package

roscreate-qt-legacy-pkg packagename

But now when get hopefully my last error. When i try to run CMakeLists.txt i also got this damn error:my application.

CMake Error at CMakeLists.txt:11 (include):
  include could not find load file:

    /core/rosbuild/rosbuild.cmake


CMake Error at CMakeLists.txt:12 (rosbuild_init):
  Unknown CMake command "rosbuild_init".
[FATAL] [1355735900.735429071]: You must call ros::init() before creating the first NodeHandle
[FATAL] [1355735900.735536083]: BREAKPOINT HIT
    file = /tmp/buildd/ros-fuerte-ros-comm-1.8.15-0precise-20120908-1740/clients/cpp/roscpp/src/libros/node_handle.cpp
    line=151

Please someone :)

this ist my main.cpp

#include <QtGui/QApplication>
#include "../include/robot/robot.hpp"
#include "ros/ros.h"

int main(int argc, char *argv[])
{
    ros::init(argc, argv, "RobotControl");
    QApplication a(argc, argv);
    Robot w;
    w.show();

    return a.exec();
}

and my Robot.cpp

#include "../include/robot/robot.hpp"

#include <math.h>
#define PI 3.14159265

#include "ros/ros.h"

#include "../ssc32py/srv_gen/cpp/include/ssc32py/MoveAng.h"
#include "../ssc32py/srv_gen/cpp/include/ssc32py/None_Float.h"
#include "../ssc32py/srv_gen/cpp/include/ssc32py/None_Int32.h"



int i_joint , status;
double t1, t2, t3, t4, t5, v_xy, x, y, z, l1, l2, field[8][8][3], angle, ttime;

bool endgroup;
ros::NodeHandle n;
ros::ServiceClient client;
ssc32py::MoveAng service_MoveAng;
ssc32py::None_Int32 service_IsMove;

Robot::Robot(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::Robot)
{
    ui->setupUi(this);
}

Robot::~Robot()
{
    delete ui;
}