Presentation is loading. Please wait.

Presentation is loading. Please wait.

Robotic Perception and Action

Similar presentations


Presentation on theme: "Robotic Perception and Action"— Presentation transcript:

1 Robotic Perception and Action
RVIZ

2 Visualization of Vehicle Robot
What is RVIZ? RVIZ GUI Displays Visualization of Vehicle Robot Scheme RVIZ Launch File RVIZ Initialization RVIZ Settings RVIZ Visualization Gazebo + RVIZ Gazebo World Unique Launch File Laser Sensor Gazebo vs RVIZ References Index

3 RVIZ is a powerful robot visualization tool
RVIZ is a powerful robot visualization tool. It provides a convenient GUI to visualize sensor data, robot models, environment maps, which is useful for developing and debugging your robot controllers. RVIZ is a ROS 3D visualization tool that lets you see the world from a robot's perspective What is RVIZ?

4 To use rviz visualizer we call it by terminal simply with:
> rosrun rviz rviz A GUI appears with an empty scene RVIZ GUI

5 Useful commands can be:
Use the right mouse button or scroll wheel to zoom in or out Use the left mouse button to pan (shift-click) or rotate (click) In RVIZ GUI, on the left is the Displays area, which contains a list of different elements in the world, that appears in the middle (right now it just contains global options and grid) Below the Displays area, we have the Add button that allows the addition of more elements RVIZ GUI

6 Displays Name Description Messages Used Axes Displays a set of Axes
Effort Shows the effort being put into each revolute joint of a robot. sensor_msgs/JointStates Camera Creates a new rendering window from the perspective of a camera, and overlays the image on top of it. sensor_msgs/Image, sensor_msgs/CameraInfo Grid Displays a 2D or 3D grid along a plane Grid Cells Draws cells from a grid, usually obstacles from a costmap from the navigation stack. nav_msgs/GridCells Image Creates a new rendering window with an Image. Unlike the Camera display, this display does not use a CameraInfo. Version: Diamondback+ sensor_msgs/Image InteractiveMarker Displays 3D objects from one or multiple Interactive Marker servers and allows mouse interaction with them. Version: Electric+ visualization_msgs/InteractiveMarker Laser Scan Shows data from a laser scan, with different options for rendering modes etc. sensor_msgs/LaserScan Displays

7 Displays Name Description Messages Used Map
Displays a map on the ground plane. nav_msgs/OccupancyGrid Markers Allows programmers to display arbitrary primitive shapes through a topic visualization_msgs/Marker, visualization_msgs/MarkeraRRAY Path Shows a path from the navigation stack. nav_msgs/Path Point Draws a point as a small sphere. geometry_msgs/PointStamped Pose Draws a pose as either an arrow or axes. geometry_msgs/PoseStamped Pose Array Draws a "cloud" of arrows, one for each pose in a pose array geometry_msgs/PoseArray Point Cloud(2) Shows data from a point cloud, with different options for rendering modes, accumulation, etc. sensor_msgs/PointCloud, sensor_msgs/PointCloud2 Nav_msgs/OccupancyGridMap Displays

8 Displays Name Description Messages Used Polygon
Draws the outline of a polygon as lines. geometry_msgs/Polygon Odometry Accumulates odometry poses from over time. Nav_mags/Odometry Range Displays cones representing range measurements from sonar or IR range sensors. Version: Electric+ sensor_msgs/Range RobotModel Shows a visual representation of a robot in the correct pose (as defined by the current TF transforms). TF Displays the tf transform hierarchy. Wrench Draws a wrench as arrow (force) and arrow + circle (torque) Geometry_msgs/WrenchStamped Oculus Renders the RViz scene to an Oculus headset Displays

9 Visualization of Vehicle Robot

10 Scheme MODELING Robot: .urdf , .xacro World: .sdf SIMULATION GAZEBO
Insert the robot in a world INTERACTION GAZEBO PLUGINS Control the robots via plugins: differential drive, sensor laser…. VISUALIZATION RVIZ Tool to visualize the robot Scheme

