IDE setup with ros:eloquent docker

Aloha,

I am working with this docker image as a base.

I have polish it up to be able to follow the ros2 tutorials from the beginning. Doing turtlesim samples, using rqt, follow the techniques of topics, interfaces, services, actions, etc. And develop own nodes by those tutorials with custom interfaces, minimal publisher / subscriber nodes.

Here is my extended docker image:

FROM ros:eloquent-ros-base-bionic

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
ros-${ROS_DISTRO}-turtlesim \ ros-${ROS_DISTRO}-rqt* \
ros-${ROS_DISTRO}-ros2bag \ ros-${ROS_DISTRO}-rosbag2-converter-default-plugins \
ros-${ROS_DISTRO}-rosbag2-storage-default-plugins \ ros-${ROS_DISTRO}-example-interfaces \
xauth \
software-properties-common \
logtop \
vim \
wget \
htop \
net-tools \
iproute2 \
mc \
&& rm -rf /var/lib/apt/lists/*

COPY ./start.sh /

RUN chmod 755 /start.sh

ENV XLIST $(xauth list | grep$(echo $DISPLAY | grep -oP${HOSTNAME}:[0-9]+))

ENTRYPOINT ["/start.sh"]

CMD ["to_be_overridden"]


This took me to the place where I am now to be able to run, extend and create ros2 nodes.

For further development I'd like to have an external IDE (outside of the container). My favorite is eclipse and I am willing to go with it, no vscode stuff please.

There is a tutorial of setting up eclipse oxygen (pretty outdated) with rviz and another with rti_connext_dds, but I didn't find any resource explaining a eclipse setup with a ros2 docker container for development of ros2 nodes.

My first goal is an environment, where I can step into code, including all those ros dependencies rosdep and rclcpp, all headers to be indexed to be able to do intellisense against the ros2 libraries.

Building and execution could be possible (as I could imagine) due to the shell inside modern eclipse, which acts inside the docker, because the IDE allows connection to dockers.

With such a setup I'd like to be able (hopefully), to have the binaries for execution and the libs for development on a Raspi inside a docker container, the user defined sources on a bind-mounted host share and the IDE on the host from where I connect to the remote docker on the Raspi to do intellisense driven development of GPIO hardware specific ros2 nodes.

What I am missing is the setup of paths to the ros2 libs and my own source tree (bind mounted on host), so I can do daily development. Sources are generated after interface modelling. How to get to those sources from within eclipse residing in a ros2 docker?

Another question is how can I find out whether or not I need rti_connext_dds. Following this tutorial one could believe, it is totally necessary for generic ros2 development, but I'd rather guess it's only required if I'd like to build the whole ros2 OS itself.

Could anyone give me an advice on how to proceed here?