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

UWsim - unable to execute scene installer script - for package based installation of UW sim

asked 2016-05-20 11:05:14 -0500

Vaz gravatar image

updated 2016-05-28 01:50:27 -0500

Hi, I am new to Ubuntu Indigo, ROS and UWsim. I am trying to download and install new UWsim scenes.

The UWsim site says download the scene installer script from the link provided, place it in a scenes folder and run it. I placed the script inside gedit and saved it as installscene.sh file in my home folder. Then using sudo cd copied it into the data/scenes folder of UWsim. I tried to execute it by running ./installScene -s dredging.uws from the home and scene folders. However, I get the error: bash: ./installScene: No such file or directory

I must be doing something really stupid. Sorry for such a basic question. Could someone help.


Edit 1 : Thanks for your reply Javier.

I am using the correct path to the file placed in the scenes folder, and also using the sudo chmod as below, but still getting permission denied:

gary@gary-Inspiron-3542:~$ sudo chmod u+x /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh
[sudo] password for gary: 
gary@gary-Inspiron-3542:~$ /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh
bash: /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh: Permission denied

I also checked if I was able to run the file outside the uwsim scenes folder, and it was running:

gary@gary-Inspiron-3542:~$ sudo chmod u+x /home/gary/installscene.sh
[sudo] password for gary: 
gary@gary-Inspiron-3542:~$ /home/gary/installscene.sh
Directory where installScene is doesn't seem a UWSim scenes folder (UWSimScene.dtd does not exist).
gary@gary-Inspiron-3542:~$

Is it correct to name the file containing the provided scene installer script as Installscene.sh , copy the file into the scened folder, and then run the command ./installScene -s dredging.uws

I had looked up the net for any info on the scene installer script, but did not find any detailed explanation.

Edit 2 : Javier, thanks for your reply, but still not clear. I tried both options to run the install scene script for my package-based installation, and both times, I got the error : “line 70: : No such file or directory”

  1. I ran the script placed in the uwsim/data/scenes folder using sudo:

    gary@gary-Inspiron-3542:~$ sudo /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh [sudo] password for gary: Installing... /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh: line 70: : No such file or directory

  2. I created a new scenes folder in my home folder, copied the UWSimScene.dtd file & the installscene script into it, and tried to run the script:

    gary@gary-Inspiron-3542:~$ /home/gary/scenes/installscene.sh Installing... /home/gary/scenes/installscene.sh: line 70: : No such file or directory

Appreciate your help. Regards.

Edit 3: Thanks Javier. Finally downloaded using the command: sudo /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh -s dredging.uws

Tried to run the new .xml files but the old .xml file still kept opening I think. So presumed I need to run catkin_make install. However, for my package based uwsim installation, I do not have any src folder ...

(more)
edit retag flag offensive close merge delete

Comments

@Vaz: could you please edit-in updates to your question next time, instead of posting them as an answer? ROS Answers is a little different from a regular forum.

Also: please format console copy/pastes using the Preformatted text button next time (it's the one with 101010 on it).

Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-05-24 04:44:28 -0500 )edit

Sorry, learning the ropes. Hope I did it right this time. I edited my question, and used the preformatted text for the console copy. Not sure how you formatted the file name and commands in red.

Vaz gravatar image Vaz  ( 2016-05-26 02:39:29 -0500 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2016-05-28 01:37:00 -0500

Vaz gravatar image

Thanks alot for the assistance Javier. Got it working now. I probably had to restart for the newly downloaded .xml files to be accepted (it was only running cirs.xml when I just installed it).

I would like to consolidate the process of installing new scenes for all those who are new to Ubuntu, ROS and Uwsim like me. I have included the IRSLab procedure and provided further details in bold numbered. This procedure worked for me.

UWSIM SCENE INSTALL PROCEDURE FOR BEGINNERS (FOR PACKAGE BASED INSTALLATION OF UWSIM)

Note: Only the bold text below is mine.

As UWSim is being used for different purposes we were in the need of using several scenes and share them. This process was quite tedious, so we have decided to create a basic scene installer that helps with the process of downloading and copying 3D models and configuration scenes in the correct places to be able to run them. This script is already available in the indigo branch in github and can be download here. Just place it in a scenes folder (any with a UWSimScene.dtd file), in the github is already placed in data/scenes, and run it like this:  ./installScene -s dredging.uws

1. Copy the script provided by IRS Lab from the link provided above, open the gedit text editor and paste. Save the file as “Installscene.sh” in your home folder, as you will not be permitted to directly save it in the scenes folder of Uwsim. 2. Copy the newly created file “Installscene.sh” from the home folder into scenes folder of Uwsim with the following command in the terminal window: sudo cp /home/your past to the file/installscene.sh /opt/ros/indigo/share/uwsim/data/your path to the scenes folder/scenes 3. Run this copied file “installscene.sh” by directly placing the path to the file and the file name in your terminal window, and include the name of the new scene that you would like to download as follows: sudo /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh -s dredging.uws
and later, sudo /opt/ros/indigo/share/uwsim/data/scenes/installscene.sh -s cuba.uws
(by the way, pipes_scenes.uws gave the following error: HTTP request sent, awaiting response... 404 Not Found , 2016-05-27 11:33:07 ERROR 404: Not Found. , Installing... )

You will see some downloads and when it finishes you should have the new scene in your installation, just run uwsim "rosrun uwsim uwsim --configfile dredging.xml" and if everything worked as it should UWSim will start with the new scene (you may need to execute catkin_make install). You can check the available scenes in the new scenes tab of the website and more details on how to use it in the wiki. Finally if you want to share your scenes you can do it here.

4. I did not need catkin_make install prior running the newly downloaded scenes. I used the following command in the terminal window (roscore should ... (more)

edit flag offensive delete link more

Comments

Where can i find these script codes for installscene.sh ?

Hossein92 gravatar image Hossein92  ( 2018-04-25 12:31:33 -0500 )edit
0

answered 2016-05-23 02:53:13 -0500

Javier Perez gravatar image

updated 2016-05-27 05:08:19 -0500

Hi,

Your bash path is probably in the wrong folder. Scripts are executed in the console using "./NAMEOFFILE", but the script has to be in the same folder. If you want to run it from a different foler you can especify the path to it, for instance "./data/scenes/installScene.sh". Or change the working folder using "cd NAMEOFFOLDER".

Remember the script needs execution permissions, you can change them executing "sudo chmod u+x NAMEOFFILE". Anyway, this is a regular bash script, you should be able to find tons of information about how to execute it just browsing.

Hope it helps.

Edited:

Sorry, didn't realize you were using package-based installation. In this case problem is script copies the new scene file in the scenes folder. So if you want to add new scenes to the installed through the package, instead of creating a new scenes folder, you can run it with sudo.

In other case, you can create a scenes folder copying UWSimScene.dtd from the other scene folder and installScene script. Then just run it and it should work. Problem is you will need to run uwsim from that folder or specify the path to it in --configfile option.

Sorry again for the misunderstanding!

edit 2:

In this case the name of the scene is missing, the error message is far from clear, I should change that. Just execute it with "-s dredging.uws" (or any other available scene).

edit 3:

There is no need to catkin make, as you said there is no source code. Just running "rosrun uwsim uwsim --configfile dredging.xml" after installing the scene should be enough. Check the scene "dredging.xml" downloaded to the right place "/opt/ros/indigo/share/uwsim/data/scenes".

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-20 11:05:14 -0500

Seen: 354 times

Last updated: May 28 '16