Ask Your Question
2

Where to install console_bridge?

asked 2013-05-06 08:21:45 -0600

TJump gravatar image

updated 2013-05-07 09:59:37 -0600

Since console_bridge is ROS-independent should it go in a ROS workspace or simply in with the debian/Ubuntu somewhere (like with bootstrap dependencies)?

As it is not a catkin package it cannot go in a catkin workspace.

I'm installing on a BeagleBone so Groovy must be installed from source (if this makes any difference in the answer).

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
4

answered 2013-05-06 08:33:59 -0600

mirzashah gravatar image

updated 2013-05-06 13:08:54 -0600

tfoote gravatar image

The easiest way to use console_bridge is to install it from binary packages (sudo apt-get install ros-groovy-console-bridge).

If you want to build it from source, note that console_bridge is NOT a catkin project, but rather a pure CMake project. You should keep it separate from a catkin workspace, build it with CMake, "make install" it somewhere, and then make sure that when you build code against it, that it can be find_packaged() by CMake (i.e. console_bridge and it's .cmake file need to be findable through CMAKE_PREFIX_PATH environment variable).

Hope that helps, let me know if you need clarification.

Edit: mkdir cb_ws
cd cb_ws
git clone https://github.com/ros/console_bridge
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ../console_bridge
make install

This will create a folder called install within the folder cb_ws.

Inside the install folder you'll see: include/ lib/ share/

Within "share" you'll see the generated file console_bridge.cmake. This is what cmake uses to figure out where console_bridge is installed (which is cb_ws/install). Your CMAKE_PREFIX_PATH variable needs to point to the folder that contains this file so taht CMake can find it and determine -I flags (in this case cb_ws/install/include), -L flags (in this case cb_ws/install/lib) and -l flags (in this case libconsole_bridge.so which to the compiler will be "-lconsole_bridge").

edit flag offensive delete link more

Comments

I edited the comment above with more clarification, let me know if it still doesn't make sense...I know this stuff can be confusing. Also again, it is way easier to use the binary .deb packages. Unless you have a good reason to build it from source, it's just making life harder for yourself.

mirzashah gravatar image mirzashah  ( 2013-05-06 09:23:48 -0600 )edit

I'm okay building from the binary.deb packages, I'm just not sure where to put it. My catkin_ws has packages that have console_bridge as a dependency so I want to make sure to install it where they can find it.

TJump gravatar image TJump  ( 2013-05-06 09:36:30 -0600 )edit

Ah I understand now, this is easier than you think :) If you install from debian packages then it's all already taken care of for you. As long as you source your ros environment (e.g. source /opt/ros/groovy/setup.bash), the CMAKE_PREFIX_PATH will automatically be set..

mirzashah gravatar image mirzashah  ( 2013-05-06 09:39:24 -0600 )edit

This still presents a question as with the groovy install from source instructions nothing goes into /opt. The install path is home/ubuntu/ros_catkin_ws. I've tried to instal in the ros_catkin_ws but as you mentioned, this won't work. I tried in home/ubuntu but got "unable to locate package..."

TJump gravatar image TJump  ( 2013-05-06 09:57:07 -0600 )edit

You don't use the source install instructions -- forget the source code! Just do: 1) sudo apt-get install ros-groovy-console-bridge 2) source /opt/ros/groovy/setup.bash

Done! Anywhere find_package(console_bridge) is used in any CMakeLists.txt file, it will be resolved

mirzashah gravatar image mirzashah  ( 2013-05-06 10:00:48 -0600 )edit

Okay... maybe a miscommunication. I'm installing on a BeagleBone so I must install Groovy from source (http://www.ros.org/wiki/groovy/Installation/Source). At my root I'm at ubuntu@arm:$. An 'ls' command gives me my only directory (ros_catkin_ws).

TJump gravatar image TJump  ( 2013-05-06 10:25:08 -0600 )edit

There were two cd cb_ws and the CMAKE_ISNTALL_PREFIX was missing D at the front. I fixed them in the answer.

tfoote gravatar image tfoote  ( 2013-05-06 13:10:22 -0600 )edit

Hey sorry I had mistyped those instructions, @tfoote has corrected them. I can't remember off the top of my head what the CMAKE_INSTALL_PREFIX has to be. I'm a bit busy at the moment, please check out the CMake documentation. If you can't still solve it, I can take a look at it in a few hours when I

mirzashah gravatar image mirzashah  ( 2013-05-06 14:30:57 -0600 )edit

get a chance

mirzashah gravatar image mirzashah  ( 2013-05-06 14:31:24 -0600 )edit

@TJump the above version will work as well as yours. The CMAKE_INSTALL_PREFIX needs to end up somewhere on your CMAKE_PREFIX_PATH when you want to compile things on top of console_bridge.

tfoote gravatar image tfoote  ( 2013-05-06 14:46:18 -0600 )edit

I finally determined why this was not working for me. I did not have cmake in my ubuntu build. Once I added cmake the above works fine.

TJump gravatar image TJump  ( 2013-05-19 07:53:56 -0600 )edit

I am stuck on the same problem. I tried to follow the above instructions, but I get the following:

CMake Error at /opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:173 (message): catkin_package() CATKIN_DEPENDS on 'console_bridge', which has been found in '/home/pi/cb_ws/install/share/console_bridge/cmake/console_bridge-config.cmake', but it is not a catkin package Call Stack (most recent call first): /opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package) class_loader/CMakeLists.txt:11 (catkin_package)

I added the following to my .bashrc:

export CMAKE_PREFIX_PATH=/home/pi/cb_ws/install/share/console_bridge/cmake:${CMAKE_PREFIX_PATH} but that doesn't seem to help.

Any more clarifications would be most appreciated!

andrew-unit gravatar image andrew-unit  ( 2013-08-25 09:15:39 -0600 )edit

@andrew-unit please ask a new question. Your problem is different than the one answered here. PS you should not be using CATKIN_DEPENDS for non catkin packages such as console bridge.

tfoote gravatar image tfoote  ( 2013-08-25 09:43:03 -0600 )edit

@tfoote thanks for the guidance. I am trying, as the OP was, to build from source. I'm trying to build class_loader which I pulled from git, but it depends on console_bridge that apparently isn't a catkin package as of a release a couple months ago. I thought this question was exactly what I was looking for. The CATKIN_DEPENDS is coming from the class_loader package, I believe, although I admit I don't know much about catkin at this point.

andrew-unit gravatar image andrew-unit  ( 2013-08-25 10:08:54 -0600 )edit

I'm sorry but I am new to ROS and trying to run ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release and get the error that console_bridge can't be found. I created a folder cb_ws and build from source. How do I exactly specify CMAKE_PREFIX_PATH? Could you share a command?

Blind0ne gravatar image Blind0ne  ( 2019-02-08 04:58:58 -0600 )edit
0

answered 2021-10-09 04:47:52 -0600

fatal error: console_bridge/console.h: No such file or directory

sudo apt-get install libconsole-bridge-dev
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-05-06 08:21:45 -0600

Seen: 8,595 times

Last updated: May 07 '13