Download paper

Programming robots by using open-source software instruments

Abstract

This paper expounds my first research experience in programming robots by using open-source software instruments

such as Player. Among the learning robots available at Victoria College’s Agents Research lab, the Technologist and the Writer were preferred. In time, the project focused itself on implementing a plug-in driver for the actuary robot so that it could be controlled via Player. A Player based GRAPHICAL USER INTERFACE console – to remotely control the technologist and other robots with similar mechanisms and sensors  was also formed although for now it lacks some characteristics that could allow Simultaneous Localization and Mapping (SLAM) for Urban Search and Rescue (USAR) missions.

Keywords: Player, technologist, SRV-1, Writer, driver, SRV joy, educational robotics, open-source, USAR.

NTRODUCTION

This representation is a final report from my summer 2019 distributed problem solving experience as an collegian student. My intellect, Md. Iftekharul Alam Efat, from the IIT at the Noakhali University of Science & Technology, orientated my attempt in this project for adjusting drivers for the small educational robots available at the lab into Player [1]  a robot server and simulation software  and finally designing and utilizing a graphical user interface (GUI) for a manlike operator to send dictations and receive input from the robot(s) under relation via the Player server.

The Agents Lab at College has at scientists’ disposition a wide ambit of robots. Among the small robots  employed in some CIS courses such as Exploring Robotics (CC 30.03) [2] and also used during the MU High School Workplace [3]  are the LEGO’s Mind storms RCX Robotics Innovation System [4],

IPRE’s Writer [5] and Technologist Corporation’s SRV-1 [6].

Top Experts
Dr. Karlyna PhD
Verified expert
4.7 (235)
Chris Al
Verified expert
4.9 (478)
Writer Lyla
Verified expert
5 (876)
hire verified expert

By trying these robots finished their available tools, we decided to give antecedence to the Writer (Fig. 1) and the SRV-1 (Fig. 2) due to their open-source centric executions. Fig. 1 Writer robot with Fluke Fig. 2 SRV-1 robot (ARM-7 processor.) The promptly existing drivers are engrossed in C/C++ and the existing machines use Open GL. For example, the Myra library [7] already supplies a driver enforcement for the Writer written in Python, and Technologist Corp. provides its own enforcement of drivers, microcode, and console utilization to control the Technologist robots. In addition, Prof. and his research associates have already adapted their own C/C++ collections to interface the Writer and the SRV-1 as informed in [8], and this software can be acquired freely at [9].

P LAYER

[1] The Player Project makes Free Software that enables problem solving in robot and sensor methods. The Player robot server is credibly the most widely used robot control interface in the world. It assists a wide assortment of hardware, also C, C++, and Python programming languages are formally supported. Stage is Player’s 2-D framework back end, and Gazebo is its 3-D simulation surroundings. [10] explains exhaustively the real re usability and concept layer that the Player tools can render for the robot-application programer. Besides, the ability to reproduce algorithms for autonomous robot guidance, and other sensing activities such as distributed representation  in the case of multiple-robot environments  are just a few of the many reasons why we decided to focus on Player.

At Victoria College, there are already classes such as Launching to Arranged Intelligence (CIS 32) [11], that use Player to reproduce AI fundamentals. Now, the project at hand is to utilize drivers for these learning robots so they can be used with the Player API and thus take benefit of the conception from hardware complexity and the re usability of code in order to germinate reusable controllers (brains) for these and other robots.

TECHNOLOGIST P LUGIN D RIVER FOR P LAYER

[12] and [13] introduce the key ideas involved in the operation of writing Player drivers for different robots besides the ones that presently exist in the formal releases of the Player bundle, like in the case of the Rumba robot, for example.

About the Technologist SRV-1 Fig.

2 shows a SRV-1 robot, which corresponds a small military tank with surfaces. Only the first generation of the SRV-1 robots are acquirable in the lab. These have an ARM-7 processor on-board, but due to this small-scale processing ability, all of the information accumulated by its sensory activity devices are generally clarified by the Player server running wireless on an off-board computer. Hence, the SRV-1 transmits serially with the dominant computer via an X Bee radio electronic device. The SRV-1 also has a low-resolution photographic camera and four infra-red sensing element. This 4-wheeled robot has two strides on each side that amend its friction on rescue environments. We want to utilization the camera as its principal sensing device to interface with Player for SLAM (simultaneous localization and mapping) susceptibilities.

Inheriting from Player’s Driver Grade

