RTI DDS on Raspberry Pi

2 posts / 0 new
Last post
Last seen: 3 years 3 months ago
Joined: 05/09/2017
Posts: 1
RTI DDS on Raspberry Pi

Hello all,

I am currently setting up my raspberry pi to run some RTI DDS applications, and I am interested in coding in Java.

I have gone through the HOWTO page here: https://community.rti.com/content/forum-topic/howto-run-rti-connext-dds-raspberry-pi

However, I think there is a missing section which is important if you want to run java applications which is section: 6.2.3


I noticed in the explanation of how to run the java example, that after copying the example using: 

scp -r /path/to/example_dir pi@<raspberrypi_ip>:/home/pi/example

The next step shown in the HOWTO is how to make the java example AGAIN on the pi, which then tries to look for:

javac -classpath .:/home/pi/rti_connext_dds-5.2.3/lib/java/nddsjava.jar hello_messagePublisher.java java -classpath ".:/home/pi/rti_connext_dds-5.2.3/lib/java/nddsjava.jar" hello_messagePublisher

This is where I think there is something wrong, since there was no previous mention of installing RTI DDS on the raspberry pi, and in the previous terminal output snippet its assuming that rti_connext_dds is installed in /home/pi.

I was able to do a work around which was simply copying the installation files from my host linux machine to the raspberry pi and setting the environment variables in the ~/.bashrc file on the raspberry pi. This however does not work correctly all the time as I know this is not how to install it correctly. 

If anyone would be able to guide me on how to fix this situation I would be greatful since I've been trying to solve this problem for a while now.

manuelBaena's picture
Last seen: 2 years 5 months ago
Joined: 06/27/2017
Posts: 6

Hello Joseph,

You are right, I have been testing the HOWTO document, and in order to execute the Java example you need to add some components of the target to your Raspberry Pi. I was able to fix the error when I checked the makefile included in the generated code. To fix the error I added the lib folder of my linux host into a new folder in my raspberry, I called the new folder "rtinddshome5.2.3". In my case it contained two additional folders: armv6vfphLinux3.xgcc4.7.2, with the SO libraries, and Java, containing all the jar files. Only those 2 folders of the host lib folder are required. If you have an additional target installed you don't need to copy it to your Raspberry.

To copy the lib folder I used the following command from NDDSHOME in my linux host:

scp -r lib pi@<RaspberryPiAddress>:/home/pi/rtinddshome5.2.3

After this I setted in the Raspberry the NDDSHOME variable pointing to "rtinddshome5.2.3". I did it with the following command:

export NDDSHOME=/home/pi/rtinddshome5.2.3:$NDDSHOME

After set this, all the errors dissapeared and I could execute the java example without problems.

I hope that my comment helps you.

Kind regards,