Multiple Arguments of a subscriber ROS indigo, arduino, C++
Hey I would like to control a adruino Board using rosserial. All works fine except when I would like to use a topic and give it two arguments I tired:
//some code here
void turn(const std_msgs::Bool& lr, const std_msgs::UInt16& angle){
// some code here (I used here lr.data and angle.data at the right places
}
//some code
// now here I get my error: because I type in here 2 arguments:
ros::Subscriber<std_msgs::Bool, std_msgs::UInt16> tur("Turn",turn);
// setup(), loop() function etc. some other code
I already read e.g here: http://wiki.ros.org/roscpp/Overview/P... or here: http://answers.ros.org/question/63991...
Now what I simply would like to do:
roscore, rosrun rosserial_python serial_node.py /dev/ttyACM0,
rostopic pub Turn std_msgs/Bool??? value1, value2
where value1 and value2 stands I just want to execute a topic with and give it two values instead of writing two seperate topics with only one argument.
I would be very happy if someone can write a little bit more detailed answer(more specific for my problem) than in the above links.
Thank you very much! :) Best Markus