Giter Club home page Giter Club logo

rosbot_ros's Introduction

Rosbot ROS

ROS2 packages for ROSbot 2R and ROSbot 2 PRO.

ROS packages

rosbot

Metapackage that contains dependencies to other repositories.

rosbot_bringup

Package that contains launch, which starts all base functionalities. Also configuration for robot_localization and ros2_controllers are defined there.

rosbot_description

URDF model used as a source of transforms on the physical robot. It was written to be compatible with ROS Industrial and preconfigured for ROS2 control.

rosbot_gazebo

Launch files for Ignition Gazebo working with ROS2 control.

rosbot_controller

ROS2 hardware controllers configuration for ROSbots.

ROS API

Available in ROS_API.md

Usage on hardware

To run the software on real ROSbot 2R, 2 PRO, also communication with the CORE2 will be necessary. First update your firmware to make sure that you use the latest version, then run the micro-ROS agent. For detailed instructions refer to the rosbot_ros2_firmware repository.

Source build

Prerequisites

Install all necessary tools:

sudo apt-get update
sudo apt-get install -y python3-pip ros-dev-tools stm32flash

Create workspace folder and clone rosbot_ros repository:

mkdir -p ros2_ws/src
cd ros2_ws
git clone https://github.com/husarion/rosbot_ros src/

Build and run on hardware

Building:

export HUSARION_ROS_BUILD=hardware

source /opt/ros/$ROS_DISTRO/setup.bash

vcs import src < src/rosbot/rosbot_hardware.repos

# Build only diff_drive_controller and imu_sensor_broadcaster from ros2_controllers
cp -r src/ros2_controllers/diff_drive_controller src && cp -r src/ros2_controllers/imu_sensor_broadcaster src && rm -rf src/ros2_controllers

rm -r src/rosbot_gazebo

sudo rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Flash firmware:

source install/setup.bash
ros2 run rosbot_utils flash_firmware

Running:

source install/setup.bash
ros2 launch rosbot_bringup combined.launch.py

Build and run Gazebo simulation

Prerequisites:

Tip

The default version of Gazebo Ignition will be installed with the instructions below. If you want to install a different version of the simulator, it is necessary to:

If you have installed multiple versions of Gazebo use the global variable to select the correct one:

export GZ_VERSION=fortress

Building:

export HUSARION_ROS_BUILD=simulation

source /opt/ros/$ROS_DISTRO/setup.bash

vcs import src < src/rosbot/rosbot_hardware.repos
vcs import src < src/rosbot/rosbot_simulation.repos

# Build only diff_drive_controller and imu_sensor_broadcaster from ros2_controllers
cp -r src/ros2_controllers/diff_drive_controller src && cp -r src/ros2_controllers/imu_sensor_broadcaster src && rm -rf src/ros2_controllers

sudo rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Running:

source install/setup.bash
ros2 launch rosbot_gazebo simulation.launch.py

Developer info

pre-commit

pre-commit configuration prepares plenty of tests helping for developing and contributing. Usage:

# install pre-commit
pip install pre-commit

# initialize pre-commit workspace
pre-commit install

# manually run tests
pre-commit run -a

After initialization pre-commit configuration will applied on every commit.

Industrial CI

colcon test

Note

Command colcon test does not build the code. Remember to build your code after changes.

If tests finish with errors print logs:

colcon test-result --verbose

Format python code with Black

cd src/
black rosbot*

Testing .github/workflows/industrial_ci.yaml Locally

At fist install act:

cd /
curl -s https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash

And test the workflow with:

act -W .github/workflows/industrial_ci.yaml

Demo

Below you can find demos with ROSbots:

link description
rosbot-docker Simple example how to drive ROSbot with teleop_twist_keyboard using docker
rosbot-sensors Visualize all ROSbot sensors
rosbot-gamepad Stream a live video from Orbbec Astra to a window on your PC. Control the robot using teleop-twist-keyboard
rosbot-telepresence Stream a live video from Orbbec Astra to a window on your PC. Control the robot using teleop-twist-keyboard
rosbot-autonomy A combination of mapping and navigation projects allowing simultaneous mapping and navigation in unknown environments.

rosbot_ros's People

Contributors

adamkrawczyk avatar delihus avatar dominikn avatar hubert424 avatar kamilmachon avatar karolk99 avatar kmakd avatar kotochleb avatar lukaszmitka avatar macstepien avatar pkowalsk1 avatar rafal-gorecki avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rosbot_ros's Issues

IMU joint position in rosbot

Hi,

I was trying to integrate imu on ROSBOT, but the joint location to which I'm adding is incorrect due to which on doing sensor fusion using EKF, the robot starts to shake in rviz. So, could anyone help me in adding the imu at the correct location?

Force stop the rosbot

Is there a way to force stop the rosbot? On an uneven surface, the rosbot gets stuck and doesn't accept zero velocity commands?

Also, a way to override the last velocity command will work!

canTransform: source_frame base_link does not exist

Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_link does not exist.. canTransform returned after 0.100076 timeout was 0.1.

Cannot flash new firmware

Rosbot-2R (ROS2 Humble)

With the command as detailed in the procedure:

ros2 launch rosbot_utils flash_firmware

The response below is seen:

file 'flash_firmware' was not found in the share directory of package 'rosbot_utils' which is at '/home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils'

Any suggestions?

