Ask Your Question
1

How to compile a package with dynamic reconfigure server in C++

asked 2012-04-02 01:43:52 -0500

Kai Bublitz gravatar image

Hi,

I have problems compiling a package that uses the C++ dynamic reconfigure server. More specifically it is copy of base_local_planner with a few modifications.

I know that "there is no c++ api for dynamic reconfigure", however it is used there and I really don't want to remove it. I don't even know if my problem is related to the c++ api or dynamic reconfigure in general.

My problem is, that rosmake refuses to build my package, I get the following output:

[rosbuild] Building package adaptive_trajectory_planner
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
MSG: gencfg_cpp on:BaseLocalPlanner.cfg
Finding dependencies for /home/bublitz/SR1/adaptive_trajectory_planner/cfg/BaseLocalPlanner.cfg
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bublitz/SR1/adaptive_trajectory_planner/build
cd build && make 
make[2]: Betrete Verzeichnis '/home/bublitz/SR1/adaptive_trajectory_planner/build'
make[3]: Betrete Verzeichnis '/home/bublitz/SR1/adaptive_trajectory_planner/build'
make[4]: Betrete Verzeichnis '/home/bublitz/SR1/adaptive_trajectory_planner/build'
Scanning dependencies of target ROSBUILD_gencfg_cpp
make[4]: Verlasse Verzeichnis '/home/bublitz/SR1/adaptive_trajectory_planner/build'
make[4]: Betrete Verzeichnis '/home/bublitz/SR1/adaptive_trajectory_planner/build'
[  0%] Generating ../cfg/cpp/adaptive_trajectory_planner/BaseLocalPlannerConfig.h, ../docs/BaseLocalPlannerConfig.dox, ../docs/BaseLocalPlannerConfig-usage.dox, ../src/adaptive_trajectory_planner/cfg/BaseLocalPlannerConfig.py, ../docs/BaseLocalPlannerConfig.wikidoc
make[4]: execvp: ../cfg/BaseLocalPlanner.cfg: Keine Berechtigung
make[4]: *** [../cfg/cpp/adaptive_trajectory_planner/BaseLocalPlannerConfig.h] Fehler 127
make[4]: Verlasse Verzeichnis '/home/bublitz/SR1/adaptive_trajectory_planner/build'

"Keine Berechtigung" means "no permission"

Since I cannot find any useful documentation about how to use dynamic reconfigure parameters I have to ask here. Can anyone tell my what I have to do in order to make my package? I don't know what the commands inside the .cfg file do. Mostly the exit(gen.generate( ... line confuses me. I'm not sure if I just have to change the .cfg in some way or there's a problem somewhere else. Thanks for any help.

This is the (shortened) .cfg file

#!/usr/bin/env python

PACKAGE='adaptive_trajectory_planner'
import roslib; roslib.load_manifest(PACKAGE)

import sys
from math import pi

from dynamic_reconfigure.parameter_generator import *

gen = ParameterGenerator()

gen.add("acc_lim_x", double_t, 0, "The acceleration limit of the robot in the x direction", 1.0, 0, 20.0)
# some more gen.add(...) lines

exit(gen.generate(PACKAGE, "adaptive_trajectory_planner", "BaseLocalPlanner"))
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-04-02 01:52:39 -0500

updated 2012-04-02 11:48:39 -0500

The "no permission" thing looks like you should give your .cfg file execution permissions:

chmod a+x cfg/BaseLocalPlanner.cfg

Hope it helps.

edit flag offensive delete link more

Comments

Yes, it's that easy. Thanks.

Kai Bublitz gravatar image Kai Bublitz  ( 2012-04-02 05:16:02 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-04-02 01:43:52 -0500

Seen: 1,070 times

Last updated: Apr 02 '12