ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

run sequence of commands

asked 2013-01-28 15:00:53 -0500

salma gravatar image

updated 2013-01-31 01:37:24 -0500

Hi all , I am Using RoboEarth Stack on my irobot create to perform intelligence Operations ,, I want to know How to run sequence of commands automatically instead of run each command manually

Ex: if I want to detect Object model using roboearth detector : must write object detection algorithm command and GUI open command and manually Download and select object model

rosrun re_kinect_object_detector re_kinect

rosrun re_object_detector_gui detect

These commands must done to open the GUI and choose demand object model Can I made these commands automatically ?

And How can I update the code to Load the model automatically from my knowledge base after Knowrob processing ??


Update :

1- i have create my own pkg in home named 'risk' and write the mainfest file dependencies for Roboearth packages like here :

    <package>
<description brief="risk"> risk</description>
<author>salma</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/risk</url>
<depend package="re_comm_core"/>
<depend package="re_comm"/>
<depend package="ar_bounding_box"/>
<depend package="re_2dmap_extractor"/>
<depend package="re_kinect_object_detector"/>
<depend package="re_msgs"/>
<depend package="re_object_detector_gui"/>
<depend package="re_object_recorder"/>
<depend package="re_srvs"/>
<depend package="re_ontology"/>
<depend package="re_vision"/>
</package>

2- export ROS_PACKAGE_PATH=/opt/ros/fuerte/share:/opt/ros/fuerte/stacks:/home/salma/risk

3- rosmake re_comm

it can't rospack it

edit retag flag offensive close merge delete

Comments

People can probably help you better, if you update your question to include the exact sequence of commands you want to automate.

joq gravatar image joq  ( 2013-01-29 04:27:53 -0500 )edit

Ok I edited it

salma gravatar image salma  ( 2013-01-29 07:48:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-01-29 11:23:04 -0500

joq gravatar image

updated 2013-01-31 02:59:34 -0500

As @moritz said, use roslaunch. The launch file you provide will look something like this:

<launch>
  <node pkg="re_kinect_object_detector" type="re_kinect" name="re_kinect" />
  <node pkg="re_object_detector_gui" type="detect" name="detect" />
</launch>

UPDATE: there is more to creating a source overlay than just adding to your $ROS_PACKAGE_PATH. The recommended approach is to use rosws.

edit flag offensive delete link more

Comments

Ok ,, And i want to make my own stack as a copy of roboearth stack to do my simple changes of my application but on fuerte can't use roscreate-stack ,, what should i do ? or can i make these changes in Roboearth stack that i have downloaded ? thanks :)

salma gravatar image salma  ( 2013-01-30 09:21:20 -0500 )edit

i tried to do the stack by my hand but roboearth stack is a big stack with alot of packages !

salma gravatar image salma  ( 2013-01-30 09:22:53 -0500 )edit
4

You should not have to make a copy, but create your own package and depend on the packages in RoboEarth. You can specify in the manifest.xml which packages your package depends on. Then you have access to all libraries exported from those packages.

moritz gravatar image moritz  ( 2013-01-30 09:23:51 -0500 )edit

mmm all right ,but creating a package and depends in packages in Roboearth ,,where i update the launch file for a package ? would i create a new launch file in my new pkg or update it from my core pkg i have downloaded ??

salma gravatar image salma  ( 2013-01-30 09:42:38 -0500 )edit

Yes, your new package depends on roboearth and contains any launch files you find convenient.

joq gravatar image joq  ( 2013-01-30 13:50:21 -0500 )edit

i create a new pkg named "risk" and made its dependeces roboearth packages in the mainfest.xml ,,then export its path as : export ROS_PACKAGE_PATH=/opt/ros/fuerte/share:/opt/ros/fuerte/stacks:/home/salma/risk ,, then rosmake it ,, but still can't deal with it ,, i have updated my Q above see it

salma gravatar image salma  ( 2013-01-31 01:38:01 -0500 )edit

Thanks joq ,, i made fuerte workspace ,, then made sandbox directory ,, then Update this Line in bash file /opt/ros/fuerte/setup.bash (To) source ~/fuerte_workspace/setup.bash ,, How to add Roboearth stack to my sandbox to begin to make my updates ?? now it is in my home/ros

salma gravatar image salma  ( 2013-01-31 08:38:19 -0500 )edit

This is really a new question, which should be asked separately. There are already some good answers if you search for "overlay", or just read the doc link I posted above.

joq gravatar image joq  ( 2013-01-31 09:34:09 -0500 )edit
3

answered 2013-01-29 07:52:03 -0500

moritz gravatar image

roslaunch allows you to define launch configurations, i.e. to start a set of programs. You need to create a roslaunch file and can then call roslaunch <pkg_name> <launchfile>

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-28 15:00:53 -0500

Seen: 560 times

Last updated: Jan 31 '13