First time here? Check out the FAQ!


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

run sequence of commands

asked Jan 28 '13

salma gravatar image

updated Jan 31 '13

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

Preview: (hide)

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  ( Jan 29 '13 )edit

Ok I edited it

salma gravatar image salma  ( Jan 29 '13 )edit

2 Answers

Sort by » oldest newest most voted
2

answered Jan 29 '13

joq gravatar image

updated Jan 31 '13

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.

Preview: (hide)

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  ( Jan 30 '13 )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  ( Jan 30 '13 )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  ( Jan 30 '13 )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  ( Jan 30 '13 )edit

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

joq gravatar image joq  ( Jan 30 '13 )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  ( Jan 31 '13 )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  ( Jan 31 '13 )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  ( Jan 31 '13 )edit
3

answered Jan 29 '13

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>

Preview: (hide)

Question Tools

Stats

Asked: Jan 28 '13

Seen: 606 times

Last updated: Jan 31 '13