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

dustingooding's profile - activity

2021-01-26 11:12:51 -0500 commented question ROS2: Set Remote Parameter - Results in Exception

I have a similar issue on Foxy. Specifically, I'm trying to use colcon test to spin up a "node under test" that has par

2020-11-24 00:29:24 -0500 received badge  Nice Question (source)
2020-09-14 03:17:49 -0500 received badge  Popular Question (source)
2020-09-14 03:17:49 -0500 received badge  Notable Question (source)
2020-09-14 03:17:49 -0500 received badge  Famous Question (source)
2019-11-25 08:37:51 -0500 marked best answer Pointgrey Camera Driver Kinetic Ubuntu package unauthenticated

I'm running the ROS Kinetic docker container and using rosdep to install the Pointgrey Camera Driver package, but I'm getting this error:

WARNING: The following packages cannot be authenticated!
  ros-kinetic-pointgrey-camera-driver
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
ERROR: the following rosdeps failed to install
  apt: command [apt-get install -y ros-kinetic-pointgrey-camera-driver] failed

I'm not a fan of --allow-unauthenticated. Is this expected behavior?

2019-11-24 22:53:53 -0500 commented question Pointgrey Camera Driver Kinetic Ubuntu package unauthenticated

I tried it on a fresh image. dgooding@createbonfire:~$ docker pull ros:kinetic kinetic: Pulling from library/ros Digest

2019-11-24 22:53:24 -0500 commented question Pointgrey Camera Driver Kinetic Ubuntu package unauthenticated

dgooding@createbonfire:~$ docker pull ros:kinetic kinetic: Pulling from library/ros Digest: sha256:9186eb099225c

2019-11-24 22:53:11 -0500 commented question Pointgrey Camera Driver Kinetic Ubuntu package unauthenticated

dgooding@createbonfire:~$ docker pull ros:kinetic kinetic: Pulling from library/ros Digest: sha256:9186eb099225c

2019-11-22 08:59:51 -0500 asked a question Pointgrey Camera Driver Kinetic Ubuntu package unauthenticated

Pointgrey Camera Driver Kinetic Ubuntu package unauthenticated I'm running the ROS Kinetic docker container and using ro

2018-06-18 00:52:21 -0500 received badge  Taxonomist
2018-05-31 02:10:09 -0500 received badge  Famous Question (source)
2017-11-27 09:35:40 -0500 marked best answer How to export non-standard include directories in catkin?

This question spawned from question 68680.

I'm using yujin_tools to cross-compile ROS for ARM. I've created a Catkin package for tinyxml that installs headers to <sysroot-prefix>/include/tinyxml, and the package advertises "include" and "include/tinyxml" in the catkin_package() macro.

When I build rospack, it complains about not finding the tinyxml.h header:

/home/user/ros_yujin_ws/src/rospack/src/rospack.cpp:30: fatal error: tinyxml.h: No such file or directory

rospack is using the non-namespaced version of the tinyxml include directive, but I've installed them namespaced. How do I tell rospack to look in <prefix>/include/tinyxml instead of or in addition to <prefix>/include?

2017-10-02 06:19:04 -0500 marked best answer Using catkin to generate and use protobuf messages

Using fuerte/rosbuild, I was able to "cheat" and both generate cpp/py protobuf files and link/import them from other projects. I say "cheat" because the generated artifacts ended up in the package source directory and was easy to find. But hydro/catkin does things "right" and I can't cheat anymore.

Say I have two packages: my_package_msgs and my_package_nodes. In my_package_msgs, there's a proto directory with *.proto message files. I use an add_custom_command() call to generate the protobuf artifacts and output directories. Here's basically how its written right now:

cmake_minimum_required(VERSION 2.8.3)
project(my_package_msgs)

find_package(catkin REQUIRED)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(ProtocolBuffers REQUIRED)

set(proto_dir ${PROJECT_SOURCE_DIR}/proto)
set(proto_files ${proto_dir}/Message0.proto
                ${proto_dir}/Message1.proto
                ${proto_dir}/Message2.proto)
message(STATUS "Proto Source Dir: ${proto_dir}")
message(STATUS "Proto Source Files: ${proto_files}")

