I am trying to connect to ROS using rosserial windows. I am following the tutorial given on the ROS website (http://wiki.ros.org/rosserial_windows/Tutorials/Hello%20World) here is what my code looks like: // ConsoleApplication1.cpp : Defines the entry point for the console application. //
#include "stdafx.h"
#include <string>
#include <stdio.h>
#include "ros.h"
#include <std_msgs/Float32.h>
#include <windows.h>
using std::string;
int main(int argc, _TCHAR * argv[]){
ros::NodeHandle nh;
char* ros_master = "172.17.194.162"; //error1
printf("Connecting to server at %s\n", ros_master);
nh.initNode(ros_master);//error2
printf("Advertising message\n");
std_msgs::Float32 a;
ros::Publisher cmd("/truevision/throttle_cmd", &a);
nh.advertise(cmd);
printf("Go Car!\n");
while (1){
nh.spinOnce();
Sleep(100);
}
printf("All done\n");
return 0;
}
It is giving me errors
E0144 - const cahr cannot be used to initialize an entity of type char
C2664 - cannot convert argument 1 from const char to char
But this is exactly how it is done in the tutorial. can't seem to figure out what is wrong here.