The driver acts as a procurator between the robot’s hardware surfaces and the function calls to the Player server. In command for Player to be competent to realize such driver execution, it must come into from Player’s Driver class. For movable ability reasons, the SRV-1 driver is being enforced as a plug in driver instead of as a statically linked one. A plug in driver is accumulated as a shared-object that is dynamically connected to the Player server’s driver table at run-time. We define the use of this plug in driver through the configuration file that is antiqued when we start up Player from the command line, as following: $ player technologist.cfg

The technologist .cfg in Fig. 3 is an example design file with various derivatives, in which the shared-library for this plug in driver is named libTechnologist_Driver .so driver(name “Technologist” plugin ” libTechnologist_Driver.so ” provides [“position2d:0” “camera:0”] port “/ dev /ttyUSB0” image_size “320×240”)

Fig 3. Example of technologist .cfg file for a plugin driver Upon loading a plug in operator, the Player server calls the “player_driver_init” method, whose main aim is to novice the entrance of the driver into the presented driver table by calling the Technologist_Register function. By passing the comparable configuration file to this registering function, the name of the driver  specified to be technologist in this case is then antiqued to the driver class factory function “Technologist_Init”, which returns a indicator (as a generic Driver*) to the new occurrence of this driver.

After the driver has been represented and its central object has been started by the Setup() function, the leftover processing is handled by the Main() method, which principally belongs of a loop that usually consists of 3 steps:

  1. detector and state data are accumulated, then
  2. accumulated data are published to the applicable devices,
  3. and in conclusion, incoming messages are processed.

A brief list of the Driver class’ methods that need to be implemented is given in Table 1.TABLE I I NHERITED DRIVER  CLASS FUCTIONS

Figure Abbreviated Statement

Public Member Functions: Technologist Builder for the Technologist (Config File *cf, multi-interface driver.int section) int Set up the device and start the Setup () device thread by calling Start Thread(), which breeds a new thread and executes Technologist::Main(), which carries the main loop for the driver.

int Shut down the device. Shutdown ()

int Message manager that sends a Process Message response if necessary using (QueuePointer Publish(). This function is called &resp_queue, once for each message in the player_msghdr *hdr, void incoming queue. *data)

Private Member Functions:

virtual void Main “entry point” function for the Main() driver thread created using Start Thread() within the Setup() function Server and Plug in-Specific Hooks int Initiates the registration of the player_driver_init driver into the given driver table.

(DriverTable* table)

void Driver registration function that Technologist_Register adds the driver into the given (Driver Table *table) driver table Driver* Factory creation function that Technologist_Init instantiates the Driver

(ConfigFile *cf, int section)

The communication works for the SRV-1 are outlined outside the familial driver class. Although this alteration is not essential, it purely permits for a more object-oriented programming exercise. Most of the control protocol for the SRV- 1 are single character dictations that are sent to the robot and acknowledged back with a ‘#’ character followed by the primary command. For example, the command: ‘Mac’ implies direct motor control, so the declare response would be just ‘#M’

In this example, the ‘abc’ parameters are sent as 8-bit (1- byte) binaries that specify the following:

a=left speed, b=right speed, c=duration*(10milliseconds) where speeds are 2’s complement 8-bit binary values, so 0x00 through 0x7F are used to move forward, 0xFF through 0x81 are used to move in reverse, Thus, the decimal equivalent of the 4-byte sequence (in hex notation) 0x4D 0x32 0xCE 0x14 is equivalent to ‘M’ 50 -50 20, which means rotate right at 50% speed for 200ms. A duration of 00 would imply to be infinite. Hence, the 4-byte sequence 0x4D 0x32 0x32 0x00 = M 50 50 00 drives the SRV-1 forward at 50% speed indefinitely.

Outcomes

The Player driver for the surveyor SRV-1 was initially tried with Player’s CLI (command line interface) substitutes such as player joy and player cam . Apparently, any other controller for Player can do the job as long as the surfaces are properly furnished in the shape file as indicated previously. Thus, the robot is capable to move around in different directions on the plane, but for now it does not assist odometer to tell its exact 2-D position in the physical world because these specific SRV-1 robots’ mechanisms are only regular DC motors alternative of the more precise servo-motors that can provide exact aligning data. We also know that the IR sensors are not dependable enough to use them as range-finding interfaces. For now, this enforced Player driver lacks of the infrared interface. Also, the camera’s frame rate appears very low at the moment (around 1 fps), yet it is known to be capable of faster rates.

