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

I.T's profile - activity

2019-01-16 04:27:41 -0500 received badge  Good Question (source)
2018-08-09 03:58:36 -0500 received badge  Nice Question (source)
2016-09-12 13:43:15 -0500 received badge  Commentator
2016-09-12 13:43:15 -0500 commented answer Set parameter list using XmlRpc

@ROSfc See my updated answer. Sorry for late reply!

2016-09-12 13:42:43 -0500 edited answer Set parameter list using XmlRpc

I finally ended up setting the parameter by using a launch file for my node.

Example:

Launch file:

<launch>
    <rosparam param="x_vector">[1.0, 2.0,
3.0]</rosparam>
    <node name="my_node" pkg="my_package" type="my_node" />
</launch>

Then in your node, get the vector like this:

std::vector<double> x_vec;
std::vector<double> x_vec_default = {1.0, 0.5, 0.5, 1.0};

n.param<std::vector<double> >("x_vector", x_vec, x_vec_default);

And x_vec will hold the values given in the launch file, or the contents in x_vec_default if the x_vector is not available as a parameter (for example if launching the node without the launch file).

2016-09-02 03:48:08 -0500 marked best answer Set parameter list using XmlRpc

Hi,

I need to set some ros parameters where one of them is a list of strings. I'm using C++ but cannot find an example of how to do it.

I currently have a list std::vector<std::string> which I want to set in the ros parameter server.

From here http://www.ros.org/wiki/roscpp/Overview/Parameter%20Server I understand I need to use XmlRpc::XmlRpcValue to set the array.

So far I have tried:

//agent_names is a populated std::vector of std::string

XmlRpc::XmlRpcValue vocabulary(agent_names);

n.setParam("vocabulary", vocabulary);

But it doesn't compile.

How do I construct an XmlRpcValue object from a std::vector?

Also, do I need to link to the XmlRpc library in my CMakeLists.txt and then import headers in my code? In that case, what do I put in my CMakeLists.txt?

Any help is greatly appreciated =)

2016-07-11 14:23:01 -0500 received badge  Taxonomist
2016-02-20 13:44:40 -0500 received badge  Famous Question (source)
2016-02-20 13:16:08 -0500 commented answer Sourcing install setup.bash with cross compiled install

Thank you, using the --extend option when sourcing the second setup.bash works. Am I alone in cross compiling my packages or in the way I move them to the target board?

2016-02-19 12:51:13 -0500 commented question Sourcing install setup.bash with cross compiled install

No respose in almost a month, I assume this means that either: 1) I am way off, or 2) It should work this way, at least in theory. But which one is it? :)

2016-01-31 11:15:26 -0500 received badge  Notable Question (source)
2016-01-31 10:35:30 -0500 commented question Sourcing install setup.bash with cross compiled install

Thank you for the suggestion, let's hope it helps.

2016-01-25 07:57:23 -0500 received badge  Popular Question (source)
2016-01-24 10:08:06 -0500 asked a question Sourcing install setup.bash with cross compiled install

Hi,

I am using ROS Jade on an Odroid XU4 (ARM) running Ubuntu 15.04. I have managed to successfully cross-compile a bare bones ROS Jade install, and moved the install_isolated folder to the Odroid. I source the setup.bash file and can start roscore, so far so good. However, when I cross-compile my own package (in a separate folder from the install) and move that devel folder to the board, then sourcing that setup.bash file removes the install_isolated/bin directory from the PATH and I can no longer start roscore.

When I cross compile my package on my computer I had sourced the install_isolated/setup.bash for the cross compiled install.

What steps do I need to take in order to not have my package's setup.bash file remove the install from PATH?

Thanks!

2015-10-25 11:25:46 -0500 commented question Cross compiling ROS for ARM fails to link roscpp

No one..? I find it fascinating the ROBOT Operating System seems so hard to cross compile for an embedded target, like, you know, an actual robot.

2015-10-25 11:22:22 -0500 received badge  Famous Question (source)
2015-10-18 02:49:39 -0500 received badge  Enthusiast
2015-10-16 13:14:26 -0500 received badge  Notable Question (source)
2015-10-16 02:44:48 -0500 received badge  Popular Question (source)
2015-10-15 13:35:26 -0500 commented answer Compile roscore for ARM board

@GummyBear Hello again! I'm now at this again (one year later), but this time with an Odroid board. I posted a follow up question to this here

2015-10-15 13:31:17 -0500 asked a question Cross compiling ROS for ARM fails to link roscpp

Hi,

I'm posting this as a follow up to a previous question I asked.

