Giter VIP home page Giter VIP logo

pmb2_simulation's Introduction

PMB2 ROS 2 Simulation

This repository contains the launch files to simulate the PMB2/TIAGo Base robot in ROS 2.

Setup

Prerequisites

  1. Install ROS 2 Humble by following the installation instructions.

  2. Update the apt package index and install needed packages

sudo apt-get update

sudo apt-get install git python3-vcstool python3-rosdep python3-colcon-common-extensions

Disclaimer: In our testing environment, we've found out that the simulation is more reliable if we switch to Cyclone DDS. You can do this by installing it with sudo apt install ros-humble-rmw-cyclonedds-cpp and setting the RMW_IMPLEMENTATION environment variable: export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp. More information on working with different DDS implementations here.

We are still looking on the issues when working with Fast RTPS.

Setting up the workspace

Create a workspace and clone all repositories:

mkdir -p ~/pmb2_public_ws/src
cd ~/pmb2_public_ws
vcs import --input https://raw.githubusercontent.com/pal-robotics/pmb2_tutorials/humble-devel/pmb2_public.repos src

Install dependencies using rosdep

sudo rosdep init
rosdep update
rosdep install --from-paths src -y --ignore-src

Source the environment and build

source /opt/ros/humble/setup.bash
colcon build --symlink-install

Finally, before running any application you have to source the workspace

source ~/pmb2_public_ws/install/setup.bash

Also you can add it to your .bashrc

Simulation

Standalone

Launch gazebo simulation:

ros2 launch pmb2_gazebo pmb2_gazebo.launch.py is_public_sim:=true

You can launch gazebo simulation using PAL office gazebo world by executing:

ros2 launch pmb2_gazebo pmb2_gazebo.launch.py is_public_sim:=true world_name:=pal_office

To move the robot you can use the following command from another terminal:

ros2 topic pub /mobile_base_controller/cmd_vel_unstamped geometry_msgs/msg/Twist '{linear: {x: 1}, angular: {z: 0}}' -r10

The velocities can be modified by changing the values of x and z.

Navigation 2

You can launch PMB2 navigation by executing

ros2 launch pmb2_2dnav pmb2_nav_bringup.launch.py is_public_sim:=true

Then, you can send a goal:

  • With rviz2

Simulation + Navigation 2

You can also start the simulation and navigation together by using

ros2 launch pmb2_gazebo pmb2_gazebo.launch.py is_public_sim:=true navigation:=true

Then, goals can be sent in the same way.

Simulation + Navigation 2 + SLAM

You can start the SLAM and navigation in simulation by using

ros2 launch pmb2_gazebo pmb2_gazebo.launch.py is_public_sim:=true navigation:=true slam:=true

To use private simulation you can avoid to set is_public_sim argument.

pmb2_simulation's People

Contributors

adriaroig avatar artivis avatar awesomebytes avatar bmagyar avatar joan-oliver avatar jordan-palacios avatar jordi-pages avatar lucamarchionni avatar noel215 avatar rainct avatar saikishor avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

olivier-stasse

pmb2_simulation's Issues

Simulation vo_server fail

Hello
I am working on launching the simulation of PMB2 in Gazebo.
ROS version is Indigo, Ubuntu 14.04, Gazebo 2.2
I was following this tutorial and simulation works fine, all the sensor data is transferred and keyboard teleoperation works properly.
In order to make the movement autonomous, I have downloaded pmb2_navigation package.
Then, I launched navigation.launch from pmb2_2dnav package. It complained about pal_navigation_sm, so I downloaded this package from here.
Relaunched, but move_base started to complain about pal_vo_server package.
There is no such package in PAL Robotics Github, so I don't know how to move further.
Could you help me please?
image

Can't launch PMB2 ROS 2 Simulation in ROS Humble

Hello,

I'm trying to use the PMB2 ROS simulation in ROS Humble. I have set up the workspace and installed all the dependencies , but when I try to launch the simulation in Gazebo with ros2 launch pmb2_gazebo pmb2_gazebo.launch.py I get this error:

pal2

I don't understand why this error is shown because the robot is spawned correctly in Gazebo. The joint_state_broadcaster and mobile_base_controller are succesfully loaded too.

Do I need anything else?

This is the full output:
output.txt

nav2 simulation example doesn't work

When I try to launch the gazebo + nav2 simulation, it throws an exception: package 'pal_nav2_bringup' not found

Full output:

:~/pmb2_public_ws$ ros2 launch pmb2_gazebo pmb2_gazebo.launch.py is_public_sim:=true navigation:=true
[INFO] [launch]: All log files can be found below /home/chroma/.ros/log/2024-05-06-11-41-37-930086-chroma-HP-ProBook-650-G2-8794
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): "package 'pal_nav2_bringup' not found, searching: ['/home/chroma/pmb2_public_ws/install/urdf_test', '/home/chroma/pmb2_public_ws/install/pmb2_simulation', '/home/chroma/pmb2_public_ws/install/pmb2_robot', '/home/chroma/pmb2_public_ws/install/pmb2_navigation', '/home/chroma/pmb2_public_ws/install/pmb2_gazebo', '/home/chroma/pmb2_public_ws/install/pmb2_2dnav', '/home/chroma/pmb2_public_ws/install/pmb2_laser_sensors', '/home/chroma/pmb2_public_ws/install/pmb2_bringup', '/home/chroma/pmb2_public_ws/install/pmb2_description', '/home/chroma/pmb2_public_ws/install/pmb2_controller_configuration', '/home/chroma/pmb2_public_ws/install/pal_navigation_cfg', '/home/chroma/pmb2_public_ws/install/pal_navigation_cfg_bringup', '/home/chroma/pmb2_public_ws/install/pal_navigation_cfg_params', '/home/chroma/pmb2_public_ws/install/pal_maps', '/home/chroma/pmb2_public_ws/install/pal_gazebo_worlds', '/home/chroma/pmb2_public_ws/install/launch_pal', '/opt/ros/humble']"

How can I install the missing package? Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.