ros-industrial / ros_qtc_plugin

ROS Qt Creator Plug-in (https://ros-qtc-plugin.readthedocs.io)
396 stars 213 forks source link

how to use qtcreator with roslaunch and rostest #230

Closed lusu8892 closed 5 years ago

lusu8892 commented 6 years ago

Hi Levi

Do you have tutorial teaching how to use qtcreator with roslaunch and rostest?

Levi-Armstrong commented 6 years ago

The video tutorials may have something, but everything related running is under Projects>Run. If you add a ROS Run Configuration it provides you the ability to add rosrun and roslaunch steps at the moment. Now for rostest it has not been added but you can use the custom executable run step where the executable is the path to bash and the command line arguments are what you would type in the terminal. Note: you may have to pass an option(-c) to bash for it to work.

lusu8892 commented 6 years ago

Here is what I tried. First I created a test_xxx_moveit_kinematics_plugin_script.sh file the inside is:

cd /home/xx/ros_ws/src/xxx_moveit/xxx_moveit_plugins/xxx_moveit_kinematics_plugin/test rostest xxx_moveit_plugins test_xxx_kinematics_plugin.test

Then based on your suggestion, I went to run settings in qtcreator, set the executable where I placed the .sh file.

After I clicked debug button, the Application output is: Unknown debugger type "No engine" Unable to create a debugging engine of the type "No engine"

P.S. I am not very clear about your NOTE: you may have to pass an option(-c) to bash for it to work.

Levi-Armstrong commented 6 years ago

Oh, you are wanting to debug. That is a little different process.

I usually in this case would add a custom executable run step and give it the path to the test executable (usually in devel/lib/package_name directory). Then in a terminal roslaunch the launch file associated with the test and after that is up and running then select the run debug button in qt creator. Note: This is basically what rostest does behind the scenes.

lusu8892 commented 6 years ago

I see your idea. From rostest instruction I was only told rostest is like roslaunch, I mean they both use XML syntax. I actually did your way. I might do some wrong, I could not figure out how to pass args to that test node. But I have an idea now. I will let you know. Thanks!

Levi-Armstrong commented 5 years ago

Ok to close?