5. Feature: LiDAR - FAAMT/ros_ugv_ultron GitHub Wiki

The LiDAR feature enables a robot or autonomous system to perceive and interpret its surrounding environment using laser scan data. It plays a crucial role in enabling robots to interact and navigate in the world.

For LiDAR-based perception, we utilize two essential ROS packages: ydlidar (git) for interfacing with the YDLIDAR sensor series, and rviz (git) for 3D visualization of the laser scan data. Together, these packages empower the robot to gain valuable insights into its surroundings, supporting tasks like SLAM, obstacle detection, and navigation.

Interfacing with the YDLiDAR X2L using the ydlidar Package

Package Name: ydlidar
Install Instructions: Download zip file from ydlidar official website. Extract in the /src folder of your workspace, then build.
Run Command: roslaunch ydlidar_ros X2L.launch
Node Information:
The ydlidar package is a ROS driver specifically designed to interface with the YDLIDAR series of LiDAR sensors, including models like YDLIDAR X2L. The package provides the necessary functionality to access distance measurements from the LiDAR sensor.

Discover more about the YDLIDAR sensor by visiting their official website: ydlidar.

Laser Data Representation with rviz Package

Package Name: rviz
Install Instructions: sudo apt-get install ros-<ROS-DISTRO>-rviz
Run Command: rosrun rviz rviz to access the laser data published on the /scan topic.
Node Information:
rviz is a ROS package that provides a graphical interface for visualizing various data, including laser scan data and images from specific ROS topics. It offers real-time viewing, zooming, panning, and analysis of sensor data, making it ideal for robotics and computer vision projects.

For more information and usage examples, check out the official rviz wiki.

Unified Robot Description Format (URDF) with rviz Package

URDF (Unified Robot Description Format) is an XML-based file format in ROS used to describe a robot's kinematic and visual properties. It enables standardized representation for visualization, simulation, and control in ROS-based robotics.

For more information and usage examples, check out the official URDF wiki.


The relevant source file for this phase of the project is the mypc_ws_/src/ultron_desc/urdf/ultron.urdf (XML).

Let's break down the URDF code for the robot step by step using code block sections:

<?xml version='1.0'?>
<robot name="ultron">

This is the starting of the URDF file for the robot named "ultron".

<material name="white">
  <color rgba="0.8 0.8 0.8 1"/>
</material>

<material name="gold">
  <color rgba="0.75 0.63 0 1"/>
</material>

<material name="black">
  <color rgba="0 0 0 1"/>
</material>

Here, three materials are defined: "white," "gold," and "black," each with an RGBA color value.

<link name='chassis_top'>
  <pose>0 0 0.1 0 0 0</pose>
  
  <inertial>
    <mass value="1.0"/>
    <origin xyz="0.0 0 0" rpy="0 0 0"/>
    <inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
  </inertial>
  
  <collision name='chassis_collision'>
    <origin xyz="0 0 0.125" rpy="0 0 0"/>
    <geometry>
      <cylinder length="0.025" radius="0.15"/>
    </geometry>
  </collision>
  
  <visual name='chassis_visual'>
    <origin xyz="0 0 0.125" rpy="0 0 0"/>
    <geometry>
      <cylinder length="0.025" radius="0.15"/>
    </geometry>
    <material name="white"/>
  </visual>
</link>

The "chassis_top" link is defined with its pose and other components like inertial and collision models.

<joint name="joint_chassis_top_bottom" type="fixed">
  <origin xyz="0.0 0.0 0.0075" rpy="0.0 0.0 0.0"/>
  <parent link="chassis_top"/>
  <child link="chassis_bottom"/>
</joint>

This joint, "joint_chassis_top_bottom," connects the "chassis_top" and "chassis_bottom" links with a fixed type.

<link name="wheels_back_left">
  <pose>0 0 0.1 0 0 0</pose>
  
  <inertial>
    <mass value="0.5"/>
    <origin xyz="0.0 0 0" rpy="0 0 0"/>
    <inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
  </inertial>
  
  <collision name='left_wheel_collision'>
    <origin xyz="0 0 0" rpy="0 1.57075 1.57075"/>
    <geometry>
      <cylinder length="0.025" radius="0.05"/>
    </geometry>
  </collision>
  
  <visual name='left_wheel_visual'>
    <origin xyz="0 0 0" rpy="0 1.57075 1.57075"/>
    <geometry>
      <cylinder length="0.025" radius="0.05"/>
    </geometry>
    <material name="black"/>
  </visual>
</link>

<joint name="joint_chassis_wheels_back_left" type="continuous">
  <origin xyz="-0.075 0.15 0" rpy="0 0 0"/>
  <parent link="chassis_top"/>
  <child link="wheels_back_left"/>
  <axis xyz="0.0 1.0 0.0"/>
  <limit lower="0.0" upper="0.0" effort="50.0" velocity="0.5"/>
</joint>

Similarly, links and joints for the other wheels are defined in the URDF.

<joint name="joint_chassis_top_head" type="fixed">
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <parent link="chassis_top"/>
  <child link="head"/>
</joint>

<link name="head">
  <pose>0 0 0.1 0 0 0</pose>
  
  <inertial>
    <mass value="0.5"/>
    <origin xyz="0.0 0 0" rpy="0

These are the main components of the URDF code for the robot "ultron." They define the robot's chassis, wheels, and head, along with their connections using joints. The URDF file describes the robot's geometry, inertial properties, and visual appearance, making it an essential file for robot simulation and visualization in ROS.

⚠️ **GitHub.com Fallback** ⚠️