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

Rospack command not found in makefile when trying to build

asked 2012-03-27 03:17:50 -0500

manu gravatar image

updated 2018-01-04 06:23:23 -0500

130s gravatar image

Hello, I'm a beginner with ROS and I'm having trouble to build my first packages.

If a use 'rosmake rxtools', for example, I get a 'rospack failed to build' message.

I haven't found how to solve this so I tried to manually make this package, by going to its root directory and running 'make'. When I do this, I get the following message:

sudo make
make: rospack: Command not found
Makefile:1: /cmake.mk: No such file or directory
make: *** No rule to make target `/cmake.mk'.  Stop.

The Makefile looks like

include $(shell rospack find mk)/cmake.mk

So, it seems to me that the rospack command can not be found inside the makefile. I did some little test modifications in the makefile trying to verify this:

test=$(shell rospack find mk)
#include $(shell rospack find mk)/cmake.mk
all:
    @Echo Command result: $(test)

Which gives me this result:

make: rospack: Command not found
Command result:

But I have no idea of why the rospack command cannot be found, neither how to solve this.

I'll really appreciate any sugessitons about how to continue to debug this.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-04-10 07:12:04 -0500

manu gravatar image

Solved this, it was a permission problem when trying to build.

edit flag offensive delete link more
0

answered 2012-03-28 01:27:24 -0500

McMurdo gravatar image

You should go through the page: "installing ros", on the ros.org site, again. There is a line to be added to your .bashrc file.

source /opt/ros/electric/setup.bash

Add this and restart. Everything should work fine.

edit flag offensive delete link more

Comments

Thank you very much for your response. I had already done this, I followed the instructions and created a script configuration script that does this and I source this file each time I start to use ROS. The script looks like:

manu gravatar image manu  ( 2012-03-28 02:56:02 -0500 )edit

#!/bin/bash source /home/manu/ros/setup.bash export ROS_ROOT=/home/manu/ros/ros export PATH=$ROS_ROOT/bin:$PATH export PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATH export ROS_PACKAGE_PATH=~/rosWorkspace:/opt/ros/electric/stacks:$ROS_PACKAGE_PATH

manu gravatar image manu  ( 2012-03-28 03:00:04 -0500 )edit

I really appreciate your response, but I think this is not the problem :S

manu gravatar image manu  ( 2012-03-28 03:01:59 -0500 )edit

Question Tools

Stats

Asked: 2012-03-27 03:17:50 -0500

Seen: 4,987 times

Last updated: Jan 04 '18