Rosrun not found


#1

I’m trying to set up the software using the PFC 2.0 wiki instructions using the Docker approach (on a Raspberry Pi 3 and a Arduino/Sunfounder MEGA).

Seems everything went fine until I ran:

docker exec openagbraindockerrpi_brain_1 rosrun openag_brain load_fixture default

I get an error message saying

rpc error: code = 2 desc = “oci runtime error: exec failed: exec: “rosrun”: executable file not found in $PATH”

Seems I’m missing ‘rosrun’ but I would have expected it was installed as part of the process in the instructions - what did I miss?

Thanks


#2

Can you confirm that the ROS is installed properly by checking if that file ‘/opt/ros/indigo/bin/rosrun’ exists? If so then run these commands in the console and try again:

source /opt/ros/indigo/setup.bash
echo “source /opt/ros/indigo/setup.bash” >> ~/.bashrc


#3

Thanks for the reply @ujvzolee. ‘/opt/ros/indigo/bin/rosrun’ does not exist. I thought ROS would come as part of the Docker image?

So now I’m trying to install ROS according to these Installing ROS Indigo on the Raspberry Pi instructions . My intention was to get back to this thread when finished with the ROS installation but it is taking hours so here is a heads-up. Further, building liblz4-dev failed so it is yet to be seen if I can make it work.

Is there an easier way?

Thanks


#4

@bjerngaard you need to run the command with the proper ROS environment variables set, in this case you could do:

docker exec openagbraindockerrpi_brain_1 /home/pi/catkin_ws/devel/env.sh rosrun openag_brain load_fixture default

*Note the /home/pi/catkin_ws/devel/env.sh at the beginning


#5

@david Thanks, that worked!

I will suggest an update to the instructions and continue from here :slight_smile:

/Rasmus


For reference and for others in a similar situations, here is what I get on the command line:

pi@raspberrypi:~ $ docker exec openagbraindockerrpi_brain_1 /home/pi/catkin_ws/devel/env.sh rosrun openag_brain load_fixture default
environment
software_module_type
firmware_module_type
software_module
Applying fixture default


pi@raspberrypi:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27e135ccfdde openag/rpi_brain “./rep.sh ~/catkin_ws” 2 days ago Up 11 minutes 5000/tcp openagbraindockerrpi_brain_1
8f5c6a40fc40 dogi/rpi-couchdb “/entrypoint.sh couch” 2 days ago Up 11 minutes 0.0.0.0:5984->5984/tcp openagbraindockerrpi_db_1


pi@raspberrypi:~ $ docker info
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 2
Server Version: 1.11.1
Storage Driver: devicemapper
Pool Name: docker-179:7-419372-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: ext4
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 2.238 GB
Data Space Total: 107.4 GB
Data Space Available: 6.52 GB
Metadata Space Used: 2.769 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.145 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Either use --storage-opt dm.thinpooldev or use --storage-opt dm.no_warn_on_loop_devices=true to suppress this warning.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.90 (2014-09-01)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.4.34-v7+
Operating System: Raspbian GNU/Linux 8 (jessie)
OSType: linux
Architecture: armv7l
CPUs: 4
Total Memory: 925.5 MiB
Name: raspberrypi
ID: ZY23:E2JJ:6Z4I:DBWC:FPAR:IMXI:DOPW:XJF6:4NEM:OEFZ:LGIM:26FK
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpuset support


#6

I am also setting up Ver 2, and having similar issues. Thanks for the information and the validation information.
I am new to these tools and environment (I am a data architect by background, primarily Oracle), so have some basic questions.

  1. is rosrun invoked from the bash command line, or do I need to be within a container (catkin). People familiar with the environment have this as a basic assumption, but it is not obvious to some of us.
  2. Is there any directory tree documentation, of what files to expect where to validate that everything is (properly) loaded?

#7

Can’t give you expert advice but can share what I learned so far:

  1. if you choose the Docker installation then the Docker container will contain your entire environment (including ROS) . Therefore you either need to log into the Docker container (‘docker exec -it openagbraindockerrpi_brain_1 bashv’) and execute commands there or prefix your commands with ‘docker exec’ of you execute from the normal Linux command line. More info: http://wiki.openag.media.mit.edu/openag_brain/docker

  2. Have not found one but if ‘docker ps’ shows that two containers are loaded something is right


#8

It is a little strange. Docker is up and running with two containers (“docker ps” and “docker info” give results like yours), but I am missing:
~/catkin_ws/
and
/opt/ros/

I am cheating a bit. I don’t currently have an Arduino Duo, so using an Uno - logs are showing an ERROR of unable to sync. But not unexpected.

Thanks for the help.


#9

You will only see those directories inside Docker - not in your normal Linux filesystem.

If you do

docker exec -it openagbraindockerrpi_brain_1 bashv

and then look for the directories you should be able to find them.