when I run my subscriber, there is error: ‘argc’ was not declared in this scope
when I run my subscriber, there is error: ‘argc’ was not declared in this scope this is my code about the subscriber and publisher:
//Initialized the node, setup the NodeHandle
ros::init(argc, argv, "pose_listener");
ros::NodeHandle nh1;
//Define the subscriber
ros::Subscriber positionsub = nh1.subscribe("/uwsim/girona500odom", 1, vehiclePoseCallback);
//Initialized the node, setup the NodeHandle
ros::init(argc, argv, "girona500_target");
//Define the subscriber
ros::NodeHandle nh2;
ros::Subscriber sub = nh2.subscribe("chatter", 1, chatterCallback);
//Initialized the node, setup the NodeHandle
ros::init(argc, argv, "girona500_t1");
//Define the publisher
ros::NodeHandle nh3;
ros::Publisher chatterpub = nh3.advertise<stdmsgs::String>("chatter", 1);
Asked by ZYS on 2016-02-16 09:20:11 UTC
Comments