# Set up destination directories
catkin_destinations()
set(proto_gen_dir ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/proto_gen)
set(proto_gen_cpp_dir ${proto_gen_dir}/cpp/include/${PROJECT_NAME})
set(proto_gen_python_dir ${proto_gen_dir}/python)
file(MAKE_DIRECTORY ${proto_gen_dir})
file(MAKE_DIRECTORY ${proto_gen_cpp_dir})
file(MAKE_DIRECTORY ${proto_gen_python_dir})
set(protogen_include_dirs ${proto_gen_cpp_dir}/../ ${proto_gen_python_dir})
message(STATUS "Proto Include Dirs: ${protogen_include_dirs}")

# Create lists of files to be generated.
set(proto_gen_cpp_files "")
set(proto_gen_python_files "")
foreach(proto_file ${proto_files})
    get_filename_component(proto_name ${proto_file} NAME_WE)
    list(APPEND proto_gen_cpp_files ${proto_gen_cpp_dir}/${proto_name}.pb.h ${proto_gen_cpp_dir}/${proto_name}.pb.cc)
    list(APPEND proto_gen_python_files ${proto_gen_python_dir}/${proto_name}_pb2.py)
endforeach(proto_file ${proto_files})

# Run protoc and generate language-specific headers.
add_custom_command(
    COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --proto_path=${proto_dir} --cpp_out=${proto_gen_cpp_dir} --python_out=${proto_gen_python_dir} ${proto_files}
    DEPENDS ${PROTOBUF_PROTOC_EXECUTABLE} ${proto_files}
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    OUTPUT ${proto_gen_cpp_files} ${proto_gen_python_files}
)

# Create proto library for linking.
include_directories(${PROTOBUF_INCLUDE_DIR} ${PROTOBUF_INCLUDE_DIR}/../../)
add_library(${PROJECT_NAME}_proto ${proto_gen_cpp_files})
target_link_libraries(${PROJECT_NAME}_proto ${PROTOBUF_LIBRARY})

catkin_package(
  INCLUDE_DIRS ${protogen_include_dirs}
  LIBRARIES ${PROJECT_NAME}_proto
)

install(TARGETS ${PROJECT_NAME}_proto
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY ${proto_gen_cpp_dir}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  FILES_MATCHING PATTERN "*.h"
)

