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

rosserial_windows program Error

asked 2019-08-13 18:31:05 -0500

humzaChoudry gravatar image

Im new to ros. Im following the hello world tutorial for rosserial_windows. Im using melodic and ubuntu 18.04.02 on one computer and windows 10 on another.

I cannot get my visual studio program to build. I keep getting the errors below.

E0020 Identifier "_TCHAR" is undefined.

C2061 Syntax error: idenfifier '_TCHAR'

Line of code where the error occurred: int _tmain(int argc, _TCHAR* argv[])

E0144 a value of type "const char *" cannot be used to initialize an entity of type "char *"

C2440 'initalizing': cannot convert from 'const char [19]' to 'char *'

Line of code where the error occurred: char* ros_master = "";

Also, from the tutorial im told to assign the IP of the ros master to the variable above char * ros_master = ... (in visual studio on windows 10). How do i find the ros master IP? Is it the computer IP and then port number? Please be specific. Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-13 22:50:07 -0500

OoeyGUI gravatar image

ROS on Windows is now directly supported. Check out Once you install it, you can set the ROS master to your Ubuntu computer.

After launching the command window and setting up the ROS environment with c:\opt\ros\melodic\x64\setup.bat, you can set ROS_MASTER_URI=http://<ip of your Linux Robot>:11311. You can run nodes or Tools on Windows which can interface directly with the robot. (Like using WinML on Windows against cameras and actuators on the robot).

I created this bug in the ROSOnWindows issues to track updating the rosserial_windows documentation to reference direct Windows support.

Good luck!


edit flag offensive delete link more

Question Tools



Asked: 2019-08-13 18:31:05 -0500

Seen: 727 times

Last updated: Aug 13 '19