ROS offboard positioning with LPS

Discussions about all things Bitcraze
Post Reply
curiousstudent
Beginner
Posts: 5
Joined: Sun Jan 05, 2020 6:52 pm

ROS offboard positioning with LPS

Post by curiousstudent » Sun Jan 05, 2020 6:56 pm

Hi,

I have a quick question if anyone has any time they can spare.

I am trying to set up the: ROS offboard positioning with LPS

I started to follow the steps but I am having an issue at:
5: Run catkin_make to build the packages

I keep getting the following issue:

Base path: /home/edwin-pcp/catkin_ws
Source space: /home/edwin-pcp/catkin_ws/src
Build space: /home/edwin-pcp/catkin_ws/build
Devel space: /home/edwin-pcp/catkin_ws/devel
Install space: /home/edwin-pcp/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/edwin-pcp/catkin_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/edwin-pcp/catkin_ws/build"
####
[ 0%] Built target std_msgs_generate_messages_eus
[ 1%] Built target std_msgs_generate_messages_py
[ 5%] Built target crazyflie_cpp
[ 5%] Built target std_msgs_generate_messages_cpp
[ 5%] Built target std_msgs_generate_messages_nodejs
[ 5%] Built target std_msgs_generate_messages_lisp
[ 6%] Built target quadrotor_teleop
[ 7%] Built target crazyflie_controller
[ 7%] Built target _bitcraze_lps_estimator_generate_messages_check_deps_RangeArray
[ 7%] Built target geometry_msgs_generate_messages_cpp
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_Stop
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_LogBlock
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_GenericLogData
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_StartTrajectory
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_UpdateParams
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_TrajectoryPolynomialPiece
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_UploadTrajectory
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_FullState
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_RemoveCrazyflie
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_Hover
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_AddCrazyflie
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_Position
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_Land
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_Takeoff
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_crtpPacket
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_sendPacket
[ 7%] Built target geometry_msgs_generate_messages_py
[ 7%] Built target _crazyflie_driver_generate_messages_check_deps_SetGroupMask
[ 7%] Built target geometry_msgs_generate_messages_nodejs
[ 7%] Built target geometry_msgs_generate_messages_lisp
[ 7%] Built target geometry_msgs_generate_messages_eus
[ 8%] Built target log
[ 9%] Built target listLogVariables
[ 10%] Built target scan
[ 10%] Built target _crazyflie_driver_generate_messages_check_deps_GoTo
[ 13%] Built target listParams
[ 14%] Built target listMemories
[ 16%] Built target reboot
[ 17%] Built target battery
[ 18%] Built target console
[ 19%] Built target flash
[ 21%] Built target version
[ 22%] Built target comCheck
[ 23%] Generating Python from MSG bitcraze_lps_estimator/RangeArray
[ 25%] Generating C++ code from bitcraze_lps_estimator/RangeArray.msg
[ 26%] Built target bitcraze_lps_estimator_generate_messages_eus
[ 26%] Built target bitcraze_lps_estimator_generate_messages_nodejs
[ 27%] Built target bitcraze_lps_estimator_generate_messages_lisp
[ 27%] Generating C++ code from crazyflie_driver/FullState.msg
[ 28%] Generating Python from MSG crazyflie_driver/FullState
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py", line 44, in <module>
import genpy.generator
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
import yaml
ImportError: No module named 'yaml'
lps-ros/CMakeFiles/bitcraze_lps_estimator_generate_messages_py.dir/build.make:62: recipe for target '/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/bitcraze_lps_estimator/msg/_RangeArray.py' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/bitcraze_lps_estimator/msg/_RangeArray.py] Error 1
CMakeFiles/Makefile2:1490: recipe for target 'lps-ros/CMakeFiles/bitcraze_lps_estimator_generate_messages_py.dir/all' failed
make[1]: *** [lps-ros/CMakeFiles/bitcraze_lps_estimator_generate_messages_py.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 29%] Generating C++ code from crazyflie_driver/TrajectoryPolynomialPiece.msg
Traceback (most recent call last):
File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41, in <module>
import genmsg.template_tools
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39, in <module>
import em
ImportError: No module named 'em'
lps-ros/CMakeFiles/bitcraze_lps_estimator_generate_messages_cpp.dir/build.make:62: recipe for target '/home/edwin-pcp/catkin_ws/devel/include/bitcraze_lps_estimator/RangeArray.h' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/include/bitcraze_lps_estimator/RangeArray.h] Error 1
CMakeFiles/Makefile2:1199: recipe for target 'lps-ros/CMakeFiles/bitcraze_lps_estimator_generate_messages_cpp.dir/all' failed
make[1]: *** [lps-ros/CMakeFiles/bitcraze_lps_estimator_generate_messages_cpp.dir/all] Error 2
Traceback (most recent call last):
File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41, in <module>
import genmsg.template_tools
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39, in <module>
import em
ImportError: No module named 'em'
[ 29%] Generating Python from MSG crazyflie_driver/TrajectoryPolynomialPiece
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py", line 44, in <module>
import genpy.generator
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
import yaml
ImportError: No module named 'yaml'
crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_cpp.dir/build.make:85: recipe for target '/home/edwin-pcp/catkin_ws/devel/include/crazyflie_driver/FullState.h' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/include/crazyflie_driver/FullState.h] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 30%] Generating Python from MSG crazyflie_driver/Position
crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_py.dir/build.make:86: recipe for target '/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/crazyflie_driver/msg/_FullState.py' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/crazyflie_driver/msg/_FullState.py] Error 1
make[2]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "/opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py", line 41, in <module>
import genmsg.template_tools
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/template_tools.py", line 39, in <module>
import em
ImportError: No module named 'em'
crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_cpp.dir/build.make:91: recipe for target '/home/edwin-pcp/catkin_ws/devel/include/crazyflie_driver/TrajectoryPolynomialPiece.h' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/include/crazyflie_driver/TrajectoryPolynomialPiece.h] Error 1
CMakeFiles/Makefile2:3854: recipe for target 'crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_cpp.dir/all' failed
make[1]: *** [crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_cpp.dir/all] Error 2
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py", line 44, in <module>
import genpy.generator
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
import yaml
ImportError: No module named 'yaml'
crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_py.dir/build.make:91: recipe for target '/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/crazyflie_driver/msg/_TrajectoryPolynomialPiece.py' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/crazyflie_driver/msg/_TrajectoryPolynomialPiece.py] Error 1
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py", line 44, in <module>
import genpy.generator
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/__init__.py", line 34, in <module>
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 44, in <module>
import yaml
ImportError: No module named 'yaml'
crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_py.dir/build.make:97: recipe for target '/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/crazyflie_driver/msg/_Position.py' failed
make[2]: *** [/home/edwin-pcp/catkin_ws/devel/lib/python3/dist-packages/crazyflie_driver/msg/_Position.py] Error 1
CMakeFiles/Makefile2:3091: recipe for target 'crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_py.dir/all' failed
make[1]: *** [crazyflie_ros/crazyflie_driver/CMakeFiles/crazyflie_driver_generate_messages_py.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed


Does anyone have any idea what I should do?



arnaud
Bitcraze
Posts: 2272
Joined: Tue Feb 06, 2007 12:36 pm

Re: ROS offboard positioning with LPS

Post by arnaud » Tue Jan 07, 2020 2:35 pm

I do not have enough experience to know for sure what is happening but this line "ImportError: No module named 'yaml'" hints that there might be a problem with the way you have setup your computer. So my advice would be to check the ROS wiki for setup instruction to make sure that your computer is well setup for running ROS.

curiousstudent
Beginner
Posts: 5
Joined: Sun Jan 05, 2020 6:52 pm

Re: ROS offboard positioning with LPS

Post by curiousstudent » Wed Jan 08, 2020 12:22 am

Hi!

Yes you were right I just tried reinstalling everything and that issue no longer occurs.

But would you know why the following error happens? This is for the following step in the ROS LPS set up.

ERROR: Rosdep cannot find all required resources to answer your query
Missing resource bitcraze_lps_estimator
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/edwinpcp/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share


Again anyhelp is greatly appreciated

arnaud
Bitcraze
Posts: 2272
Joined: Tue Feb 06, 2007 12:36 pm

Re: ROS offboard positioning with LPS

Post by arnaud » Wed Jan 08, 2020 8:48 am

It still looks like project setup problem to me, though one more important feedback is: do not use the ros_lps package. You should use Crazyflie_ros directly or Crazyswarm since they implement everything required to control Crazyflies tracked with LPS. I updated the ros_lps project readme with some link to alternatives: https://github.com/bitcraze/lps-ros

Post Reply