11 In order to visualize our robot, we create a specific launch file.
Go to package/launch folder and create a launch file: > cd ~/catkin_ws/src/my_robot/launch > gedit rviz.launch Copy and paste the following code: <?xml version="1.0"?> <launch> <param name="robot_description" command="cat '$(find my_robot)/gazebo_simulation/urdf/my_robot.xacro'"/> <!-- send fake joint values --> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"> <param name="use_gui" value="False"/> </node> <!-- Combine joint values --> <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/> <!-- Show in Rviz --> <node name="rviz" pkg="rviz" type="rviz" /> </launch> RVIZ Launch File

12 Then we can launch our rviz.launch file simply with:
> roslaunch my_robot rviz.launch The empty visualization of the GUI appears: RVIZ Initialization

13 In order to visualize our robot, go to the left panel (Displays)
In order to visualize our robot, go to the left panel (Displays). Open Global Options and select link_chassis instead of map in the Fixed Frame Then, click on the button Add on the left bottom part. A window opens and then select the RobotModel under By display type RVIZ Settings

14 RVIZ Robot Visualization
In this way we can visualize our model into RVIZ We can save a so called RVIZ configuration (.rviz) file in order to add it directly by a launch file with all the settings saved for our model Then, click on File -> Save Config As and create a directory called config in my_robot directory. Then save the file with the name config.rviz RVIZ Robot Visualization

15 It’s time to connect Gazebo – RVIZ – ROS using a unique launch file
First of all we can create a world directly in Gazebo. After that we can load it as possible world by the unique launch file In the directory my_robot/gazebo_simulation/world save the worlds created in gazebo. > cd ~/catkin_ws/src/my_robot/gazebo_simulation/world For our purposes, download the simple_no_obst.world world and put it in the world directory NB: the .world file uses a xml language with the SDF standard at version 1.4 Then we create a unique launch file. Go to launch directory and use the following command: > gedit my_robot.launch Open the file and then copy and paste the following code: Gazebo World

16 <. xml version="1. 0" encoding="UTF-8". > <launch> <
<?xml version="1.0" encoding="UTF-8"?> <launch> <!-- OPEN GAZEBO AND LOAD THE EMPTY WORLD AS INITIALIZATION. THEN LOAD THE WORLD CREATED. --> <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="use_sim_time" value="true"/> <arg name="debug" value="false"/> <arg name="world_name" value="$(find my_robot)/gazebo_simulation/world/simple_no_obst.world"/> </include> <!-- ADD THE ROBOT DESCRIPTION FROM THE URDF (.xacro) FILE --> <param name="robot_description" command="$(find xacro)/xacro.py '$(find my_robot)/gazebo_simulation/urdf/my_robot.xacro'" /> <!-- Name of robot and starting positions (x, y, z) --> <arg name="robot_name" default="my_robot"/> <arg name="x" default="0"/> <arg name="y" default="0"/> <arg name="z" default="0.5"/> Unique launch file

17 <!-- SPAWN THE MODEL OF THE ROBOT IN THE GAZEBO WORLD -->
<node name="spawn_$(arg robot_name)" pkg="gazebo_ros" type="spawn_model" output="screen" args="-unpause -urdf -param robot_description -model $(arg robot_name) -x $(arg x) -y $(arg y) -z $(arg z)" /> <!-- send fake joint values --> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"> <param name="use_gui" value="False"/> </node> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <!-- RVIZ Visualizator --> <!-- From configuration file --> <node pkg="rviz" type="rviz" name="rviz" args="-d $(find my_robot)/config/config.rviz"> </launch> Unique launch file

18 Laser Sensor Then we can launch our rviz.launch file simply with:
> roslaunch my_robot my_robot.launch The visualization of the GUI with the robot model appears in RVIZ and Gazebo In RVIZ, we add the laser scan topic to see the obstacles reachable by the sensor To do this click on the button Add on the left bottom part. The Create visualization window opens. Then go to the subpanel By topic and select the topic my_robot/laser/scan -> Laser Scan. You can increase the size of the markers by digits the Size parameter Laser Sensor

19 Then the obstacles are read by laser scan and represent the simulator world in gazebo
Gazebo vs RVIZ

20 Exploring ROS using a 2 Wheeled Robot
RVIZ in ROS Exploring ROS using a 2 Wheeled Robot Slides course (Roi Yehoshua) References


Download ppt "Robotic Perception and Action"

Similar presentations


Ads by Google