camera latency

I am using the husarion rosbot 2R and there is significant delay in the image from the camera when running RViz. What should I do to reduce the latency?

Using on ROS melodic

Can i use this directly on ros melodic (tried once which did not work) or do i need any modifications? Thanks

Set versions of repositorys in .repos file to a tag or commit instead of branches

Hello,

currently I am setting up a lab at a university.
Problem is, we dont always want the latest version but get a stable version going and then update once in a while and fix the problem that come with it.
But this does not work with the rosbot_hardware.repos and rosbot_simulation.repos files in this repository.
I can try to use an older version of the rosbot_ros repository but due to the .repos file selecting the branch it will always pick the latest version.
In my opinion it would be much better to set the repositories in the .repos-files to a fixed tag or commit.
This would allow for cloning the rosbot_ros repo with an older version and also get the dependencies with the version that worked together.

I am looking forward hearing your view on this.
Currently, the only option I see for me is to clone each repo manually or edit the .repos-files.

Best regards
Heenne

Invalid parameter "use_gpu"

When I launch ros2 launch rosbot_gazebo simulation.launch.py I keep getting this error. Anyone have any insights?

[INFO] [launch.user]: Launching namespace= init_pose={'x': '0.0', 'y': '2.0', 'z': '0.0', 'roll': '0.0', 'pitch': '0.0', 'yaw': '0.0'}
[ERROR] [launch]: Caught exception in launch (see debug for traceback): executed command failed. Command: /opt/ros/humble/bin/xacro /root/ros_workspace/install/rosbot_description/share/rosbot_description/urdf/rosbot.urdf.xacro mecanum:=False use_sim:=True use_gpu:=True simulation_engine:=ignition-gazebo namespace:=
Captured stderr output: error: Invalid parameter "use_gpu"
when instantiating macro: slamtec_rplidar_a2 (/root/ros_workspace/install/ros_components_description/share/ros_components_description/urdf/slamtec_rplidar_a2.urdf.xacro)
in file: /root/ros_workspace/install/rosbot_description/share/rosbot_description/urdf/rosbot.urdf.xacro

Depth Camera Limit

Hello. While I was working with depth images that I got from this robot in ROS, I realized, depth is limited to about 5m. Is there any way to make this limit larger (or make it limitless)? Orbec Astra camera is used (the one from the URDF file in repo, I did not change anything).

Problem launching Gazebo from docker

We followed the guidelines specified on your website (i.e., running the Gazebo docker and then running the ros2 launch command on the simulation.launch.py file). Unfortunately, Gazebo doesnโ€™t fully launch since we receive an error specifying that the simulation_launch_node doesnโ€™t exist. Our current solution to this is to run a compose script, running multiple images (including a bridge ros1 and ros2 image) and run with ros1. This makeshift solution seems like an overkill. Has anyone run into this issue? If so, how do we correct this?
Some more important notes:
** We are working with Husarionโ€™s Rosbot 2R.
** We are working with ros2.
** We are running this on a docker with a Gazebo image imported from the Husarion website

samples of laser scan data

Hi everyone,

I recently tested rosbot on gazebo in ROS2, i found my laser data topic only reture 400 samples.
I checked the size of scan->ranges, it also gives me 400.

But the sample numbers in rosbot.urdf file is set to 720.

Anyone can tell me where went wrong?

Many thanks your help

rosbot_bringup failure

Hi,

After building the repo and trying to run rosbot_bringup.launch.py i get the following error:

package not found: "package 'ros_components_description' not found

What am I doing wrong?

Thanks

Noetic Simulation

I followed the installation process for the simulations in Noetic, however when I run the final "catkin cmake" command, the workspace is not built as it says that the folders: "rosbot_bringup", "rosbot_controller", "rosbot description", "rosbot" and "rosbot_gazebo" are homegenous folders.

How can I solve this issue please?

Thank you

Cannot lauch rosbot gazebo sim

Hello,
I tried launching the gazebo sim from the humble branch and always get the following error:

INFO] [launch]: All log files can be found below /home/fhcampus01/.ros/log/2023-04-10-15-01-24-096082-fh-campus-wien-01-9467 [INFO] [launch]: Default logging verbosity is set to INFO [ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: "package 'husarion_office_gz' not found, searching: ['/opt/ros/humble', '/home/fhcampus01/Documents/repos/rosbot/rosbot_ros/install/rosbot_gazebo', '/home/fhcampus01/Documents/repos/rosbot/rosbot_ros/install/rosbot', '/home/fhcampus01/Documents/repos/rosbot/rosbot_ros/install/rosbot_bringup', '/home/fhcampus01/Documents/repos/rosbot/rosbot_ros/install/rosbot_controller', '/home/fhcampus01/Documents/repos/rosbot/rosbot_ros/install/rosbot_description']"

Am I doing something wrong here is this a bug in the package?

multiple node names range

ROS2

In gazebo model instead of range sensors node names range_{fl/fr/rr/rl} there is only range four times

Robot initial position in Rviz / gazebo mismatched

Hello,

Thank you for this repo! Unfortunately, every time I try to run the demo using a saved map, the rviz coordinates of the robot do not match up to the ones in gazebo (the init_pos in gazebo is always the same). Obviously, the incorrect init_pos leads to errors in localization.

berp

IMU in Gazebo Fortress not working

After updating the rosbot_ros repository for our simulation lab I noticed, that the topic /odometry/filtered returns weird values.
But only in the yaw entry, x and y worked fine.
My first test was to let the robot rotate with 0.1 rad/s around its z-axis.
When looking at the filtered odometry values they appeared to have lost the integrating behaviour and only returned the angular velocity commanded divided by 2. So for 0.1 rad/s commanded it results in 0.05 rad/s on the filtered odometry.
After looking a little deeper I found the IMU to be the culprit. When I remove the IMU from the ekf.yaml file the filtered odometry works fine.
I then had the yaw change dynamically to see if there is a change in value on the imu_broadcaster/imu topic. But all values on the topic are static in the new version (unlike in the old one).
As there are no real differences in the ekf.yaml to the old version I was using I found, that the description of the plugin in the rosbot_macro.urdf.xacro is missing.
When I insert the following line into that file in line 144 the IMU and also the filtered odometry is working again:
<plugin filename="ignition-gazebo-imu-system" name="ignition::gazebo::systems::Imu"></plugin>

Here the full IMU description:

<gazebo reference="imu_link">
          <sensor name="${namespace_ext}imu" type="imu">
            <!-- <plugin filename="ignition-gazebo-imu-system" name="ignition::gazebo::systems::Imu"></plugin> -->
            <always_on>true</always_on>
            <update_rate>25</update_rate>
            <topic>${namespace_ext}imu/data_raw</topic>
            <visualize>false</visualize>
            <enable_metrics>false</enable_metrics>
            <frame_id>imu_link</frame_id>
            <ignition_frame_id>imu_link</ignition_frame_id>
            <ros>
              <namespace>${namespace_ext}</namespace>
            </ros>
          </sensor>
        </gazebo>

I would love to hear some feedback if I have done something wrong when updating and this plugin-tag was deleted intentional or if it is just missing and must be inserted again.

Thanks. Best regards
Heenne

migration from ignition

Hi,

I was trying to use the available code you have with some plugins that we wrote and realized that the supported controller is written for ignition and not Gazebo sim. I was wondering if you guys have any plans in the near future to port the code for Gazebo sim. The following link might be useful.

https://gazebosim.org/docs/garden/migration_from_ignition

Thank you so much for your time in advance. If this happens, it is very helpful for our research.

missing link for depth camera in simulation, broken robot_description

I am simulating the ROSBOT2 in humble, using the docker image provided, and using the simulation.launch.py provided as well in the repo. When I launch the simulation, everything works correctly, except the depth camera, which appears to be missing a link to the rest of the robot.
The depth camera has created its own tree: /rosbot/base_link/orbbec_astra_camera. Instead of using the depth link to publish.
image
image

Robot_description is also broken, as it can be seen in the image. I tried with rviz2 as well and it simply doesn't display the robot.
I solved the first issue by manually linking both frames in the /tf_static topic, but this should be corrected.
I include the generated urdf from doing xacro /ros2_ws/src/rosbot_description/urdf/rosbot.urdf.xacro:

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from /ros2_ws/src/rosbot_description/urdf/rosbot.urdf.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="rosbot">
  <link name="base_link"/>
  <joint name="base_to_body_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0425"/>
    <parent link="base_link"/>
    <child link="body_link"/>
  </joint>
  <link name="body_link">
    <visual>
      <geometry>
        <mesh filename="file:///ros2_ws/install/rosbot_description/share/rosbot_description/meshes/body.stl" scale="0.001 0.001 0.001"/>
      </geometry>
      <origin rpy="1.5707963267948966 0.0 1.5707963267948966" xyz="0.0 0.0 -0.0173"/>
      <material name="White">
        <color rgba="1.0 1.0 1.0 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.197 0.150 0.080"/>
      </geometry>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.02"/>
    </collision>
    <inertial>
      <mass value="1.728"/>
      <inertia ixx="0.004162" ixy="0.0" ixz="0.0" iyy="0.00651" iyz="0.0" izz="0.008828"/>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.02"/>
    </inertial>
  </link>
  <gazebo reference="body_link">
    <material>Gazebo/White</material>
  </gazebo>
  <joint name="body_to_cover_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0603"/>
    <parent link="body_link"/>
    <child link="cover_link"/>
  </joint>
  <link name="cover_link">
    <visual>
      <geometry>
        <mesh filename="file:///ros2_ws/install/rosbot_description/share/rosbot_description/meshes/cover.stl" scale="0.001 0.001 0.001"/>
      </geometry>
      <origin rpy="1.5707963267948966 0.0 1.5707963267948966" xyz="0.0 0.0 -0.002"/>
      <material name="Red">
        <color rgba="0.8 0.0 0.0 1.0"/>
      </material>
    </visual>
    <gazebo reference="cover_link">
      <material>Gazebo/Red</material>
    </gazebo>
  </link>
  <joint name="body_to_imu_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="0.003 -0.0495 0.04332"/>
    <parent link="body_link"/>
    <child link="imu_link"/>
  </joint>
  <link name="imu_link"/>
  <joint name="body_to_camera_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="-0.0141 0.0 0.125"/>
    <parent link="body_link"/>
    <child link="camera_link"/>
  </joint>
  <link name="camera_link"/>
  <joint name="body_link_fl_range_joint" type="fixed">
    <origin rpy="0.0 0.0 0.2181661564992912" xyz="0.0926  0.05 0.015"/>
    <parent link="body_link"/>
    <child link="fl_range"/>
  </joint>
  <link name="fl_range"/>
  <joint name="body_link_fr_range_joint" type="fixed">
    <origin rpy="0.0 0.0 -0.2181661564992912" xyz="0.0926 -0.05 0.015"/>
    <parent link="body_link"/>
    <child link="fr_range"/>
  </joint>
  <link name="fr_range"/>
  <joint name="body_link_rl_range_joint" type="fixed">
    <origin rpy="0.0 0.0 2.923426497090502" xyz="-0.0926 0.05 0.0115"/>
    <parent link="body_link"/>
    <child link="rl_range"/>
  </joint>
  <link name="rl_range"/>
  <joint name="body_link_rr_range_joint" type="fixed">
    <origin rpy="0.0 0.0 3.3597588100890845" xyz="-0.0926 -0.05 0.0115"/>
    <parent link="body_link"/>
    <child link="rr_range"/>
  </joint>
  <link name="rr_range"/>
  <joint name="fr_wheel_joint" type="continuous">
    <parent link="body_link"/>
    <child link="fr_wheel_link"/>
    <origin rpy="0.0 0.0 0.0" xyz="0.053 -0.096 0.0"/>
    <axis xyz="0.0 1.0 0.0"/>
    <limit effort="1.5" velocity="5.0"/>
    <dynamics damping="0.001" friction="0.001"/>
  </joint>
  <link name="fr_wheel_link">
    <visual>
      <geometry>
        <mesh filename="file:///ros2_ws/install/rosbot_description/share/rosbot_description/meshes/wheel_a.dae" scale="1.0 1.0 1.0"/>
      </geometry>
      <origin rpy="0.0 0.0 3.141592653589793" xyz="0.0 0.0 0.0"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.036" radius="0.0425"/>
      </geometry>
      <origin rpy="1.5707963267948966 0.0 0.0" xyz="0.0 0.0 0.0"/>
    </collision>
    <inertial>
      <mass value="0.074"/>
      <inertia ixx="4.1e-05" ixy="0.0" ixz="0.0" iyy="6.7e-05" iyz="0.0" izz="4.1e-05"/>
    </inertial>
  </link>
  <gazebo reference="fr_wheel_link" xmlns:ignition="http://ignitionrobotics.org/schema">
    <collision>
      <surface>
        <friction>
          <ode>
            <mu>1.0</mu>
            <mu2>0.0</mu2>
            <fdir1 ignition:expressed_in="base_link">1.0 1.0 0.0</fdir1>
          </ode>
        </friction>
      </surface>
    </collision>
  </gazebo>
  <joint name="fl_wheel_joint" type="continuous">
    <parent link="body_link"/>
    <child link="fl_wheel_link"/>
    <origin rpy="0.0 0.0 0.0" xyz="0.053 0.096 0.0"/>
    <axis xyz="0.0 1.0 0.0"/>
    <limit effort="1.5" velocity="5.0"/>
    <dynamics damping="0.001" friction="0.001"/>
  </joint>
  <link name="fl_wheel_link">
    <visual>
      <geometry>
        <mesh filename="file:///ros2_ws/install/rosbot_description/share/rosbot_description/meshes/wheel_b.dae" scale="1.0 1.0 1.0"/>
      </geometry>
      <origin rpy="0.0 0.0 3.141592653589793" xyz="0.0 0.0 0.0"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.036" radius="0.0425"/>
      </geometry>
      <origin rpy="1.5707963267948966 0.0 0.0" xyz="0.0 0.0 0.0"/>
    </collision>
    <inertial>
      <mass value="0.074"/>
      <inertia ixx="4.1e-05" ixy="0.0" ixz="0.0" iyy="6.7e-05" iyz="0.0" izz="4.1e-05"/>
    </inertial>
  </link>
  <gazebo reference="fl_wheel_link" xmlns:ignition="http://ignitionrobotics.org/schema">
    <collision>
      <surface>
        <friction>
          <ode>
            <mu>1.0</mu>
            <mu2>0.0</mu2>
            <fdir1 ignition:expressed_in="base_link">1.0 -1.0 0.0</fdir1>
          </ode>
        </friction>
      </surface>
    </collision>
  </gazebo>
  <joint name="rl_wheel_joint" type="continuous">
    <parent link="body_link"/>
    <child link="rl_wheel_link"/>
    <origin rpy="0.0 0.0 0.0" xyz="-0.053 0.096 0.0"/>
    <axis xyz="0.0 1.0 0.0"/>
    <limit effort="1.5" velocity="5.0"/>
    <dynamics damping="0.001" friction="0.001"/>
  </joint>
  <link name="rl_wheel_link">
    <visual>
      <geometry>
        <mesh filename="file:///ros2_ws/install/rosbot_description/share/rosbot_description/meshes/wheel_a.dae" scale="1.0 1.0 1.0"/>
      </geometry>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.036" radius="0.0425"/>
      </geometry>
      <origin rpy="1.5707963267948966 0.0 0.0" xyz="0.0 0.0 0.0"/>
    </collision>
    <inertial>
      <mass value="0.074"/>
      <inertia ixx="4.1e-05" ixy="0.0" ixz="0.0" iyy="6.7e-05" iyz="0.0" izz="4.1e-05"/>
    </inertial>
  </link>
  <gazebo reference="rl_wheel_link" xmlns:ignition="http://ignitionrobotics.org/schema">
    <collision>
      <surface>
        <friction>
          <ode>
            <mu>1.0</mu>
            <mu2>0.0</mu2>
            <fdir1 ignition:expressed_in="base_link">1.0 1.0 0.0</fdir1>
          </ode>
        </friction>
      </surface>
    </collision>
  </gazebo>
  <joint name="rr_wheel_joint" type="continuous">
    <parent link="body_link"/>
    <child link="rr_wheel_link"/>
    <origin rpy="0.0 0.0 0.0" xyz="-0.053 -0.096 0.0"/>
    <axis xyz="0.0 1.0 0.0"/>
    <limit effort="1.5" velocity="5.0"/>
    <dynamics damping="0.001" friction="0.001"/>
  </joint>
  <link name="rr_wheel_link">
    <visual>
      <geometry>
        <mesh filename="file:///ros2_ws/install/rosbot_description/share/rosbot_description/meshes/wheel_b.dae" scale="1.0 1.0 1.0"/>
      </geometry>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.036" radius="0.0425"/>
      </geometry>
      <origin rpy="1.5707963267948966 0.0 0.0" xyz="0.0 0.0 0.0"/>
    </collision>
    <inertial>
      <mass value="0.074"/>
      <inertia ixx="4.1e-05" ixy="0.0" ixz="0.0" iyy="6.7e-05" iyz="0.0" izz="4.1e-05"/>
    </inertial>
  </link>
  <gazebo reference="rr_wheel_link" xmlns:ignition="http://ignitionrobotics.org/schema">
    <collision>
      <surface>
        <friction>
          <ode>
            <mu>1.0</mu>
            <mu2>0.0</mu2>
            <fdir1 ignition:expressed_in="base_link">1.0 -1.0 0.0</fdir1>
          </ode>
        </friction>
      </surface>
    </collision>
  </gazebo>
  <ros2_control name="imu" type="sensor">
    <hardware>
      <plugin>rosbot_hardware_interfaces/RosbotImuSensor</plugin>
      <param name="connection_timeout_ms">120000</param>
      <param name="connection_check_period_ms">500</param>
    </hardware>
    <sensor name="imu">
      <state_interface name="orientation.x"/>
      <state_interface name="orientation.y"/>
      <state_interface name="orientation.z"/>
      <state_interface name="orientation.w"/>
      <state_interface name="angular_velocity.x"/>
      <state_interface name="angular_velocity.y"/>
      <state_interface name="angular_velocity.z"/>
      <state_interface name="linear_acceleration.x"/>
      <state_interface name="linear_acceleration.y"/>
      <state_interface name="linear_acceleration.z"/>
    </sensor>
  </ros2_control>
  <ros2_control name="wheels" type="system">
    <hardware>
      <plugin>rosbot_hardware_interfaces/RosbotSystem</plugin>
      <param name="connection_timeout_ms">120000</param>
      <param name="connection_check_period_ms">500</param>
      <!-- order of velocity commands to be published in motors_cmd Float32MultiArray msg -->
      <param name="velocity_command_joint_order">
                rr_wheel_joint,
                rl_wheel_joint,
                fr_wheel_joint,
                fl_wheel_joint
          </param>
    </hardware>
    <joint name="fl_wheel_joint">
      <command_interface name="velocity"/>
      <state_interface name="position"/>
      <state_interface name="velocity"/>
    </joint>
    <joint name="fr_wheel_joint">
      <command_interface name="velocity"/>
      <state_interface name="position"/>
      <state_interface name="velocity"/>
    </joint>
    <joint name="rl_wheel_joint">
      <command_interface name="velocity"/>
      <state_interface name="position"/>
      <state_interface name="velocity"/>
    </joint>
    <joint name="rr_wheel_joint">
      <command_interface name="velocity"/>
      <state_interface name="position"/>
      <state_interface name="velocity"/>
    </joint>
  </ros2_control>
  <joint name="cover_to_slamtec_rplidar_a2_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="0.02 0.0 0.0"/>
    <parent link="cover_link"/>
    <child link="slamtec_rplidar_a2_link"/>
  </joint>
  <link name="slamtec_rplidar_a2_link">
    <visual>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
      <geometry>
        <mesh filename="file:///ros2_ws/install/ros_components_description/share/ros_components_description/meshes/slamtec_rplidar_ax.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0205"/>
      <geometry>
        <cylinder length="0.041" radius="0.038"/>
      </geometry>
    </collision>
    <inertial>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0205"/>
      <mass value="0.190"/>
      <inertia ixx="0.000095206" ixy="0.0" ixz="0.0" iyy="0.000095206" iyz="0.0" izz="0.00013718"/>
    </inertial>
  </link>
  <joint name="slamtec_rplidar_a2_to_laser_joint" type="fixed">
    <origin rpy="0.0 0.0 3.141592653589793" xyz="0.0 0.0 0.031"/>
    <parent link="slamtec_rplidar_a2_link"/>
    <child link="laser"/>
  </joint>
  <link name="laser"/>
  <joint name="camera_to_orbbec_astra_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
    <parent link="camera_link"/>
    <child link="orbbec_astra_link"/>
  </joint>
  <link name="orbbec_astra_link">
    <visual>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
      <geometry>
        <mesh filename="file:///ros2_ws/install/ros_components_description/share/ros_components_description/meshes/orbbec_astra.dae"/>
      </geometry>
    </visual>
    <!-- camera module collision -->
    <collision>
      <origin rpy="0.0 0.0 0.0" xyz="0.0024999999999999988 0.0 0.034"/>
      <geometry>
        <box size="0.04 0.165 0.03"/>
      </geometry>
    </collision>
    <!-- mounting base model collision -->
    <collision>
      <origin rpy="0.0 0.0 0.0" xyz="-0.006499999999999999 0.0 0.0095"/>
      <geometry>
        <box size="0.06 0.06 0.019"/>
      </geometry>
    </collision>
    <inertial>
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.028999999999999998"/>
      <mass value="0.300"/>
      <inertia ixx="0.00073916" ixy="0.0" ixz="0.0" iyy="0.00015435" iyz="0.0" izz="0.00077395"/>
    </inertial>
  </link>
  <joint name="orbbec_astra_to_depth_joint" type="fixed">
    <origin rpy="-1.5707963267948966 0.0 -1.5707963267948966" xyz="0.01 0.0 0.035"/>
    <parent link="orbbec_astra_link"/>
    <child link="depth"/>
  </joint>
  <link name="depth"/>
</robot>

Launching ROS2 branch in simulation

I am currently having issues running the ROS2 branch of rosbot_description. I just set up a desktop with ubuntu 20.04 and freshly installed ROS2 Foxy. I followed the instructions on your README for pulling code and was able to build both the rosbot_description and rplidar_ros. There were some warnings regarding rplidar_ros but it was able to successfully build. When I try to launch the demo though, the terminal seems to hang up and never successfully launches gazebo. I have fixed some warnings regarding launch files utilizing node_executable to executable, but otherwise I have made no changes to the repository. The output when launching the demo is below. Please let me know if you have any advice on why this might be occurring.

$ ros2 launch rosbot_description rosbot_sim.launch.py

[INFO] [launch]: All log files can be found below /home/datavantyx/.ros/log/2021-01-14-10-34-25-943770-modern-times-74950
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [74952]
[INFO] [static_transform_publisher-2]: process started with pid [74954]
[INFO] [static_transform_publisher-3]: process started with pid [74956]
[INFO] [static_transform_publisher-4]: process started with pid [74959]
[INFO] [spawn_entity.py-5]: process started with pid [74961]
[static_transform_publisher-3] [INFO] [1610649266.249930610] [static_transform_publisher_eOqJMARNOEKdOsVO]: Spinning until killed publishing transform from 'base_link' to 'camera_link'
[static_transform_publisher-2] [INFO] [1610649266.250159112] [static_transform_publisher_SOBhqAQgzaHy6nOB]: Spinning until killed publishing transform from 'camera_link' to 'camera_depth_frame'
[static_transform_publisher-4] [INFO] [1610649266.250174536] [static_transform_publisher_6cZ7lSiFaPCHbIij]: Spinning until killed publishing transform from 'base_link' to 'laser'
[gzserver-1] Gazebo multi-robot simulator, version 11.1.0
[gzserver-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gzserver-1] Released under the Apache 2 License.
[gzserver-1] http://gazebosim.org
[gzserver-1]
[spawn_entity.py-5] [INFO] [1610649266.546508018] [spawn_entity]: Spawn Entity started
[spawn_entity.py-5] [INFO] [1610649266.546879672] [spawn_entity]: Loading entity XML from file /home/datavantyx/Documents/ros2_devel_workspace/cap/install/rosbot_description/share/rosbot_description/models/rosbot.sdf
[spawn_entity.py-5] [INFO] [1610649266.551132271] [spawn_entity]: Waiting for service /spawn_entity, timeout = 5
[spawn_entity.py-5] [INFO] [1610649266.551571638] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-5] [INFO] [1610649267.056207064] [spawn_entity]: Calling service /spawn_entity
[gzserver-1] [INFO] [1610649267.276457121] [imu_plugin]: <initial_orientation_as_reference> is unset, using default value of false to comply with REP 145 (world as orientation reference)
[gzserver-1] [INFO] [1610649267.505322972] [astra_camera]: Publishing camera info to [/camera/camera_info]
[gzserver-1] [INFO] [1610649267.506120171] [astra_camera]: Publishing depth camera info to [/camera/depth/camera_info]
[gzserver-1] [INFO] [1610649267.507336667] [astra_camera]: Publishing pointcloud to [/camera/points]
[gzserver-1] [INFO] [1610649267.529731823] [range]: missing <radiation_type>, defaulting to infrared
[gzserver-1] [WARN] [1610649267.531095107] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-1] [INFO] [1610649267.534160022] [range]: missing <radiation_type>, defaulting to infrared
[gzserver-1] [WARN] [1610649267.535568638] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-1] [INFO] [1610649267.539199000] [range]: missing <radiation_type>, defaulting to infrared
[gzserver-1] [WARN] [1610649267.540716006] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-1] [Msg] Waiting for master.
[gzserver-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzserver-1] [Msg] Publicized address: 192.168.0.242
[gzserver-1] [Wrn] [msgs.cc:1841] Conversion of sensor type[depth] not supported.
[spawn_entity.py-5] [INFO] [1610649267.544146255] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [rosbot]
[gzserver-1] [INFO] [1610649267.544314015] [range]: missing <radiation_type>, defaulting to infrared
[gzserver-1] [Wrn] [ColladaLoader.cc:1853] Unable to add material[None-material]
[INFO] [spawn_entity.py-5]: process has finished cleanly [pid 74961]
[gzserver-1] [INFO] [1610649267.661996308] [skid_steer_drive]: Wheel pair 1 separation set to [0.240000m]
[gzserver-1] [INFO] [1610649267.662043922] [skid_steer_drive]: Wheel pair 2 separation set to [0.240000m]
[gzserver-1] [INFO] [1610649267.662054138] [skid_steer_drive]: Wheel pair 1 diameter set to [0.080000m]
[gzserver-1] [INFO] [1610649267.662062777] [skid_steer_drive]: Wheel pair 2 diameter set to [0.080000m]
[gzserver-1] [INFO] [1610649267.665715971] [skid_steer_drive]: Subscribed to [/cmd_vel]
[gzserver-1] [INFO] [1610649267.667625861] [skid_steer_drive]: Advertise odometry on [/odom]
[gzserver-1] [INFO] [1610649267.669729468] [skid_steer_drive]: Publishing odom transforms between [odom] and [base_link]
[gzserver-1] [INFO] [1610649267.669756627] [skid_steer_drive]: Publishing wheel transforms between [base_link], [front_left_wheel_hinge] and [front_right_wheel_hinge]
[gzserver-1] [INFO] [1610649267.669764081] [skid_steer_drive]: Publishing wheel transforms between [base_link], [rear_left_wheel_hinge] and [rear_right_wheel_hinge]
[gzserver-1] [Wrn] [msgs.cc:1841] Conversion of sensor type[depth] not supported.