SRV JOY : A P LAYER GUI C ONSOLE TO C ONTROL THE SRV-1

Since we wanted a GUI (graphical user interface) that would allow a manlike operator to drive the robot and take snapshot images from the camera as well as to be presented with a live-video feed that can, eventually, be integrated with SLAM capabilities  to be added to the Stage simulator in future projects  SRVjoy is a GUI console written with Nokia’s QT, an open-source and cross-platform GUI library.

SRVjoy can also control any other robot that has Player drivers and supplies similar interfaces. For now, it only helps position2d and camera interfaces, and can connect to a robot through Player’s default port number “9994” being served on the “localhost”. Thus, the function can drive the robot around (controlling both linear and angular speeds), and take snapshot images from the robot’s camera. A video feed native to the console has not been implemented, yet player cam can be used outwardly at the same time SRVjoy is running.

The direction can be done through the console buttons in the GUI shown in Fig. 4, or by using some allotted keys in the keyboard (The numeric keypad is the preferred choice at the moment).

The SRVjoy console operates in the following way:

  •  All control buttons have symbols that show their
  • moving paths. By pressing a direction button, the
  • robot moves in that direction for as long as the button remains pressed.
  • Speed (linear and angular) can be controlled with thesliders.
  • The camera button will take a snapshot of the current camera view and save it as cameraxxx.jpg in the base folder of the execution program.

NOTE: There is some wait for snapshots (the robot has to focusing first, and then shoot), and sometimes the order of pictures looks shifted.

Num keys also match the layout of the console buttons, so they can be use to control the robot in a similar manner. Fig 4. Screen shot of the SRVjoy Console

CONCLUSIONS

At first, the research experience took me in various paths until getting familiar with the variety of software that can be engaged to interact with these small robots. As stated end-to- end this report, Player was the favorite tool to dive into, as it supplies the right concept from the hardware information and presents a uniform API to the user. As a Computer Technology stellar, I recovered myself profoundly concerned in swimming across this abstraction layer – where hardware meets software  by writing drivers that can fill this void at the valley of the unsupported robots and Player, One Hell of a Robot Server

There is more to be done to accomplish a more polished functionality of the SRV-1 driver and the SRVjoy console, and I feel that leaving the root open at hands of the GNU General Public License can ensure that this goal is reached at some point by the joined attempts of the open-source community.

ACKNOWLEDGMENT

Thanks to Jb. Sumon for his dedicated direction and the work he has done working in conjunction with professors Md. Iftekharul Alam Efat and D Saha for the C/C++ libraries for the Writer and SRV-1 robots. The clarity of his statements in the source code allowed me to realize the inherent communication operations between the robot’s microcode and the higher-level libraries. Besides, thanks to T Ahmed for the original execution of the technologist driver for Player that can be colloquially found in the Technologist forums.

REFERENCES

[1] (2009) The Player Project website. [Online]. Available:

[2] Exploring Robotics (CC 30.03) course website [Online]. Available:

[3] Bridges High School Workshop website. [Online]. Available:

[4] Lego Education website [Online]. Available:

[5] Technologist Corporation website. [Online].

[6] Institute for Personal Robots in Education (IPRE) website. [Online].

[7]Scribbler’s Myro [Online]. Available: Myro_Reference_Manual

[8] John Cummins, M. Q. Azhar, and Elizabeth Sklar, “Using Surveyor SRV-1 Robots to Motivate CS1 Students,” AAAI.org , 2008

[9] Surveyor Robot Software from the Agents Lab at Brooklyn College.

[10] Brian P. Gerkey and Richard T. Vaughan, “Really Reusable Robot Code and the Player/Stage Project.” Software Engineering for Experimental Robotics Springer Tracts on Advanced Robotics , Springer, 2006. [11] Introduction to Artificial Intelligence (CIS 32) course website.

[12] Player Drivers: Writing a Player Plugin from the Penn State Robotics Encyclopedia RoboWiki. [Online].

[13] Jonas Fonseca and Bue Petersen, “Writing Playere Drivers: a how to for ERSP Player Driver Source Package,” From the project: Player

Player driver implementation for ERSP , 2006

Cite this page

Programming robots by using open-source software instruments. (2019, Dec 10). Retrieved from http://studymoose.com/papers-of-md-example-essay

Are You on a Short Deadline? Let a Professional Expert Help You
HELP ME WITH WRITING
Let’s chat?  We're online 24/7