This project began with https://www.hackster.io/adi1690/ros-robot-004bf8 but got significantly expanded from there. I added an ultrasonic sensor, mounted on a step motor, converted the wheel control to C(++), added SSL network connectivity and wrote a primitive Android app to control that. At the moment this is rather primitive, I have to learn a lot as I go. The Android app has to be improved a lot. The two repositories are https://github.com/lyakh/RobotSense-ROS.git and https://github.com/lyakh/RobotSense-Android.git Both those projects contain a reasonable amount of code, so I won't paste it here. I hope to continue further improving this project, at this stage it only contains the basic functionality of all the available modules: the Android app can control the chassis, the step motor, rotating the ultrasonic sensor and it receives and displays the distances. Current limitations:
- The Android app runs only in landscape mode and it cannot rotate the screen. So, you have to first rotate it, then start it
- Only one view is working, the IP address and the port number are hard coded in the Android app
- An SSL certificate and a key have to be installed manually
- Apart from the two actual ROS apps, comprising the package, one also has to run the static_transform_publisher ROS application in parallel, but that seems to be the preferred way to publish a static transform in ROS.
To run the app on the Pi I'm currently using 4 terminal windows:
pi $ roscore
pi $ /usr/lib/tf/static_transform_publisher 0 0 0 0 0 0 "bot" "chassis" 500
pi $ ROS_IP=192.168.0.100 rosrun robot_sense net_control
root $ rosrun robot_sense robot_sense_node
Comments