Arduino Publisher/Suscriber for Gazebo
I have a program in arduino that is reading the values from a flex sensor, and publish them in a topic like the Example in here/Rosserial_arduino/publisher.
Now I need to send that values to gazebo, to move a 3D object. I tried to make a suscriber like all the examples in rosserial_arduino tutorials, and like the examples of ROS tutorials but the question is that in all the examples the suscriber and the Publisher are .cpp files and in this case the publisher is the arduino that is a .ino file. Anyway tried to make a file .cpp for the suscriber, and add the line
rosbuild_add_executable(listener src/listener.cpp)
in the Cmakelists.txt but of course here is an error cause he didn't find the topic that he is trying to suscribe.
Really I don't know how to communicate the arduino with gazebo. or create a suscriber that i can use in gazebo that listen the publication of arduino.
Move a 3D object how? What is the type of the message are you currently publishing?
Actually i have a kind of hand, made by boxes, each one of the parts of the fingers is a diferent box, is defined in a .urdf file with joints,etc. The type of message i'm publishin' is a float. is a value that gives me the sensor.