ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2022-04-03 11:44:12 -0500 | received badge | ● Famous Question (source) |
2018-02-28 20:39:31 -0500 | received badge | ● Notable Question (source) |
2016-12-07 00:53:55 -0500 | received badge | ● Editor (source) |
2016-12-07 00:35:10 -0500 | answered a question | access to mouseXY in ROS on raspberry-pi-2 w/ Ubuntu14.04 Hi, I found a working solution - must have been error on my end. Attached code will broadcast the XY mouse position and speed as JSON on topic 'chatter': When invoking the mouseMsg.py you can select which mouse # you want to read and what is the readout frequency. Thanks Jan |
2016-12-07 00:26:04 -0500 | received badge | ● Enthusiast |
2016-11-29 02:23:34 -0500 | received badge | ● Popular Question (source) |
2016-11-28 01:12:16 -0500 | asked a question | access to mouseXY in ROS on raspberry-pi-2 w/ Ubuntu14.04 Hi, I'm learning how to use ROS on Raspberry-pi2. I was able to follow your tutorial and run talker/listener. I also made simple nodes which would blink LED or move servo in response to a message sent to a dedicated topic. But I am stuck on my node which is meant to broadcast mouseXY coordinates. 1) I started with the example (attached at the bottom), which compiles and runs as non-sudo after I changed sudo chmod a+r /dev/input/event3 So I can read mouse XY as non-sudo on R-pi using my compiled C++ stand alone code. 2) I have modified your talker.cpp to access X,Y mouse data the same way, for now just want to print the values on the screen. The code compiles and executes as ROS node, but never passes this line: now will print mouse XY to stdout - stuck The value of ie.type is stuck on some large integer, like: ie.type=11672 With my limited understanding how ROS works I am not able to figure out why the same sequence of C++ code embedded in to a ROS node is not working. My full ROS code in bitbucket, public repo. It can be compiled on Ubuntu14.04 as: The code in question is : ~/catkin_rpi/src/basic_jan/src/streamMouseXY.cpp It executes as follows (assuming mouse is seen as event3) Can you perhaps advice me how to proceed? Thanks Jan Below is C++ code working on R-Pi2. (more) |