News

Page 330 of 542
1 328 329 330 331 332 542

Exploring ROS2 with wheeled robot – #1 – Launch ROS2 Simulation

By Marco Arruda

This is the 1st chapter of the series “Exploring ROS2 with a wheeled robot”. In this episode, we setup our first ROS2 simulation using Gazebo 11. From cloning, compiling and creating a package + launch file to start the simulation!

You’ll learn:

  • How to Launch a simulation using ROS2
  • How to Compile ROS2 packages
  • How to Create launch files with ROS2

1 – Start the environment

In this series we are using ROS2 foxy, go to this page, create a new rosject selecting ROS2 Foxy distro and and run it.

2 – Clone and compile the simulation

The first step is to clone the dolly robot package. Open a web shell and execute the following:

cd ~/ros2_ws/src/
git clone https://github.com/chapulina/dolly.git

Source the ROS 2 installation folder and compile the workspace:

source /opt/ros/foxy/setup.bash
cd ~/ros2_ws
colcon build --symlink-install --packages-ignore dolly_ignition

Notice we are ignoring the ignition related package, that’s because we will work only with gazebo simulator.

3 – Create a new package and launch file

In order to launch the simulation, we will create the launch file from the scratch. It goes like:

cd ~/ros2_ws/src
ros2 pkg create my_package --build-type ament_cmake --dependencies rclcpp

After that, you must have the new folder my_package in your workspace. Create a new folder to contain launch files and the new launch file as well:

mkdir -p ~/ros2_ws/src/my_package/launch
touch ~/ros2_ws/src/my_package/launch/dolly.launch.py

Copy and paste the following to the new launch file:

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource

def generate_launch_description():

pkg_gazebo_ros = get_package_share_directory('gazebo_ros')
pkg_dolly_gazebo = get_package_share_directory('dolly_gazebo')

gazebo = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_gazebo_ros, 'launch', 'gazebo.launch.py')
)
)

return LaunchDescription([
DeclareLaunchArgument(
'world',
default_value=[os.path.join(pkg_dolly_gazebo, 'worlds', 'dolly_empty.world'), ''],
description='SDF world file',
),
gazebo
])

Notice that a launch file returns a LaunchDescription that contains nodes or other launch files.

In this case, we have just included another launch file gazebo.launch.py and changed one of its arguments, the one that stands for the world name: world.

The robot, in that case, is included in the world file, so there is no need to have an extra spawn node, for example.

And append to the end of the file ~/ros2_ws/src/my_package/CMakeLists.txt the following instruction to install the new launch file into the ROS 2 environment:

install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/
)

ament_package()

4 – Compile and launch the simulation

Use the command below to compile only the created package:

cd ~/ros2_ws/
colcon build --symlink-install --packages-select my_package
source ~/ros2_ws/install/setup.bash
ros2 launch my_package dolly.launch.py

5 – Conclusion

This is how you can launch a simulation in ROS2. It is important to notice that:

  • We are using a pre-made simulation: world + robot
  • This is how a launch file is created: A python script
  • In ROS2, you still have the same freedom of including other files or running executables inside a custom launch file

Related courses & extra links:

A system to control robotic arms based on augmented reality and a brain-computer interface

For people with motor impairments or physical disabilities, completing daily tasks and house chores can be incredibly challenging. Recent advancements in robotics, such as brain-controlled robotic limbs, have the potential to significantly improve their quality of life.

Autonomous robotic rover helps scientists with long-term monitoring of deep-sea carbon cycle and climate change

The sheer expanse of the deep sea and the technological challenges of working in an extreme environment make these depths difficult to access and study. Scientists know more about the surface of the moon than the deep seafloor. MBARI is leveraging advancements in robotic technologies to address this disparity.

A model that translates everyday human activities into skills for an embodied artificial agent

Over the past decade or so, many roboticists and computer scientists have been trying to develop robots that can complete tasks in spaces populated by humans; for instance, helping users to cook, clean and tidy up. To tackle household chores and other manual tasks, robots should be able to solve complex planning tasks that involve navigating environments and interacting with objects following specific sequences.

Tobias Holmes: Agriculture Robots, Herbicide Resistance, and Education | Sense Think Act Podcast #6

In this episode, Audrow Nash speaks to Tobias Holmes, Quality Assurance Manager at Blue River Technologies. Blue River uses computer vision and robotics in agriculture and was acquired by John Deere in 2017. Tobias speaks about herbicide resistance, spraying weeds, quality assurance and testing on hardware, and on encouraging kids to learn robotics.

 

Episode Links

Podcast info

Investigating how robot systems can function better in dynamic environments

Currently, most robots are seen in industry where they support repetitive tasks, such as in the assembly lines of cars or in the production of microchips. However, in the near future the robot should find his way in less structured environments as well, to be able to work in healthcare or in hazardous environments, such as disaster areas. Researcher Wouter Houtman investigated the interaction of robots with their environment and developed algorithms to improve their movements in "the real world." He will defend his Ph.D. thesis at the department of Mechanical Engineering on Thursday 4th of November.

Evolution in the Press Shop – Intelligent, Camera-based Tool Protection in Stamping and Forming Technology

Boosting efficiency through digitalization - almost no branch of industry can evade it. Also operators of press shops are increasingly networking their production. But - it's not always necessary to replace the entire plant in order to stay up to date.

We are delighted to announce the launch of Scicomm – a joint science communication project from Robohub and AIhub

Scicomm.io is a science communication project which aims to empower people to share stories about their robotics and AI work. The project is a joint effort from Robohub and AIhub, both of which are educational platforms dedicated to connecting the robotics and AI communities to the rest of the world.

This project focuses on training the next generation of communicators in robotics and AI to build a strong connection with the outside world, by providing effective communication tools.

People working in the field are developing an enormous array of systems and technologies. However, due to a relative lack of high quality, impartial information in the mainstream media, the general public receive a lot hyped news which ends up causing fear and / or unrealistic expectations surrounding these technologies.

Scicomm.io has been created to facilitate the connection between the robotics and AI world and the rest of the world through teaching how to establish truthful, honest and hype-free communication. One that brings benefit to both sides.

Scicommm bytes

With our series of bite-sized videos you can quickly learn about science communication for robotics and AI. Find out why science communication is important, how to talk to the media, and about some of the different ways in which you can communicate your work. We have also produced guides with tips for turning your research into blog post and for avoiding hype when promoting your research.

Training

Training the next generation of science communicators is an important mission for scicomm.io (and indeed Robohub and AIhub). As part of scicomm.io, we run training courses to empower researchers to communicate about their work. When done well, stories about AI and robotics can help increase the visibility and impact of the work, lead to new connections, and even raise funds. However, most researchers don’t engage in science communication, due to a lack of skills, time, and reach that makes the effort worthwhile.

With our workshops we aim to overcome these barriers and make communicating robotics and AI ‘easy’. This is done through short training sessions with experts, and hands-on practical exercises to help students begin their science communication journey with confidence.

scicomm workshop in actionA virtual scicomm workshop in action.

During the workshops, participants will hear why science communication matters, learn the basic techniques of science communication, build a story around their own research, and find out how to connect with journalists and other communicators. We’ll also discuss different science communication media, how to use social media, how to prepare blog posts, videos and press releases, how to avoid hype, and how to communicate work to a general audience.

For more information about our workshops, contact the team by email.

Find out more about the scicomm.io project here.

Page 330 of 542
1 328 329 330 331 332 542