Since asking that question I have changed my embedded board to an Odroid XU4 running Ubuntu 15.04. I'm trying to cross compile ROS-Jade (Bare bones) for the Odroid. My computer also runs Ubuntu 15.04. What I have done so far:

1) Installed arm-linux-gnueabihf-gcc cross toolchain.

2) Created a sysroot for the board in my computer, in which I have folders bin, lib and arm-linux-gnueabihf copied from the Odroid.

3) Created a cmake toolchain file, odroid.cmake:

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)

SET(catkin_DIR $ENV{HOME}/ros-arm-jade/ros_install_ws/devel_isolated/catkin/share/catkin/cmake)
SET(gencpp_DIR $ENV{HOME}/ros-arm-jade/ros_install_ws/devel_isolated/gencpp/share/gencpp/cmake)
SET(geneus_DIR $ENV{HOME}/ros-arm-jade/ros_install_ws/devel_isolated/geneus/share/geneus/cmake)
SET(genlisp_DIR $ENV{HOME}/ros-arm-jade/ros_install_ws/devel_isolated/genlisp/share/genlisp/cmake)

set(CMAKE_LIBRARY_PATH
  $ENV{HOME}/odroid/rootfs/usr/lib
  $ENV{HOME}/odroid/rootfs/usr/lib/arm-linux-gnueabihf)

set(LD_LIBRARY_PATH ${LD_LIBRARY_PATH}
  $ENV{HOME}/odroid/rootfs/usr/lib
  $ENV{HOME}/odroid/rootfs/usr/lib/arm-linux-gnueabihf)

SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/odroid/rootfs)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)

4) Followed the install from source instructions for Jade, where I'm stuck at the compile step

./src/catkin/bin/catkin_make_isolated -DCMAKE_TOOLCHAIN_FILE=$HOME/odroid/odroid.cmake -DCMAKE_BUILD_TYPE=Release

The error I get looks like the following

Linking CXX shared library /home/it/ros-arm-jade/ros_install_ws/devel_isolated/roscpp/lib/libroscpp.so
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld: /home/it/odroid/rootfs/usr/lib/arm-linux-gnueabihf/libm.a(w_fmod.o): relocation R_ARM_THM_MOVW_ABS_NC against `_LIB_VERSION' can not be used when making a shared object; recompile with -fPIC
/home/it/odroid/rootfs/usr/lib/arm-linux-gnueabihf/libm.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

I got a similar error (recompile with -fPIC) for an earlier package, complaining about linking to libzl2. I solved that issue by downloading the libzl2 sources and actually compiling with -fPIC, then replacing the libzl2 library in my sysroot with the newly compiled one. But this time it complains about libm, which I would not like to recompile with -fPIC.

Googling about this I found somewhere that the linking should be done to the .so file instead of the .a file. In my sysroot I have both ~/odroid/rootfs/lib/arm-linux-gnueabihf/libm.a and lib/arm-linux-gnueabihf/libm.so.6. I tried creating a symlink lib/arm-linux-gnueabihf/libm.so pointing to libm.so.6, but that still yields the same error as above.

Any ideas?

2015-06-19 15:50:38 -0500 received badge  Favorite Question (source)
2015-04-20 22:51:48 -0500 marked best answer Compile roscore for ARM board

I have previously used ROS only on PC but found the use of rosbags for offline debugging to be convenient. I would now like to use ROS to record sensor data on an embedded ARM board running Linux. I wonder if it is possible to do this without doing a full ROS install on the board?

All I would need are nodes running on the board which can publish their sensor readings to topics and then a laptop on the same network can do the rosbag recordings.

I have a cross-toolchain set up for compiling executables for the board. The following document explains how to use a toolchain to compile libraries and ROS for ARM but it is not clear how to install it on the board once it's all compiled. ftp://ftp.heanet.ie/disk1/sourceforge/c/project/ca/carm/ROS%20cross-compile%20on%20ARM.pdf

If I manage to cross compile boost, apr, apr-utils, log4cxx and ROS (as mentioned in the above document) what do I get and how do I move it (and where?) to the ARM board?

Can I then later cross compile my ROS nodes, copy them to the board and simply run them, provided roscore runs on a laptop?

I hope this makes sense.

Update: I am using a Wandboard with custom compiled Linux version 3.10.17.

2014-09-01 06:20:10 -0500 received badge  Famous Question (source)
2014-08-28 05:44:20 -0500 commented answer Compile roscore for ARM board

Thanks, but I wish to install ROS without changing the OS on my board, so this does not really answer the question...