install(DIRECTORY ${proto_gen_python_dir}/
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

I tried using catkin_install_python(), but it complains about files not existing (because they haven't been generated). I haven't tried using catkin_python_setup() because of the same problem, and because the output isn't a normal python library layout.

Then, my_package_nodes 'run_depend's on my_package_msgs. But, when I attempt to rosrun one of the python executables in my_package_nodes, I get errors that say python modules aren't found:

Traceback (most recent call last):
  File "/home/dgooding/catkin_ws/src/my_packages/my_package_nodes/src/Node2.py", line 8, in <module>
    import Message2_pb2
ImportError: No module named Message2_pb2

So what's the correct (not cheating) way to generate cpp and python files in one catkin package, and have a second package access them?

edit: I've adopted some techniques from http://answers.ros.org/question/12322... that have helped... but not completely done yet.

edit2: I tried making use of catkin_python_setup() (using some configure_file() magic to find the generated python files), but I think catkin_python_setup() is being executed before the code generation happens because I end up with an empty directory in the dist-packages area in devel space.

2017-10-02 06:19:04 -0500 received badge  Self-Learner (source)
2017-10-02 05:05:22 -0500 received badge  Nice Question (source)
2017-04-20 13:25:16 -0500 marked best answer Defining a dependency for (a Python) add_rostest call?

I have a unit test written in Python that depends on a package that generates messages. If I run catkin_make run_tests --only-pkg-with-deps my_package, the test fails because it can't find the message modules. (If I run catkin_make --only-pkg-with-deps my_package before running the tests, the tests pass because the messages are generated.)

Without a proper/obvious CMake target (because Python), what's the preferred way to force catkin/cmake to build the messages before running the tests? I don't want to have to build everything first, as I believe CMake targets should be self-sufficient.

My current approach, though hacky, is to make my rostest stanza look like this:

if(CATKIN_ENABLE_TESTING)
    find_package(rostest REQUIRED)
    find_package(my_msgs REQUIRED)

    add_rostest(tests/my_test.test)
    add_dependencies(_run_tests_my_package_rostest_test_my_test.test ${my_msgs_EXPORTED_TARGETS})
endif()
2017-04-20 13:23:42 -0500 received badge  Famous Question (source)
2017-02-06 10:16:31 -0500 received badge  Famous Question (source)
2016-09-27 13:52:43 -0500 received badge  Notable Question (source)
2016-09-06 09:41:18 -0500 answered a question Unable to run R2 Simulation

Might be too late, but we've migrated to a new host and had a few major upgrades to the sim. https://gitlab.com/nasa-jsc-robotics/...

2016-08-09 15:17:49 -0500 received badge  Famous Question (source)
2016-08-09 08:47:58 -0500 received badge  Notable Question (source)
2016-08-08 22:47:23 -0500 received badge  Popular Question (source)
2016-08-04 13:17:13 -0500 asked a question Generating metapackage artifacts with catkin_tools?

My use case is non-standard. I can't use the public Bloom infrastructure because I have non-public packages, and in the past, I created non-Bloom build scripts that helped me generate Debian packages. I can't easily replace them as they're pretty baked into our process.

Previously, with catkin_make, I could build a metapackage and it's share/package_name/package.xml would show up in the install path. I used this to my advantage to create Debians for my metapackages. My workflow was roughly:

  1. Create a workspace dep_ws with the metapackage repo and all its dependencies in it.
  2. Build the "dependency" workspace and source dep_ws/install/setup.bash.
  3. Create a workspace pkg_ws with only the metapackage's repo in it.
  4. Build the "package" workspace.

This resulted in a "clean" install space with just the metapackage in it, as all its dependencies were met in the dependency workspace. I then dumped (more or less) the install path into a Debian and added the metapackage's dependencies as Debian dependencies.

I'm attempting to switch to catkin_tools as it provides many benefits, but I'm running into a problem recreating this workflow. With catkin build, metapackage artifacts don't show up in the install path. In fact, with --summary, it shows the metapackage being [Ignored] (even when I use --whitelist to only allow the metapackage to be built).

How do I generate metapackage artifacts with catkin_tools, such that I can Debianize them and get a "meta-Debian"? Ultimately, the artifacts are important so that I can query the as-built metapackage for its dependencies and add them as Debian dependencies. But if the metapackage's package.xml isn't in the install path, I have no way of doing that.

Or, am I holding it wrong and there's a different/better/correct way to do this (that doesn't involve all of Bloom)? Should I simply treat metapackages differently than normal packages and have a different process for them (now)?

Follow-on: If it is possible to generate metapackage artifacts with catkin_tools, I would also need it to only build the metapackage and not the <exec_depend>s. Currently, even using --whitelist, if I catkin build the metapackage, all its <exec_depend>s get built, too, and pollute the "clean" install space. Is this possible?

2016-07-28 19:18:19 -0500 received badge  Notable Question (source)
2016-07-28 16:52:53 -0500 received badge  Commentator
2016-07-28 16:52:53 -0500 commented answer Installing recursive dependencies with rosdep?

Done.

It's worth noting rospack depends A doesn't work if A is a metapackage. [rospack] Error: no such package A

2016-07-28 15:47:00 -0500 received badge  Popular Question (source)
2016-07-28 13:48:14 -0500 commented answer Installing recursive dependencies with rosdep?

I added an answer, because comments are too short for meaningful discussion.

2016-07-28 13:47:45 -0500 answered a question Installing recursive dependencies with rosdep?

In this case, I haven't built the workspace yet, because I haven't installed all the system build dependencies. So, I've cloned a few repos (including A and B) into a workspace src dir and then I do the following:

ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH rosdep install -i A

So here, B is found in the path and rosdep will not attempt to install B (in Debian form). This is preferred, as I'm actively developing on B. It does not however, attempt to resolve and install B's dependency libfoo.

ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH rosdep install -i B

This does resolve and install B's dependency libfoo.

My problem with "just install all the dependencies for everything in your workspace" is now I have to be very selective about what's in my workspace and how my repos are structured, even though I have the ability to only catkin build a certain package and its dependencies. This is particularly onerous when I have metapackages with both backend and frontend packages in them, and I only want to build the backend (on robot) and frontend (on console). It makes a lot of sense to keep the metapackage together so backend and frontend are tightly coupled... but I don't want to install a bunch of X or Qt dependencies on my robot.

I just want rosdep to do what I believe it's says it does... Without using -n I expect implicit/recursive dependencies to be considered.

In the end, I would love a workflow that looks like this:

source /opt/ros/release/setup.bash
mkdir ~/ws/src
cd ~/ws/src
vcs import < ~/bunch-of-repos.yaml
ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH rosdep install -i on_robot_metapackage
cd ..
catkin config --init
catkin build on_robot_metapackage

And end up with all the system dependencies installed and workspace-resident catkin package dependencies built for my on-robot needs... and a very similar workflow with on_console_metapackage for my on-console needs.

2016-07-27 21:34:46 -0500 asked a question Installing recursive dependencies with rosdep?

I've got two catkin packages A and B, and a rosdep key for libfoo. A <depend>s on B. B <depend>s on libfoo. libfoo is not installed. rosdep install A does not attempt to install libfoo. rosdep install B does. Why doesn't rosdep recursively find all of A's dependencies and install them? There's a rosdep argument -n that says to ignore implicit/recursive dependencies, but I'm not using it, so I would expect libfoo to be found. Help?

Versions: rosdep v0.11.5, ROS Hydro, Ubuntu 12.04.5

Edit:

In this case, I haven't built the workspace yet, because I haven't installed all the system build dependencies. So, I've cloned a few repos (including A and B) into a workspace src dir and then I do the following:

ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH rosdep install -i A

So here, B is found in the path and rosdep will not attempt to install B (in Debian form). This is preferred, as I'm actively developing on B. It does not however, attempt to resolve and install B's dependency libfoo.

ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH rosdep install -i B

This does resolve and install B's dependency libfoo.

My problem with "just install all the dependencies for everything in your workspace" is now I have to be very selective about what's in my workspace and how my repos are structured, even though I have the ability to only catkin build a certain package and its dependencies. This is particularly onerous when I have metapackages with both backend and frontend packages in them, and I only want to build the backend (on robot) and frontend (on console). It makes a lot of sense to keep the metapackage together so backend and frontend are tightly coupled... but I don't want to install a bunch of X or Qt dependencies on my robot.

I just want rosdep to do what I believe it's says it does... Without using -n I expect implicit/recursive dependencies to be considered.

In the end, I would love a workflow that looks like this:

source /opt/ros/release/setup.bash
mkdir ~/ws/src
cd ~/ws/src
vcs import < ~/bunch-of-repos.yaml
ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH rosdep install -i on_robot_metapackage
cd ..
catkin config --init
catkin build on_robot_metapackage

And end up with all the system dependencies installed and workspace-resident catkin package dependencies built for my on-robot needs... and a very similar workflow with on_console_metapackage for my on-console needs.

Edit 2:

For metapackages... maybe something like this to rosdep install their dependencies:

# get direct dependencies
grep "exec_depend" ~/ws/src/A/package.xml | \
sed 's|^[[:blank:]]*<exec_depend>\(.*\)</exec_depend>|\1|' | \
ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH xargs -n1 rosdep install -i

# get direct dependencies' dependencies
grep "exec_depend" ~/ws/src/A/package.xml | \
sed 's|^[[:blank:]]*<exec_depend>\(.*\)</exec_depend>|\1|' | \
ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH xargs -n1 rospack depends | \
sort | uniq | \
ROS_PACKAGE_PATH=~/ws/src:$ROS_PACKAGE_PATH xargs -n1 rosdep install -i

That seems overly complicated...

2016-03-17 06:28:50 -0500 received badge  Notable Question (source)
2016-02-19 04:40:33 -0500 received badge  Famous Question (source)
2015-12-02 09:44:40 -0500 received badge  Popular Question (source)
2015-11-23 11:17:25 -0500 received badge  Notable Question (source)