rtv / Stage

Mobile robot simulator
rtv.github.com/Stage
GNU General Public License v2.0
399 stars 175 forks source link

Player/Stage for ubuntu 14 , ubuntu 16 even for windows 10 (in bash) #69

Closed pinftv closed 7 years ago

pinftv commented 8 years ago

If anyone want's to install it in ubuntu 14 or 16 I have modify the files and successfully installed it in both. I have write an easy instruction . Please contact me for get the files.

Scalpel78 commented 7 years ago

Can you put your changes here???

rtv commented 7 years ago

Hi.

What do you want me to do?

Richard/

On Thu, Dec 8, 2016 at 10:46 AM, Frode Lillerud notifications@github.com wrote:

Can you put your changes here???

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rtv/Stage/issues/69#issuecomment-265820357, or mute the thread https://github.com/notifications/unsubscribe-auth/AACCnexCU0ffevSen32g7HDRKhqM0k4fks5rGFBzgaJpZM4KsmmT .

-- Richard Vaughan Autonomy Lab / Computing Science / Simon Fraser University

Scalpel78 commented 7 years ago

Hi, this was mostly a comment for user pinftv which said he has managed to get this working on Ubuntu 16, but didn't specify how. I'm trying to do the same, but get the following error when trying to run

frode@XenialXerus:~/GIT/stage4$ stage Stage/worlds/simple.world 
stage: error while loading shared libraries: libstage.so.4.1.1: cannot open shared object file: No such file or directory

I'm coming here from this thread: http://answers.ros.org/question/249570/gazebo-or-rviz/

I've followed the steps as laid out in INSTALL.txt. After it failed I ran; export LD_LIBRARY_PATH=$HOME/GIT/stage4/lib, and then redid the make-steps. Still same errror.

I've opted to NOT run this full command, since it ends up wanting to uninstall all of ROS Kinetic: sudo apt-get install pkg-config libfltk1.1-dev libgl1-mesa-dev libglu1-mesa-dev libpng12-dev libtool

I do not have Player installed, as I believe it is optional.

Can you see what I'm doing wrong?

richmattes commented 7 years ago

How did you install stage to get to that point? Did you clone the git repository and build it? Or did you download it from somewhere?

pinftv commented 7 years ago

Hi guys, i dont know how update the files here I changed some things in source files, but I don't remember what exactly, because I was changing until it compiled.

Scalpel78 commented 7 years ago

@pinftv, and that's why it's especially annoying when you add a cryptic message here that you have secret way of doing this. Hopefully next time you'll share what you did instead.

@jpgr87, I downloaded from GIT, and followed the instructions in https://github.com/rtv/Stage/blob/master/INSTALL.txt

pinftv commented 7 years ago

install player stage.tar.gz

Okey @jpgr87 , I got it. Here are the files, note that some things are only for ubuntu 14 and others for 16 it is in the comments. Good luck. If you have any problem don't hesitate to contact me, if I will know how to help, I will do it.

pinftv commented 7 years ago

@Scalpel78 I said I didn't know how to upload files. Now I guessed so I shared. I could not write anything about it, that I got player/stage to work in Ubunu14 and 16 but I wanted to share it. I did the way I knew. :)

amamory commented 7 years ago

People mix up player, stage, stageros. They are 3 different things that happen to 'usually' work together, bit also work standalone.

All the modifications mentioned in this thread are for Player, not for Stage. So this topic is misplaced. I have compiled Stage for 12.04, 14.04 , and 16.04 without a single modification in the source code or cmake scripts.

On the other hand, Player requires lots of modifications. This link provides patch files for 12.04 and 14.04. In the future i will provide the patch for 16.04. https://github.com/lsa-pucrs/Player/tree/master/patch/install

Scalpel78 commented 7 years ago

@pinftv Thanks for the file, but this is an older Stage 3.2.2, not Stage 4.1.1 , and that build crashes on my 16.04.

@amamory Thanks for the comment, I'll try to start from scratch, and follow the longer variant of the instructions from the INSTALL.txt file. Maybe I'll find something I missed the first time round.

pinftv commented 7 years ago

@amamory The file I provided is modificated and it install PLAYER and STAGE just need to follow the instructions. It even works in bash for windows (installation as for ubuntu 14)

