Category Archives: ros

ROS2 on Parallels unable to be reached by other nodes

Hi everyone,

I’ve been messing around with ROS2 on a RaspberryPi and a Mac using Parallels to run Ubuntu. I hit a small snag when trying to get the nodes to communicate. The nodes on the RaspberryPi could not reach the ones being hosted on Ubuntu (Parallels).

While I initially assumed that I had messed up my ROS workspaces, it turned out to be a problem with my Parallels config. I was using a shared network. Switching to bridged immediately resolved the issue.

Gazebo classic material colors not working in Gazebo Ignition

Hi everyone,

I’m doing a few tutorials to simulate a lidar based navigation system and I’ve hit a few issues when trying to use Gazebo classic features in Gazebo Ignition.

A recent one is that Gazebo Ignition was ignoring the material colours that I’d specified in my urdf. This is an example of what was working in Gazebo classic:

    <gazebo reference="left_wheel">
        <material>Gazebo/Blue</material>
    </gazebo> 

This Github issue revealed the following format that can be used instead:

     <gazebo reference="chassis">
        <visual>
            <material>
                <ambient>0 0 1 1</ambient>
                <diffuse>0 0 1 1</diffuse>
                <specular>0 0 1 1</specular>
            </material>
        </visual>
    </gazebo>

Once updated, Gazebo ignition finally started rendering my material colors:

Gazebo Classic to Gazebo Ignition Diff Drive Conversion

Hi everyone,

I’m currently following some ros2 tutorials for simulating a diff drive robot in Gazebo Classic. I’m using Gazebo Ignition and unfortunately the definitions aren’t interchangeable.

Just in case anyone else hits the same issue, this is the definition I ended up using instead:

        <plugin
            filename="libignition-gazebo-diff-drive-system.so"
            name="ignition::gazebo::systems::DiffDrive"
        >
            <!-- Wheel info: https://youtu.be/IjFcr5r0nMs?t=876 -->
            <left_joint>left_wheel_joint</left_joint>
            <right_joint>right_wheel_joint</right_joint>
            <wheel_separation>0.35</wheel_separation>
            <wheel_diameter>0.1</wheel_diameter>

            <!-- Limits -->
            <max_wheel_torque>200</max_wheel_torque>
            <max_wheel_acceleration>10.0</max_wheel_acceleration>

            <!-- Output -->
            <odometry_frame>odom</odometry_frame>
            <robot_base_frame>base_link</robot_base_frame>

            <publish_odom>true</publish_odom>
            <publish_odom_tf>true</publish_odom_tf>
            <publish_wheel_tf>true</publish_wheel_tf>

        </plugin>

The following links were pretty helpful when it came to tracking down the differences:
https://github.com/chapulina/dolly/issues/28
https://github.com/gazebosim/gz-sim/blob/main/examples/worlds/visualize_lidar.sd

Spawn entity timeout in Gazebo from Ros2

Hi everyone,

I’m currently following a tutorial to simulate a fairly basic lidar robot with ROS2 and Gazebo: https://www.youtube.com/watch?v=laWn7_cj434. Unfortunately, there have been a few updates since the tutorial was created and a number of the commands don’t map 1:1 (no copy and paste).

While trying to create a launch file I ran into the following error:

[create-3] [ERROR] [1668289712.483268807] [ros_gz_sim]: Request to create entity from service [/world/deafult/create] timed out.

This was the relevant line in the launch file:

# Run the spawner node from the gazebo_ros package. The entity name doesn't really matter if you only have a single robot.
spawn_entity = Node(package='ros_ign_gazebo', executable='create',
arguments=[
'-world', 'deafult',
'-topic', 'robot_description',
'-entity', 'my_bot'],
output='screen')

The issue causing it to hang is that the world doesn’t exist. In my case, it’s because of a typo. However, if you’ve defined a world that you haven’t created yet it will result in the same error.

libgl error pic id driver null – ros2 turtlesim

Hi everyone,

I’m currently following the ros2 turtlesim tutorial with Ubuntu on an M1 Mac with Parallels and Ubuntu. Unfortunately, I hit a ‘device not found’ when trying to start the control node.

A bit of Googling revealed that 3D acceleration might not be enabled. To fix this, all you need to do is the following:

  • Open settings in Parallels (the cog icon)
  • Click the Hardware tab up the top
  • Click Graphics on the left hand side
  • Click Advanced
  • Tick Enable 3D Acceleration

You’ll need to restart the VM, but once that’s done the libgl error should be resolved!

If this doesn’t work, there are a few other things you can check. First, double check that you’ve installed (or re-installed) Parallels Tools.

I have also found that the 3D Acceleration seems to randomly break or reset itself. If it hasn’t automatically unchecked itself, I’ve occasionally had to do the following to get it working again:

  • Stop the VM
  • Disable 3D Acceleration
  • Start the VM
  • Stop the VM
  • Enable 3D Acceleration
  • Start the VM

Another options mentioned in this thread is to set the following environment variable before starting rviz or gazebo:

export LIBGL_ALWAYS_SOFTWARE=1 

The Repository is not Signed – Ubuntu ros2 installation

Hi everyone,

I’m currently installing ros2 on Ubuntu (with Parallels) and ran into the following error:

Hit:1 http://au.ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Get:3 http://packages.ros.org/ros2/ubuntu jammy InRelease [4,673 B]
Hit:4 http://au.ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Err:3 http://packages.ros.org/ros2/ubuntu jammy InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy-proposed InRelease [270 kB]
Hit:6 http://au.ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Reading package lists… Done
W: GPG error: http://packages.ros.org/ros2/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
E: The repository 'http://packages.ros.org/ros2/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I was following the official tutorial so I was little surprised to see this crop up. What I hadn’t realised was that I’d missed an error in the output dump while running sudo apt update:

chris@chris-parallels-ubuntu:~$ sudo apt update && sudo apt install curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
Hit:1 http://au.ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Get:3 http://packages.ros.org/ros2/ubuntu jammy InRelease [4,673 B]
Err:3 http://packages.ros.org/ros2/ubuntu jammy InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
Hit:4 http://au.ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-proposed InRelease
Hit:6 http://au.ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Reading package lists… Done
W: GPG error: http://packages.ros.org/ros2/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
E: The repository 'http://packages.ros.org/ros2/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
sudo: curl: command not found

This was a clean install of Ubuntu and I hadn’t yet installed curl. Luckily, this is a simple fix:

sudo apt update
sudo apt install curl