VEEROBOT Docs
StoreBlogWiki
  • 🌐Introduction
  • ROS Based Robots
    • 🐺Wolf Robot
      • ROS Introduction
      • Getting Started with ROS 2
      • Introduction to Wolf Robot
      • ROS 2 Setup
      • ROS Concepts
      • Using Wolf Examples
      • Creating a URDF File
      • Visualising in Gazebo
      • Controlling motors from ROS
      • LiDAR Basics & Control
      • Using a Camera with ROS2
      • ROS 2 Cleanup
      • ROS 2 Controller
      • Teleoperation
      • Slam Navigation
      • Wolf : Conclusion
  • Arduino Based Robots
    • 🚜Micro:Xbot
      • Preparations before First Use
      • Programming the Board
      • Powering the Board
      • Pin Mapping
      • Basic Programs
        • Blinking LED
        • Buzzer Program
        • Fading LED
        • RGB LED
        • Light Detection
        • Battery Voltage
        • Line Follower Module
        • Ultrasonic Sensor
        • Infrared Remote Control
        • Motor Control
        • Bluetooth Control
        • Display Test
        • Test Me
      • Robot Assembly
      • Advanced Programs
        • Bluetooth Controlled Robot
        • Obstacle Avoidance Robot
        • Line Follower Robot
  • ROS2 Repo
    • Introduction
    • Page 1
      • Sub Page 1
    • Page 2
Powered by GitBook
On this page
  • Downloading first example:
  • Visual Studio Code
  • Simulating our Robot in RVIZ2
  1. ROS Based Robots
  2. Wolf Robot

Creating a URDF File

Define our robot in 3D Space

PreviousUsing Wolf ExamplesNextVisualising in Gazebo

Last updated 2 years ago

In this section, we will understand how to build a URDF(Unified Robotics Description Format) file which is a variant of xml syntax which is used to model our wolf system for a simulated environment. We create a bunch of files in URDF files and a tool called xacro combiles them into a single complete URDF (Unified Robotics Description Format). This is passed to robot_state_publisher which makes the data available on the /robot_description topic, and also broadcasts the appropriate transforms.

Downloading first example:

On your development machine, download all the contents of this Github page.

The download will have multiple folders each starting with t#. Save it in a location away from your workspace. (Eg: Downloads or Home directory)

If you do not have a GitHub account already, create one and login. Setup ssh connection between your machine and GitHub so that any modifications on either side can be in sync. For more information, follow the guide below:

cd dev_ws/src

From the downloaded folder, copy wolf-robot folder to src folder in your workspace.

cp -r <downloaded_directory>/t1_urdf_creation/wolf-robot /dev_ws/src

We need to build the workspace and compile the codes downloaded. But before that, we need to install required packages.

sudo apt install ros-foxy-xacro ros-foxy-joint-state-publisher-gui

Now we will build the workspace.

colcon build --symlink-install #this builds all packages inside src

If we now check contents (ls)in our workspace cd /dev_ws, we will find that there are other folders generated viz. build, log, install. If colcon build says successful, our package is compiled correctly and we can run the package.

Visual Studio Code

The best way to edit files is using an IDE. VS Code helps in formatting and viewing all the files in our workspace. Since we have a few folders and files in our workspace, its a good time to open VS Code and go through all the files created, their extensions and code.

Simulating our Robot in RVIZ2

Run the below commands, each on a separate terminal. Before running, make sure to source the environment on each terminal by typing source install/setup.bash. You may choose to add this to the bashrc file, but we will keep it like this for now.

ros2 launch wolf-robot rsp.launch.py # first terminal window
 ros2 run joint_state_publisher_gui joint_state_publisher_gui # second terminal window
rviz2 # third terminal window

This should open Rviz2. Rviz2 is a port of Rviz (ROS Visualization tool) is a graphical interface that allows users to view a simulated robot model, log sensor information from the robot's sensors, and replay the logged sensor information. By visualising what the robot is seeing, thinking, and doing, the user can debug a robot application from sensor inputs to planned actions.

On the Rviz window, set fixed frame to "base_link" and add a "RobotModel". Add a TF (Transform System) to visualise the joints in our robot. This shows our simulated robot in a 3D world.

Since the collusion is also added in the code, check and uncheck Visual Enabled and Collusion Enabled to visualize the robot

🐺
GitHub - VEEROBOT/wolf-ros2-examples: Examples using ROS 2 on Wolf RobotGitHub
Wolf Tutorials
Generating a new SSH key and adding it to the ssh-agent - GitHub DocsGitHub Docs
Logo
Logo