|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
IntroductionDescription: Introduction to evablockly_ros.
Tutorial Level: BEGINNER
Next Tutorial: Subscribing to a Topic
- Maintainer status: developed
Maintainer: Inovasyon Muhendislik <email@example.com>
- Author: Inovasyon Muhendislik
- License: BSD
Issue Tracker: https://github.com/inomuh/evablockly_ros/issues
Source: git https://github.com/inomuh/evablockly_ros
Blockly is a visual editor that allows users to write programs by adding blocks together. Developers can integrate the Blockly editor into their own web applications to create a great UI for novice users. It is designed for people with no prior experience with computer programming. Robotic block set has been developed using Google Blockly for robot control operations. The data collected from the sensors on the robot can be gathered and instructions can be sent to the robot using these blocks. Evarobot is used in this study which is a fully ROS compatible robot which is built by Inovasyon Muhendislik. Blocks were created specifically for operations that can be performed by using evarobot. This study is performed by using open source software like ROS, Blockly, and Gazebo is presented to users as open source. Web page connected to ROS which runs on server using roslibjs library. Server and robot are connected to each other using ROS. Communication between server and web page is supported by rosbridge server tool.
Steps to run evablockly_ros
Download code from: https://github.com/inomuh/evablockly_ros
Installing evapc_ros: https://github.com/inomuh/evapc_ros (You should be already installed ROS indigo)
- start from terminal: roslaunch evarobot_description evarobot.launch
- start from terminal: roslaunch rosbridge_server rosbridge_websocket.launch
- start from terminal: rosrun rosapi rosapi_node
- open demos/fixed/index.html file from downloaded code at your favourite browser.
evablockly_ros contains several blocks for controlling and driving evarobot. It can be used for any other robots but not tested. These blocks are divided into 3 categories as ROS-Communication, ROS-Sensors and ROS-Behaviours.
ROS-Communication This group includes communication based ROS methods. Blocks under this category are shown in figure. Operations of these blocks are described from top to bottom.
- CONNECT TO ROS: It provides connect to the server.
- CREATE PUBLISHER: It creates a data publisher to send data. Name of message and message type are parameters of the block.
- PUBLISH DATA: This block is used to send data over created publisher. Data is input of the block.
- CREATE SUBSCRIBER: It creates a subscriber to receive data. Name of message and message type are parameters of the block.
- SUBSCRIBE: Operations to be performed are determined in this block when data received from determined subscriber.
ROS-Sensors This group includes sensor based ROS methods. Blocks under this category are shown in figure. Operations of these blocks are described from top to bottom.
- GET RANGE VALUE: Returns selected value of created subscriber. Message type of the subscriber should be sensor_msgs/Range.
- GET ODOMETRY VALUE: Returns selected value of created subscriber. Message type of the subscriber should be nav_msgs/Odometry.
- GET BUMPER VALUE: Returns selected value of created subscriber. Message type of the subscriber should be impc_msgs/Bumper.
- GET CLOCK VALUE: Returns selected value of created subscriber. Message type of the subscriber should be rosgraph_msgs/Clock.
- GET CUSTOM VALUE: Returns typed value of created subscriber.
- CMD_VEL: Returns cmd_vel values for a geometry_msgs/Twist type publisher.
ROS-Behaviours This group includes behaviour based ROS methods. Blocks under this category are shown in figure. Operations of these blocks are described from top to bottom.
- TELEOP: This block listen arrow keys and navigates the robot due to the pressed key. Up arrow key for moving forward the robot, down arrow key for moving back the robot, right arrow key for turning robot right, left arrow key for turning robot left and spacebar key for stopping the robot.
- WANDER: In this mode the robot autonomously wanders around avoiding obstacles using sensor readings. If sensor range value lower than threshold value robot turns and goes ahead.
- SET PID PARAMETERS: This blocks set pid parameters for left and right wheel. Takes kp, kd, ki values as input for both wheel.