Have you looked at the technical details of talking to rosbridge_server
? From what I see, your app connects to a websocket on the robot, then you send a json message, and get one or more json responses. There are already libraries for c++ to help code both for websockets and for json. This approach should work if rosbridge does the things you need, but you will have to be careful not to subscribe to any high-bandwidth topics.
If it were me, I'd likely create a ros node in python that uses the tornado library to implement a very simple one-page http server. This approach keeps all ros message traffic on the robot, allowing the node to publish and subscribe to whatever it needs to, and not worry about consuming wireless bandwidth. How nice the displayed web page looks would depend entirely on how much effort you want to put into coding it.
At a high level, please explain what you want to accomplish. Why do you not create a "real" ros node, in c++ if that's your preferred language?
Because I want to build a user interface which can monitor and control the robot remotely. But I want to have a native application instead of web-based. Is it possible to do this?
Yes, it's very possible. However, you have not explained enough of your idea for me to comment on whether using rosbridge makes sense. Will you configure a ros network between the laptop (for UI) and the robot, or will the robot run a custom server that your UI app makes a network connection to? On which machine did you want to run rosbridge?
Simply I just want to create an application which can communicate to ROS (on my robot) and this application should be run on a non-ROS machine. I found that rosbridge is almost the only way to do this without a great effort. So I'm looking for a solution to use rosbridge in a native application. C++ is a prefered language, however we can be flexible. Could you give me some advice? Thank you for paying attention in my topic.