At this point nothing happens.

ModuleNotFoundError: No module named 're'

Hi I got this error on ROS Kinetic Ubuntu 16.04 with Anaconda and Python 3.6:

`roslaunch rosbot_description rosbot_rviz_gmapping.launch
... logging to /home/kinetic/.ros/log/b372e2d2-5b09-11eb-a3c8-000c29aa73a6/roslaunch-ubuntu-26232.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in
import xacro
File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/init.py", line 35, in
import glob
File "/home/kinetic/anaconda3/lib/python3.6/glob.py", line 4, in
import re
ModuleNotFoundError: No module named 're'
while processing /home/kinetic/catkin_ws/src/rosbot_description/src/rosbot_description/launch/rosbot_rviz.launch:
while processing /home/kinetic/catkin_ws/src/rosbot_description/src/rosbot_description/launch/rosbot.launch:
while processing /home/kinetic/catkin_ws/src/rosbot_description/src/rosbot_description/launch/rosbot_gazebo.launch:
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py '/home/kinetic/catkin_ws/src/rosbot_description/src/rosbot_description/urdf/rosbot.xacro'] returned with code [1].

Param xml is
The traceback for the exception was written to the log file
`

My goal is to use Python 3 inside my Anaconda Environment. As additional information the Turtlebot 3 Simulation work inside it.

