Design a User-defined robot of your choice (or you can use the URDF file) and enable the LIDAR Scanner so that any obstacle placed on the path of the light scan will cut the light rays. Visualize the robot in the Gazebo workspace, and also show the demonstration in RViz. (NB: Gain knowledge on wiring URDF file and .launch file for enabling any user-defined robot to get launched in the gazebo platform.) SLAM : One of the most popular applications of ROS is SLAM(Simultaneous Localization and Mapping). The objective of the SLAM in mobile robotics is to construct and update the map of an unexplored environment with the help of the available sensors attached to the robot which will be used for exploring. URDF: Unified Robotics Description Format, URDF, is an XML specification used in academia and industry to model multibody systems such as robotic manipulator arms for manufacturing assembly lines and animatronic robots for amusement parks. URDF is especially popular with users of the Robo
Blocks
A Block in ADA contains two parts specification and a body. The specification specifies the variable used inside the block and the body executes the statement for the block
syntax
block
begin
---
---
end
- The main purpose of blocks are information hiding.
- A Variable declared inside a block is accessible only within the block and nowhere outside the block.
Example
var x,y:integer
begin
y:=0;
for x in 1..10 loop
block
var x:integer;
begin
for x in 1..5 loop
y:=y+x;
end loop;
end;
end loop;
(NB: the above example shows two variables x within the block and outside the block, The x inside the block is accessible only within that block)
Procedures and Functions
- Blocks are repeated whenever they are needed, but functions can be written once, called anytimes
Examples
//to define a function to show the smaller among two integers
function SMALLER (A,B: integer) return integer is
begin
if A < B then
return A;
else
return B;
end if;
end SMALLER;
//function calling SMALLER
D:=C+SMALLER(x,y);
Comments
Post a Comment