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

Revision history [back]

Try uncommenting # include so that you have

include_directories(
    include
    ${catkin_INCLUDE_DIRS}
)

Try uncommenting # include so that you have

include_directories(
    include
    ${catkin_INCLUDE_DIRS}
)

This is assuming that magnet.h is directly under your include/ directory, and that there is indeed a constructor that accepts a NodleHandle.

Try uncommenting # include so that you have

include_directories(
    include
    ${catkin_INCLUDE_DIRS}
)

This is assuming that magnet.h is directly under your include/ directory, and that there is indeed a constructor that accepts a NodleHandle.. That error message seems to mean that you do not have one.

Try uncommenting # include so that you have

include_directories(
    include
    ${catkin_INCLUDE_DIRS}
)

This is assuming that magnet.h is directly under your include/ directory, and that there is indeed a constructor that accepts a NodleHandle. That error message seems to mean that you do not have one.one. The implementation should look like this in the .cpp file.

Magnet::Magnet(ros::NodeHandle mynode) {
    //...
}

Try uncommenting # include so that you have

include_directories(
    include
    ${catkin_INCLUDE_DIRS}
)

This is assuming that magnet.h is directly under your include/ directory, and that there is indeed a constructor that accepts a NodleHandle. That error message seems to mean that you do not have one. The implementation should look like this in the .cpp file.

Magnet::Magnet(ros::NodeHandle mynode) {
    //...
}

Last thing: add magnet.cpp at the end in add_executable()!

Try uncommenting # include so that you have

include_directories(
    include
    ${catkin_INCLUDE_DIRS}
)

This is assuming that magnet.h is directly under your include/ directory, and that there is indeed a constructor that accepts a NodleHandle. That error message seems to mean that you do not have one. The implementation should look like this in the .cpp file.

Magnet::Magnet(ros::NodeHandle mynode) {
    //...
}

Last thing: add magnet.cpp at the end in add_executable()!! This is probably the cause.