Frame issue in Multi robot simulation

I am working on a multi robot simulation trying to set it up. I managed to get it to work but having issues with TF. following are my tf trees for each robot. Issues is, There are separate trees starting from,

odom -> baselink
rosbot1/baselink,
rosbot2/baselink,
rosbot3/baselink

where as i actually need is,
3 trees starting from

rosbot1/odom,
rosbot2/odom,
rosbot3/odom.

frames

single robot launch file

<launch>
    <arg name="tf_prefix"/>
    <arg name="robot_name"/>
    <arg name="init_pose"/>

    <!-- Load the joint space controller -->
    <rosparam command="load" file="$(find joint_state_controller)/joint_state_controller.yaml" />
    <node name="joint_state_controller_spawner" pkg="controller_manager" type="spawner" output="screen" args="joint_state_controller" />

    <!-- Spawn the robot in the desired pose given by "init_pose" variable" -->
    <node name="rosbot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" args="$(arg init_pose) -urdf -param /robot_description -model $(arg robot_name) -robot_namespace $(arg tf_prefix)" respawn="false" />

    <!-- Spawn the robot_state_publisher with the desired tf_prefix -->
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen">
        <param name="tf_prefix" value="$(arg tf_prefix)"/>
    </node>

</launch>

Multi robot launch file

<launch>

    <!-- No namespace here as we will share this description. Access with slash at the beginning -->
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find rosbot_description)/urdf/rosbot.xacro'"/>

    <!-- BEGIN ROBOT 1-->
    <group ns="ROSbot1">
        <include file="$(find rosbot_description)/launch/single_rosbot.launch" >
            <arg name="init_pose" value="-x -10 -y -10 -z 0 -R 0 -P 0 -Y 0" />
            <arg name="robot_name"  value="ROSBot1" />
            <arg name="tf_prefix" value="rosbot1"/>
        </include>
    </group>

    <!-- BEGIN ROBOT 2-->
    <group ns="ROSbot2">
        <include file="$(find rosbot_description)/launch/single_rosbot.launch" >
            <arg name="init_pose" value="-x -10 -y 0 -z 0 -R 0 -P 0 -Y 0" />
            <arg name="robot_name"  value="ROSBot2" />
            <arg name="tf_prefix" value="rosbot2"/>
        </include>
    </group>

    <!-- BEGIN ROBOT 2-->
    <group ns="ROSbot3">
        <include file="$(find rosbot_description)/launch/single_rosbot.launch" >
            <arg name="init_pose" value="-x 0 -y -10 -z 0 -R 0 -P 0 -Y 0" />
            <arg name="robot_name"  value="ROSBot3" />
            <arg name="tf_prefix" value="rosbot3"/>
        </include>
    </group>

</launch>

what am i doing wrong?

Laser scan orientation

Hi, I want the laser to scan in vertical manner instead of horizontal so I just rotated the laser but it doesn't scan anymore, Can you tell how I can change the code so it scans in vertical direction?

Also, once i have generated a map for an environment, I am unable to scan again so for that should I delete the previous map ? If not, can you tell how to create multiple scan map files?

Lastly, while I am able to sucessfuly open the launch file in urdf and gazebo but I get thsi error in terminal:

`ERROR: cannot launch node of type [amcl/amcl]: amcl
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/lakshay/ros_catkin_ws/src
ROS path [2]=/home/lakshay/catkin_ws/src
ROS path [3]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [move_base/move_base]: move_base
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/lakshay/ros_catkin_ws/src
ROS path [2]=/home/lakshay/catkin_ws/src
ROS path [3]=/opt/ros/kinetic/share

`
And this error in Rviz under maps:

Transform
No transform from [map] to [odom]

Cannot launch simulations

Hello, I'm trying to launch the simulations for the RosBot on ROS 2 Foxy, but even I have a fresh installation of Ubuntu and ROS2, I can't launch the simulations.

I have installed the packages as the tutorial explains:

cd ~/ros2_workspace/src
git clone --single-branch --branch foxy https://github.com/husarion/rosbot_description.git
git clone --single-branch --branch ros2 https://github.com/lukaszmitka/rplidar_ros.git
cd ~/ros2_workspace
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
source ~/ros2_workspace/install/setup.sh

And to run the simulation:

ros2 launch rosbot_description navigation_demo_sim.launch.py

But, then no RViz or Gazebo windows is shown and I get this error:

[Err] [RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?
[gzclient --verbose  -2] [Err] [RenderEngine.cc:197] Failed to initialize scene
[gzclient --verbose  -2] [Err] [GLWidget.cc:177] GLWidget could not create a scene. This will likely result in a blank screen.
[gzclient --verbose  -2] gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:734: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed.
[gzclient --verbose  -2] Aborted (core dumped)
[ERROR] [gzclient --verbose  -2]: process has died [pid 39341, exit code 134, cmd 'gzclient --verbose  '].
[gzclient --verbose  -2]

I have try to add this variable: export GAZEBO_RESOURCE_PATH=/usr/share/gazebo-11.0 but still the same error.

Running Ros2 Humble simulation for the Rosbot with ignition-gazebo

I have been unsuccessfully trying to run an ignition-gazebo simulation of the rosbot and would like to ask for assistance. In my workspace I have succesfully built the following packages:
-ros_components_description
-rosbot_hardware_interfaces
-ign_ros2_control
-husarion_office_gz
-ign_ros2_control_demos
-rosbot_description
-rosbot_controller
-rosbot_bringup
-rosbot
-rosbot-gazebo
I have tried launching I have changed a couple of the default values of launch arguments in the launch files bringup.launch.py and controller.launch.py as such:
-use_sim: True
-simulation_engine: ignition-gazebo

I have tried this both with the main branch and the add-mecanum-wheels branch but got the same result with both: once I ros2 launch rosbot_bringup bringup.launch.py, I get the following message:
[spawner-2] [INFO] [1682588256.303546245] [spawner_joint_state_broadcaster]: Waiting for '/simulation_controller_manager' node to exist

and nothing else happens

I would appreciate any input or suggestions on what I might be getting wrong

Issue seeing topics in topic list ROS1 vs ROS2

We are currently running Gazebo through running the following .yaml file in a composed (i.e., running multiple images simultaneously) fashion:

services:
ros-master:
image: ros:noetic-ros-core

network_mode: host

  command: stdbuf -o L roscore
  
bridge:
  image: husarion/ros:galactic-ros1-bridge

network_mode: host

  environment:
    - ROS_MASTER_URI=http://ros-master:11311
  command: ros2 run ros1_bridge dynamic_bridge

rosbot_simulation:
  image: husarion/rosbot:noetic-simulation

network_mode: host

  volumes:
    - /tmp/.X11-unix:/tmp/.X11-unix:rw
    - $HOME:$HOME
  environment:
    - DISPLAY=${DISPLAY:?err}
    - LIBGL_ALWAYS_SOFTWARE=1
    - ROS_MASTER_URI=http://ros-master:11311
  command: >
    roslaunch --wait rosbot_bringup rosbot.launch 
      world:=/ros_ws/src/rosbot_gazebo/worlds/delete.world    

When attaching to the different dockers running, we can only see the topics published by the simulated robot in the ROS1 images. Meaning, we are unable to see the topics published in any of the ROS2 oriented images. This is a problem given that we would like to run ROS2 toolboxes, but given that the topics published by the simulated robot do not appear in ROS2 images, when attaching to these dockers, we are unable to run the toolboxes on the relevant information.

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.