Ask Your Question

how to rebuild/update graspit-simulator package

asked 2011-08-20 08:05:23 -0500

vincent gravatar image

updated 2011-08-20 08:05:40 -0500

Hi all,

I downloaded graspit simulator from debs.

sudo apt-get install ros-diamondback-graspit-simulator

It runs well.

Now I changed part of the source code and want to rebuild the package graspit. I added the patch file "new.patch" to the Makefile.graspit.tarball in the root directory of graspit package:

TARBALL_PATCH=graspit/graspit_project.patch graspit/graspit_dbase.patch


TARBALL_PATCH=graspit/graspit_project.patch graspit/graspit_dbase.patch graspit/new.patch

I thought i can just rebuild the package by typing rosmake graspit. But it didn't build saying there is a ROS_BUILD there. So I removed this file to allow rosmake to take effect. But then it goes:

[rosmake-0] Starting >>> graspit [ make ]                                       
[ rosmake ] All 2 linesgraspit: 0.0 sec ]            [ 1 Active 45/46 Complete ]
  mkdir: cannot create directory `build': Permission denied
[ rosmake ] Output from build of package graspit written to:
[ rosmake ]    /home/vincent/.ros/rosmake/rosmake_output-20110820-164256/graspit/build_output.log
[rosmake-0] Finished <<< graspit [FAIL] [ 0.05 seconds ]

Can someone help me out with this and tell me what's the standard procedure of patching and rebuilding a ROS package? Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-08-20 08:14:21 -0500

makokal gravatar image

Using the following;

rosmake --pre-clean

usually does the job for the packages in which ROS_NO_BUILD tag exists, which is most of the 'big' packages. The permission error is just because the package exists somewhere like /opt/.../ which is protected.

To patch the package, I would recommend checking it out onto a folder where permissions are not an issue like around the $HOME or so, then add that path to the ROS_PACKAGE_PATH like so;

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:<put the path here>

or do it the bashrc way.

edit flag offensive delete link more


another question, still in the /opt/... path, I tried `sudo rosmake`, it said cannot find rospack command. So does that mean 'sudo' doesn't apply to all the commands?
vincent gravatar image vincent  ( 2011-08-21 06:48:55 -0500 )edit

answered 2011-08-24 10:04:41 -0500

hsiao gravatar image

sudo rosmake doesn't work because you're not getting your environment variables. You can see that by doing 'printenv | grep ROS' and then 'sudo printenv | grep ROS'. If you do su - to switch to root, then source your usual ~/.bashrc (or whatever file you use to set your ROS_ROOT and all that), you should be able to use rospack commands as root. I would not recommend trying to re-build inside debs, though. You should always overlay if you want to change and re-build.

edit flag offensive delete link more


vincent gravatar image vincent  ( 2011-08-24 23:30:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-08-20 08:05:23 -0500

Seen: 786 times

Last updated: Aug 24 '11