Example using_qos_profile error in terminal but not in Eclipse?

3 posts / 0 new
Last post
Offline
Last seen: 7 years 8 months ago
Joined: 04/23/2013
Posts: 17
Example using_qos_profile error in terminal but not in Eclipse?

I am testing the example "using_qos_profile" in Eclipse and it works perfect, but when I open a terminal and run "./profile_publisher" it  gives me errors?

Is it something that I miss in configuring the environment? I have the NDDSHOME as /home/jtnguyen/rti_connext_dds-5.2.3, and my license.dat is in that directory also.

Any ideas? Thanks

Fernando Garcia's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 05/18/2011
Posts: 199

Hi Joseph,

Can you share the error message that you get when you run your profile_publisher executable? Note that Connext DDS only loads automatically USER_QOS_PROFILE.xml files when they are contained in the working directory, so you need to run from there. Likewise, in the example code the example is expecting my_custom_qos_profiles.xml to be in the working directory:

factory_qos.profile.url_profile[0] =
        DDS_String_dup("my_custom_qos_profiles.xml");

Therefore, you must run the executable from the folder that contains both XML. Here is how:

~/rti/github/rticonnextdds-examples/examples/using_qos_profiles/c++ (master) $ ./objs/x64Linux3gcc4.8.2/profiles_publisher 
Writing profile_name = volatile_profile, x = 0
Writing profile_name = transient_local_profile, x = 0
... 

Alternatively, you can load the files from a different directory specifying the path to the files that you load into url_profile. 

Let me know if this works for you.

Thanks,
Fernando.

Offline
Last seen: 7 years 8 months ago
Joined: 04/23/2013
Posts: 17

Oh wow, you are so right, and I've been digging everywhere else for the whole day. Yep, one has to run from the directory where the xml file is resided.

Thanks Fernando.