Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosdep complaint? #7

Closed
slowrunner opened this issue Sep 4, 2019 · 8 comments
Closed

rosdep complaint? #7

slowrunner opened this issue Sep 4, 2019 · 8 comments

Comments

@slowrunner
Copy link

Following the [u]updated instructions[/u], I am getting this error:

pi@ROSPI:~/gopigo3_ws $ rosdep install --from-paths src --ignore-src -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
gopigo3_node: No definition of [tf] for OS [debian]

Any ideas?

@christianrauch
Copy link
Member

The same issue has already been reported as port of #6 .

Are you using a binary installation? Try to install ros-kinetic-tf (sudo apt install ros-kinetic-tf).

@slowrunner
Copy link
Author

slowrunner commented Sep 4, 2019

Are you using a binary installation? Try to install ros-kinetic-tf (sudo apt install ros-kinetic-tf).

Thanks - no I built from source, and my apt-get can't locate a package ros-kinetic-tf.
My catkin_make in gopigo3_ws didn't complain about nav_msgs, but does about geometry_msgs.

The only place I find geometry_msgs is /home/pi/ros_catkin_ws/src/genmsg/test/files/geometry_msgs

btw this is my ROS Kinetic package list, if that helps:
$ rospack list-names
catkin
cmake_modules
cpp_common
gencpp
geneus
genlisp
genmsg
gennodejs
genpy
gopigo3_node
message_filters
message_generation
message_runtime
mk
ros_environment
rosbag
rosbag_storage
rosbash
rosboost_cfg
rosbuild
rosclean
rosconsole
roscpp
roscpp_serialization
roscpp_traits
roscreate
rosgraph
rosgraph_msgs
roslang
roslaunch
roslib
roslisp
roslz4
rosmake
rosmaster
rosmsg
rosnode
rosout
rospack
rosparam
rospy
rosservice
rostest
rostime
rostopic
rosunit
roswtf
std_msgs
std_srvs
topic_tools
xmlrpcpp

@christianrauch
Copy link
Member

I think these issues are related.
First, make sure that you sourced the core ROS workspace (the one containing the base packages) before compiling the gopigo workspace. This should be source /home/pi/ros_catkin_ws/install/setup.bash or source /home/pi/ros_catkin_ws/devel/setup.bash in your case, or wherever the compiled workspace is saved.

The ros-kinetic-* packages are only available on a binary installation.

@slowrunner
Copy link
Author

slowrunner commented Sep 5, 2019

make sure that you sourced the core ROS workspace

The [u]Installing ROS Kinetic On Raspberry Pi wiki[/u] instructed to source /opt/ros/kinetic/setup.bash, so the last two lines of my ~/.bashrc are:

source /opt/ros/kinetic/setup.bash
source ~/gopigo3_ws/devel/setup.bash

so my env looks like:

env | grep 'ros\|ROS\|PATH'
LD_LIBRARY_PATH=/home/pi/gopigo3_ws/devel/lib:/opt/ros/kinetic/lib
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
CMAKE_PREFIX_PATH=/home/pi/gopigo3_ws/devel:/opt/ros/kinetic
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
PYTHONPATH=/opt/ros/kinetic/lib/python2.7/dist-packages
ROS_PACKAGE_PATH=/home/pi/gopigo3_ws/src:/opt/ros/kinetic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/pi/gopigo3_ws/devel/share/common-lisp
PATH=/opt/ros/kinetic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
PKG_CONFIG_PATH=/opt/ros/kinetic/lib/pkgconfig
ROS_DISTRO=kinetic

I see a bunch of "setup.bash" files under
/home/pi/ros_catkin_ws/devel_isolated/
/home/pi/ros_catkin_ws/build_isolated/

and home/pi/ros_catkin_ws/ looks like:
pi@ROSPI:~/gopigo3_ws $ ls /home/pi/ros_catkin_ws/
build_isolated catkin_make.out devel_isolated kinetic-ros_comm-wet.rosinstall src


btw, should the gopigo3_node dependency tf be tf2?
"tf provided a system for representing, tracking and transforming coordinate frames until ROS Hydro, when it was deprecated in favor of tf2." http://wiki.ros.org/tf

@christianrauch
Copy link
Member

If packages are not part of the core ROS workpace, you will have to install them manually. From your output of rospack list-names I gather that geometry_msgs and tf are not installed. Since you moved the ROS installation to /opt/ros/kinetic, you should only need to source this, and not require the source folder at /home/pi/ros_catkin_ws anymore.

It actually appears as if many core packages are missing from your workspace. The repo https://github.com/ros/common_msgs contains core message types, but I don't see that they are installed.
Can you verify that your ROS installation is actually working? E.g. can you run the examples from the tutorials at http://wiki.ros.org/ROS/Tutorials and http://wiki.ros.org/turtlesim/Tutorials?

If you are just starting with ROS, I would recommend to use a binary installation. E.g. I used to use Ubuntu on a Raspberry Pi 2 and then followed the instructions at http://wiki.ros.org/melodic/Installation/Ubuntu. This simplifies the installation of packages enormously.

I thought about replacing tf by tf2 but this will not help with your missing packages and tf is still available in the ROS repositories.

@slowrunner
Copy link
Author

Decision: This is not an issue with GoPiGo3 Node. The GoPiGo3 Node requires ROS packages not installed by the current ROSberryPi install wiki "recommended variant ros-comm":

  • geometry_msgs
  • rospy
  • sensor_msgs
  • nav_msgs
  • tf (listed in packages.xml and still available, but is deprecated by tf2)

So closing this issue, and continuing to investigate how to build a ROS environment with the needed packages.

@christianrauch
Copy link
Member

That you installed only the small subset of packages in ros_comm explains why some core packages were missing :-) In such a case, you will need to add all required packages afterward.

All variants are listed at https://www.ros.org/reps/rep-0131.html#variants. The robot variant includes amongst others common_msgs and geometry.

@slowrunner
Copy link
Author

slowrunner commented Sep 5, 2019

I found success by adding the needed packages to the ros_comm installation done previously:

====== adding packages/stacks needed for GoPiGo3_Node

cd ~/ros_catkin_ws rosinstall_generator ros_comm geometry_msgs rospy sensor_msgs nav_msgs tf --rosdistro kinetic --deps --wet-only --tar >kinetic-custom_ros.rosinstall

$ wstool merge -t src kinetic-custom_ros.rosinstall
Performing actions:

Add new elements:
actionlib, angles, common_msgs/actionlib_msgs, common_msgs/geometry_msgs, common_msgs/nav_msgs, common_msgs/sensor_msgs, geometry/tf, geometry2/tf2, geometry2/tf2_msgs, geometry2/tf2_py, geometry2/tf2_ros

Config changed, maybe you need run wstool update to update SCM entries.
Overwriting /home/pi/ros_catkin_ws/src/.rosinstall

update complete.

$ wstool update -t src

$ rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r --os=debian:stretch

$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic -j2

It built, and it launches, and IT WORKS!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants