It’s been some time since I’ve posted to the weblog, however in recent times I’ve if truth be told been operating at the UBR-1 once more after a relatively lengthy hiatus. If you ignored the sooner posts on this collection:
ROS2 Humble
The most recent ROS2 unlock got here out only a few weeks in the past. ROS2 Humble goals Ubuntu 22.04 and may be a longer term make stronger (LTS) unlock, that means that each the underlying Ubuntu running machine and the ROS2 unlock get a complete 5 years of make stronger.
Since putting in running programs on robots is continuously a ache, I handiest use the LTS releases and so I needed to migrate from the former LTS, ROS2 Cunning (on Ubuntu 20.04). Total, there aren’t many adjustments to the low-level ROS2 APIs as issues are getting extra strong and mature. For some upper point applications, reminiscent of MoveIt2 and Navigation2, the tale is just a little other.
Visualization
One of the crucial great issues concerning the ROS2 Cunning unlock was once that it focused the similar running machine as the general ROS1 unlock, Noetic. This allowed customers to have each ROS1 and ROS2 put in side-by-side. Should you’re nonetheless growing in ROS1, that implies you almost certainly don’t wish to improve your whole computer systems somewhat but. Whilst my robotic now runs Ubuntu 22.04, my desktop remains to be working 18.04.
Subsequently, I needed to give you the option to visualise ROS2 knowledge on a pc that didn’t have the newest ROS2 put in. First of all I attempted the Foxglove Studio, however didn’t have any good fortune with issues if truth be told connecting the use of the local ROS2 interface (the rosbridge-based interface did paintings). Foxglove is indubitably attention-grabbing, however thus far it’s now not truly an RVIZ alternative – they seem like extra thinking about offline knowledge visualization.
I then moved onto working rviz2
inside of a docker setting – which matches neatly when the use of the rocker software:
sudo apt-get set up python3-rocker
sudo rocker --net=host --x11 osrf/ros:humble-desktop rviz2
In case you are the use of an NVIDIA card, you’ll wish to upload --nvidia
along side --x11
.
In an effort to correctly visualize and have interaction with my UBR-1 robotic, I wanted so as to add the ubr1_description
package deal to my workspace in an effort to get the meshes and likewise my rviz configurations. To perform this, I had to create my very own docker symbol. I in large part founded it off the underlying ROS docker photographs:
ARG WORKSPACE=/choose/workspace
FROM osrf/ros:humble-desktop
# set up construct equipment
RUN apt-get replace && apt-get set up -q -y –no-install-recommends
python3-colcon-common-extensions
git-core
&& rm -rf /var/lib/apt/lists/*
# get ubr code
ARG WORKSPACE
WORKDIR $WORKSPACE/src
RUN git clone https://github.com/mikeferguson/ubr_reloaded.git
&& contact ubr_reloaded/ubr1_bringup/COLCON_IGNORE
&& contact ubr_reloaded/ubr1_calibration/COLCON_IGNORE
&& contact ubr_reloaded/ubr1_gazebo/COLCON_IGNORE
&& contact ubr_reloaded/ubr1_moveit/COLCON_IGNORE
&& contact ubr_reloaded/ubr1_navigation/COLCON_IGNORE
&& contact ubr_reloaded/ubr_msgs/COLCON_IGNORE
&& contact ubr_reloaded/ubr_teleop/COLCON_IGNORE
# set up dependencies
ARG WORKSPACE
WORKDIR $WORKSPACE
RUN . /choose/ros/$ROS_DISTRO/setup.sh
&& apt-get replace && rosdep set up -q -y
–from-paths src
–ignore-src
&& rm -rf /var/lib/apt/lists/*
# construct ubr code
ARG WORKSPACE
WORKDIR $WORKSPACE
RUN . /choose/ros/$ROS_DISTRO/setup.sh
&& colcon construct
# setup entrypoint
COPY ./ros_entrypoint.sh /
ENTRYPOINT [“/ros_entrypoint.sh”]
CMD [“bash”]
The picture derives from humble-desktop after which provides the construct equipment and clones my repository. I then forget about the vast majority of applications, set up dependencies after which construct the workspace. The ros_entrypoint.sh
script handles sourcing the workspace configuration.
#!/bin/bash
set -e
# setup ros2 setting
supply “/choose/workspace/set up/setup.bash”
exec “$@“
I may just then create the docker symbol and run rviz inside of it:
docker construct -t ubr:major
sudo rocker --net=host --x11 ubr:major rviz2
The overall supply of those docker configs is within the docker folder of my ubr_reloaded
repository. NOTE: The up to date code within the repository additionally provides a late-breaking trade to make use of CycloneDDS as I’ve had a large number of connectivity problems with FastDDS that I’ve now not been ready to debug.
Visualization on MacOSX
I additionally continuously need so that you can have interaction with my robotic from my Macbook. Whilst I prior to now put in ROS2 Cunning on my Intel-based Macbook, the placement is somewhat modified now with MacOSX being downgraded to Tier 3 make stronger and the brand new Apple M1 silicon (and Apple’s more than a few different locking mechanisms) making it tougher and tougher to setup ROS2 immediately at the Macbook.
As with the Linux desktop, I attempted out Foxglove – alternatively this can be a bit restricted on Mac. The MacOSX setting does now not permit opening the specified ports, so the direct ROS2 matter streaming does now not paintings and you have got to make use of rosbridge. I discovered I used to be ready to visualise sure subjects, however that switching between subjects continuously broke.
At this level, I used to be about to surrender, till I realized that Ubuntu 22.04 arm64 is a Tier 1 platform for ROS2 Humble. I proceeded to put in the arm64 model of Ubuntu inside of Parallels (Be aware: I used to be affordable and to begin with attempted to make use of the VMWare generation preview, however was once not able to get the installer to even boot). There are a couple of methods right here as there’s no arm64 desktop installer, so you need to set up the server version after which improve it to a desktop. There’s a detailed description of this workflow on askubuntu.com. Putting in ros-humble-desktop
from arm64 Debians was once completely simple.
rviz2
runs fairly fast within the Parallels VM, however general it was once now not somewhat as fast or strong as the use of rocker
on Ubuntu. Alternatively, it’s truly great so that you can do a little ROS2 building when touring with handiest my Macbook.
Migration Notes
Be aware: every of the hyperlinks on this segment is to a dedicate or PR that implements the mentioned adjustments.
Within the core ROS API, there are just a handful of adjustments – and maximum of them are if truth be told merely solving possible insects. The logging macros had been up to date for safety functions and require c-strings just like the outdated ROS1 macros did. Moreover the macros at the moment are higher at detecting invalid substitution strings. Ament has additionally gotten higher at detecting lacking dependencies. The updates I made to robot_controllers display simply what number of insects had been stuck by means of this extra strict checking.
image_pipeline
has had some minor updates since Cunning, basically to give a boost to consistency between plugins and so I had to replace some matter remappings.
Navigation has probably the most updates. amcl
type kind names had been modified for the reason that fashions at the moment are plugins. The API of costmap layers has modified considerably, and so a lot of updates had been required simply to get the machine began. I then made a extra detailed cross in the course of the documentation and discovered a couple of extra problems and enhancements with my config, particularly across the habits tree configuration.
I additionally determined to do a correct port of graceful_controller to ROS2, ranging from the newest ROS1 code since a lot of enhancements have came about up to now yr since I had initially ported to ROS2.
Subsequent steps
There are nonetheless a lot of new options to discover with Navigation2, however my speedy focal point goes to shift against getting MoveIt2 setup at the robotic, since I will’t simply change between ROS1 and ROS2 anymore after upgrading the running machine.
Michael Ferguson