pinftv commented 7 years ago

@Scalpel78 does it throw some error? or just crashes? I have install it in many computers in my University using Ubuntu 16 and it works well. People are using it in their lessons

Scalpel78 commented 7 years ago

@pinftv when running 'make' I get this, and a few other similar errors:


/home/frode/Downloads/Stage3/install player stage/Stage-3.2.2-Source/libstage/region.cc:10:1: error: reference to ‘Region’ is ambiguous
 Region::Region( SuperRegion* sr) : 
 ^
In file included from /usr/include/FL/x.H:49:0,
                 from /usr/include/FL/fl_draw.H:27,
                 from /home/frode/Downloads/Stage3/install player stage/Stage-3.2.2-Source/libstage/stage.hh:61,
                 from /home/frode/Downloads/Stage3/install player stage/Stage-3.2.2-Source/libstage/region.hh:8,
                 from /home/frode/Downloads/Stage3/install player stage/Stage-3.2.2-Source/libstage/region.cc:7:
/usr/include/X11/Xutil.h:273:26: note: candidates are: typedef struct _XRegion* Region
 typedef struct _XRegion *Region;
pinftv commented 7 years ago

@Scalpel78 did you install first Player? and everything as is in the instructions?

Scalpel78 commented 7 years ago

@pinftv I tried the full installation guide from your file now. The only step I skipped was to install 'libjpeg62-dev' since it wants to uninstall all of ROS.

When trying to make player it ends up with this:

Scanning dependencies of target playerjpeg
[  6%] Building C object libplayerjpeg/CMakeFiles/playerjpeg.dir/playerjpeg.o
[  6%] Linking C shared library libplayerjpeg.so
[  6%] Built target playerjpeg
Scanning dependencies of target playerwkb
[  6%] Building C object libplayerwkb/CMakeFiles/playerwkb.dir/playerwkb.o
[  6%] Linking C shared library libplayerwkb.so
/usr/bin/ld: cannot find -lgeos
collect2: error: ld returned 1 exit status
libplayerwkb/CMakeFiles/playerwkb.dir/build.make:95: recipe for target 'libplayerwkb/libplayerwkb.so.3.0.2' failed
make[2]: *** [libplayerwkb/libplayerwkb.so.3.0.2] Error 1
CMakeFiles/Makefile2:816: recipe for target 'libplayerwkb/CMakeFiles/playerwkb.dir/all' failed
make[1]: *** [libplayerwkb/CMakeFiles/playerwkb.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
frode@XenialXerus:~/src/player-3.0.2/build$ 
pinftv commented 7 years ago

@Scalpel78 try installing libgeos++-dev ("sudo apt-get install libgeos++-dev")

Scalpel78 commented 7 years ago

@pinftv That fixed that error. Got further now. Got a lot of warning because of old Boost version, but seems to be compiled.

I skipped installing 'libfltk1.1 libfltk1.1-dev' since they want to remove ROS.

When running grep -rl 'fPIE' ./ | xargs sed -i 's/fPIE/fPIC/g' I got sed: no input file. Not sure if that is relevant.

But, unfortunately I still get this when making Stage:

[ 31%] Building CXX object libstage/CMakeFiles/stage.dir/option.o
[ 32%] Building CXX object libstage/CMakeFiles/stage.dir/powerpack.o
[ 34%] Building CXX object libstage/CMakeFiles/stage.dir/region.o
/home/frode/src/Stage-3.2.2-Source/libstage/region.cc:10:1: error: reference to ‘Region’ is ambiguous
 Region::Region( SuperRegion* sr) : 
 ^
In file included from /usr/include/FL/x.H:49:0,
                 from /usr/include/FL/fl_draw.H:27,
                 from /home/frode/src/Stage-3.2.2-Source/libstage/stage.hh:61,
                 from /home/frode/src/Stage-3.2.2-Source/libstage/region.hh:8,
                 from /home/frode/src/Stage-3.2.2-Source/libstage/region.cc:7:
/usr/include/X11/Xutil.h:273:26: note: candidates are: typedef struct _XRegion* Region
 typedef struct _XRegion *Region;
                          ^
In file included from /home/frode/src/Stage-3.2.2-Source/libstage/region.cc:7:0:
/home/frode/src/Stage-3.2.2-Source/libstage/region.hh:61:9: note:                 class Stg::Region
   class Region
         ^
/home/frode/src/Stage-3.2.2-Source/libstage/region.cc:17:1: error: reference to ‘Region’ is ambiguous
 Region::~Region()
 ^
In file included from /usr/include/FL/x.H:49:0,
                 from /usr/include/FL/fl_draw.H:27,
                 from /home/frode/src/Stage-3.2.2-Source/libstage/stage.hh:61,
                 from /home/frode/src/Stage-3.2.2-Source/libstage/region.hh:8,
                 from /home/frode/src/Stage-3.2.2-Source/libstage/region.cc:7:
/usr/include/X11/Xutil.h:273:26: note: candidates are: typedef struct _XRegion* Region
 typedef struct _XRegion *Region;
                          ^
In file included from /home/frode/src/Stage-3.2.2-Source/libstage/region.cc:7:0:
/home/frode/src/Stage-3.2.2-Source/libstage/region.hh:61:9: note:                 class Stg::Region
   class Region
         ^
libstage/CMakeFiles/stage.dir/build.make:638: recipe for target 'libstage/CMakeFiles/stage.dir/region.o' failed
make[2]: *** [libstage/CMakeFiles/stage.dir/region.o] Error 1
CMakeFiles/Makefile2:124: recipe for target 'libstage/CMakeFiles/stage.dir/all' failed
make[1]: *** [libstage/CMakeFiles/stage.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
pinftv commented 7 years ago

@Scalpel78 grep -rl 'fPIE' ./ | xargs sed -i 's/fPIE/fPIC/g' is important, make sure you run it in build folder. With Stage you may have a conflict because X11 use a library with the same name. First try that grep -rl 'fPIE' ./ | xargs sed -i 's/fPIE/fPIC/g' again

Scalpel78 commented 7 years ago

Yes, it's running in the build directory, but I'm still getting same error.

frode@XenialXerus:~/src/Stage-3.2.2-Source/build$ ls ./
assets          cmake_install.cmake      CTestTestfile.cmake  libstageplugin  worlds
CMakeCache.txt  CPackConfig.cmake        examples             Makefile
CMakeFiles      CPackSourceConfig.cmake  libstage             stage.pc
frode@XenialXerus:~/src/Stage-3.2.2-Source/build$ grep -rl 'fPIE' ./ | xargs sed -i 's/fPIE/fPIC/g'
sed: no input files
frode@XenialXerus:~/src/Stage-3.2.2-Source/build$ 

What is the purpose of that command? I don't quite understand it.

pinftv commented 7 years ago

@Scalpel78 I have checked and it is not necessary you can skip it I see it remains changed. the purpose was to change compiling/linking options.

Scalpel78 commented 7 years ago

Ok, thanks for your help. Then I'm giving up trying to get this fileset working, and instead focus on trying to get the current Stage version from GitHub working.

pinftv commented 7 years ago

@Scalpel78 but player works? You could always try to purge x11, make stage and reinstall x11

Scalpel78 commented 7 years ago

@pinftv I think so, but not sure what the easiest way to test it is?

If I just run player I get this, so I assume it's working?

frode@XenialXerus:~/src/player-3.0.2$ player
Syntax: python player.py imagefile(s)
pinftv commented 7 years ago

@Scalpel78 you can do "sudo apt-get purge x11" then compile stage

Scalpel78 commented 7 years ago

No thanks, I think I'm giving up on this. This was just too complicated getting to work. I think I'll go back to researching how I can use Gazebo/Rviz instead. Seems like a lot more stable solution than Player/Stage, which it seems hasn't really been updated for many years.

richmattes commented 7 years ago

For what it's worth, if you're installing ros from debs provided at packages.ros.org, you can install a stage deb from there:

http://packages.ros.org/ros/ubuntu/pool/main/r/ros-kinetic-stage/

These packages put stage at /opt/ros/kinetic/bin/stage

Scalpel78 commented 7 years ago

The irony here is that I had that package installed all along, just didn't know about it... It's probably part of the 'ros-kinetic-desktop-full' package. I can now start Stage 4.1.1!