ethz-asl / mav_trajectory_generation

Polynomial trajectory generation and optimization, especially for rotary-wing MAVs.
Apache License 2.0
549 stars 225 forks source link

How do I update the planner in example.launch? #119

Closed kevin-thankyou-lin closed 3 years ago

kevin-thankyou-lin commented 3 years ago

Hi! I've set things up so that example.launch itself works fine. However, when I update e.g. example_planner_node.cc, and do the standard catkin build procedure the updates are not reflected when I do roslaunch on the example.launch file.

I've tried to catkin build at the 'root' directory of my workspace, but that fails when building mav_trajectory_generation_example.

~/new_ws$ catkin build
-------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/kinetic
Workspace:                   /home/kevin/new_ws
-------------------------------------------------------
Build Space:        [exists] /home/kevin/new_ws/build
Devel Space:        [exists] /home/kevin/new_ws/devel
Install Space:      [unused] /home/kevin/new_ws/install
Log Space:          [exists] /home/kevin/new_ws/logs
Source Space:       [exists] /home/kevin/new_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------
Devel Space Layout:          merged
Install Space Layout:        None
-------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=Release
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------
[build] Found '14' packages in 0.0 seconds.                                                                              
[build] Package table is up to date.                                                                                     
Starting  >>> catkin_simple                                                                                              
Starting  >>> mav_msgs                                                                                                   
Finished  <<< catkin_simple                                    [ 0.1 seconds ]                                           
Starting  >>> mav_state_machine_msgs                                                                                     
Finished  <<< mav_state_machine_msgs                           [ 0.4 seconds ]                                           
Starting  >>> mav_system_msgs                                                                                            
Finished  <<< mav_msgs                                         [ 0.8 seconds ]                                           
Starting  >>> nlopt                                                                                                      
Finished  <<< nlopt                                            [ 0.2 seconds ]                                           
Starting  >>> eigen_catkin                                                                                               
Finished  <<< eigen_catkin                                     [ 0.2 seconds ]                                           
Finished  <<< mav_system_msgs                                  [ 0.5 seconds ]                                           
Starting  >>> glog_catkin                                                                                                
Starting  >>> mav_planning_msgs                                                                                          
Finished  <<< glog_catkin                                      [ 0.2 seconds ]                                           
Starting  >>> mav_visualization                                                                                          
Finished  <<< mav_visualization                                [ 0.8 seconds ]                                           
Starting  >>> eigen_checks                                                                                               
Finished  <<< eigen_checks                                     [ 0.1 seconds ]                                           
Starting  >>> mav_trajectory_generation                                                                                  
Finished  <<< mav_planning_msgs                                [ 1.2 seconds ]                                           
Finished  <<< mav_trajectory_generation                        [ 0.4 seconds ]                                           
Starting  >>> mav_trajectory_generation_ros                                                                              
Finished  <<< mav_trajectory_generation_ros                    [ 0.6 seconds ]                                           
Starting  >>> mav_trajectory_generation_example                                                                          
_________________________________________________________________________________________________________________________
Warnings   << mav_trajectory_generation_example:cmake /home/kevin/new_ws/logs/mav_trajectory_generation_example/build.cmake.005.log
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:418 (message):
  catkin_package() include dir
  '/home/kevin/new_ws/src/mav_trajectory_generation/mav_trajectory_generation_example/include'
  should be placed in the devel space instead of the build space
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  /home/kevin/catkin_ws/devel/share/catkin_simple/cmake/catkin_simple-extras.cmake:214 (catkin_package)
  CMakeLists.txt:27 (cs_export)

I did move the include folder into the devel folder of mav_trajectory_generation_example, but I get this error:

Starting  >>> mav_trajectory_generation                                                                                  
Finished  <<< mav_trajectory_generation                        [ 0.8 seconds ]                                           
Finished  <<< mav_planning_msgs                                [ 1.3 seconds ]                                           
Starting  >>> mav_trajectory_generation_ros                                                                              
Finished  <<< mav_trajectory_generation_ros                    [ 0.9 seconds ]                                           
Starting  >>> mav_trajectory_generation_example                                                                          
_________________________________________________________________________________________________________________________
Warnings   << mav_trajectory_generation_example:cmake /home/kevin/new_ws/logs/mav_trajectory_generation_example/build.cmake.004.log
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:418 (message):
  catkin_package() include dir
  '/home/kevin/new_ws/src/mav_trajectory_generation/mav_trajectory_generation_example/include'
  should be placed in the devel space instead of the build space
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  /home/kevin/catkin_ws/devel/share/catkin_simple/cmake/catkin_simple-extras.cmake:214 (catkin_package)
  CMakeLists.txt:27 (cs_export)

cd /home/kevin/new_ws/build/mav_trajectory_generation_example; catkin build --get-env mav_trajectory_generation_example | catkin env -si  /usr/bin/cmake /home/kevin/new_ws/src/mav_trajectory_generation/mav_trajectory_generation_example --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/kevin/new_ws/devel -DCMAKE_INSTALL_PREFIX=/home/kevin/new_ws/install -DCMAKE_BUILD_TYPE=Release; cd -
.........................................................................................................................
_________________________________________________________________________________________________________________________
Errors     << mav_trajectory_generation_example:make /home/kevin/new_ws/logs/mav_trajectory_generation_example/build.make.004.log
make: *** No targets specified and no makefile found.  Stop.
cd /home/kevin/new_ws/build/mav_trajectory_generation_example; catkin build --get-env mav_trajectory_generation_example | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
.........................................................................................................................
Failed     << mav_trajectory_generation_example:make           [ Exited with code 2 ]                                    
Failed    <<< mav_trajectory_generation_example                [ 1.1 seconds ]                                           
[build] Summary: 10 of 11 packages succeeded.                                                                            
[build]   Ignored:   3 packages were skipped or are blacklisted.                                                         
[build]   Warnings:  1 packages succeeded with warnings.                                                                 
[build]   Abandoned: None.                                                                                               
[build]   Failed:    1 packages failed.                                                                                  
[build] Runtime: 5.1 seconds total.

Would anyone know how to fix this?

kevin-thankyou-lin commented 3 years ago

Resolved - just delete the build and devel folders!