Using class inheritance in roscpp files [closed]
Hi,
I have a project requirement where it is very easy for me to use class Inheritance techniques! But I seem to find no luck in doing it. I was to make a class which inherits the moveit::planning_interface::MoveGroupInterface
class. The namespace order is all fine! But it gives an error
no matching function for call to ‘moveit::planning_interface::MoveGroupInterface::MoveGroupInterface()
The MoveGroupInterface
class works fine with all its functions in main though
System specs: ROS1.Kinetic, UBuntu 16.04LTS
Here is my code:
#include <exception>
#include <string>
#include <boost/shared_ptr.hpp>
#include <ros/ros.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <geometry_msgs/TransformStamped.h>
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/LinearMath/Transform.h>
#include <ros/topic.h>
#include <string>
#include <moveit/move_group_interface/move_group_interface.h>
class Move_operations_class : public moveit::planning_interface::MoveGroupInterface
{
public:
int a,b;
const std::string PLANNING_GROUP = "arm_torso";
//moveit::planning_interface::MoveGroupInterface move_group("arm_torso");
//MoveGroupInterface move_group("arm_torso");
};
int main(int argc, char** argv)
{
ros::init(argc, argv, "move_operations");
ROS_INFO("Starting application ...");
ros::NodeHandle nh;
ros::AsyncSpinner spinner(1);
spinner.start();
Move_operations_class move_op;
return 0;
}