Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 126 articles
Browse latest View live

ImportError for .cfg file when trying to run a node in ROS Kinetic

$
0
0
I have a .cfg file defined and set as executable in a /config folder which I have added in my CMakeList.txt as well. In my node's python script, when I try to import the .cfg file to access some of the config parameters in a callback function for dynamic_reconfigure, I get the "No Module Named Pcl.cfg" I am blank on what could be the problem here. Is there something else I need to specify somewhere? Like in my CMakeList? I am trying to port some C++ code to Python, so utilizing a CMake for the node which is originally written in C++. So maybe I am missing something, but not sure what. Would appreciate any guidance! Let me know if you need more information.

catkin make failling when I will use dynamic reconfigure

$
0
0

I want to use dynamic reconfigure and I changed cmakelist.txt and package.xml like below method

################################################
## Declare ROS dynamic reconfigure parameters ##
################################################

## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
##    * add a build_depend and a run_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
##     * add "dynamic_reconfigure" to
##     find_package(catkin REQUIRED COMPONENTS ...)
##     * uncomment the "generate_dynamic_reconfigure_options" section below
##     and list every .cfg file to be processed

And I do catkin_make but there are error

__________________________________________________________________________________________

CMake Error at object_tracker/CMakeLists.txt:94 (generate_dynamic_reconfigure_options): Unknown CMake command "generate_dynamic_reconfigure_options".

__________________________________________________________________________________________

I use ubuntu14.04 and indigo

how can I solve this plobrem?

FlyCapture2::ErrorType 41 causing crash of stereo nodelets for pointgrey blackfly cameras when externally triggered

$
0
0
I am trying to implement two externally triggered blackfly cameras, but cannot resolve the image consistency issue crashing my nodelets: core service [/rosout] found process[left/camera/left_nodelet_manager-1]: started with pid [2718] process[left/camera/left_nodelet-2]: started with pid [2719] process[left/camera/image_view-3]: started with pid [2720] process[right/camera/right_nodelet_manager-4]: started with pid [2721] process[right/camera/right_nodelet-5]: started with pid [2722] process[right/camera/image_view-6]: started with pid [2723] init done init done [ERROR] [1498794492.863910730]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [ERROR] [1498794494.245366210]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [ERROR] [1498794512.669232337]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [ERROR] [1498794512.868528896]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [ERROR] [1498794514.070943270]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [ERROR] [1498794514.070996625]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [ERROR] [1498794515.272532508]: PointGreyCamera::grabImage Failed to retrieve buffer | FlyCapture2::ErrorType 41 There is an image consistency issue with this image. [left/camera/left_nodelet_manager-1] process has died [pid 2718, exit code -11, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=left_nodelet_manager __log:=/home/benjamin/.ros/log/db45f1c4-5d46-11e7-bcbc-448a5b9c1a8e/left-camera-left_nodelet_manager-1.log]. log file: /home/benjamin/.ros/log/db45f1c4-5d46-11e7-bcbc-448a5b9c1a8e/left-camera-left_nodelet_manager-1*.log [left/camera/left_nodelet-2] process has finished cleanly log file: /home/benjamin/.ros/log/db45f1c4-5d46-11e7-bcbc-448a5b9c1a8e/left-camera-left_nodelet-2*.log I have attached the launch file as well as configuration files that I have tried. Specifically, I hope a terminal, then change directory to my ros package, and run the cam_init.sh script. Then I open another terminal window, and launch mars_pgr.launch. At this point everything runs without issue, but then to change to the externally triggered mode of the cameras, I run the following two commands (in a third terminal window): rosrun dynamic_reconfigure dynparam load /left/camera/left_nodelet $HOME/ros/src/hast/cam_info/pgr.yaml rosrun dynamic_reconfigure dynparam load /right/camera/right_nodelet $HOME/ros/src/hast/cam_info/pgr.yaml At this point, the terminal running the nodelets will throw the consistency error and then one of the two will crash. I have tried tweaking my /etc/sysctrl.conf file as well, but to no avail. just for FYI: Linux mars 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux * /rosdistro: kinetic * /rosversion: 1.12.7 [config and launch files attached to this post: [refs.zip](https://github.com/ros-drivers/pointgrey_camera_driver/files/1114086/refs.zip)]

Is there a procedure for removing obsolete documentation?

$
0
0
As a specific example, [this tutorial](http://wiki.ros.org/dynamic_reconfigure/Tutorials/SettingUpDynamicReconfigureForANode) is heavily outdated (still referring to `rosbuild` and using `roslib.load_manifest`) and seems to be superseeded by [this](http://wiki.ros.org/dynamic_reconfigure/Tutorials/HowToWriteYourFirstCfgFile) and [this](http://wiki.ros.org/dynamic_reconfigure/Tutorials/SettingUpDynamicReconfigureForANode%28cpp%29) tutorial. Is there any procedure for removing the obsolete tutorial (as it is likely to confuse newcomers)?

Setting up Dynamic Reconfigure for several nodes?

$
0
0
I wanted to have a node that worked as a Dynamic Reconfigure server for my other nodes. What would be the best approach? If I start a server in each node I end up with several instances of the same configuration set. The only thing I can figure out is having just one configuration server and have the other nodes periodically read those parameters through rosparam (i.e: NodeHandle.param(paramName,paramValue,paramDefault);). Is there any way to have all nodes read the new configuration parameters upon a parameter change rather than periodically?

Can global parameters be used with dynamic_reconfigure?

$
0
0
Hi everyone, when using dynamic_reconfigure, the parameters used are linked to specific nodes. For example, if there is a **cfg/MyConfig.cfg** file with a parameter such as **gen.add('my_param', int_t,....)**, and this runs in node **my_node**, then the parameter server will have a parameter such as **/my_node/my_param**. Is it possible to have instead a global parameter **/my_param**? Moreover, would it be possible to use that single cfg file for two (or more) nodes? That is, upon modifications of **/my_param**, a node, eg. **my_node_1** should call certain callback **cbk_1**, and **my_node_2** should call certain callback **cbk_2**. Thanks!

Waypoint specific yaw_goal_tolerance for move base

$
0
0
Is there any way to specify a yaw_goal_tolerance for each waypoint you send to move_base? Sometimes I care which direction it ends up in and other times I don't care. And using dynamic reconfigure sounds overly complicated and would result in much less readable code and would be harder to debug.

Load intrinsic parameters from file [ueye]

$
0
0
Hi, I got an issue with loading parameters from a file while starting the ueye-node. First I configured the parameters from the commandline and than dumped it in a file. I used the following command: rosrun dynamic_reconfigure dynparam dump /camera I can change this file in an editor and load it back via the *load* command. So, now my issue. Is there a possibility to store the file in a specific folder so that the node loads these parameters at startup? When the ueye-node starts, there is a warning saying: **Failed to load intrinsics for camera from file** However, I do not know where and in what format the file must be saved. Does somebody has any idea?

For dynamic reconfiguration, which is the main file?

$
0
0
http://wiki.ros.org/dynamic_reconfigure/Tutorials In these tutorials, they have shown to create 1) a config file 2) a client file 3) a server file I want to dynamically reconfigure the HSV values for upper range and lower range of a red color with my code. For that I understand that I need to make a config file first (after creating the package and all those basic stuff..) But then, other than that, do I need to have these two files -client file and server file other than my main node (that contains the code and where the variables to be configured exist originally) OR The main node is basically the client one? OR Is it the server one?

what is the use of " .format(**config)) "

$
0
0
http://wiki.ros.org/dynamic_reconfigure/Tutorials/SettingUpDynamicReconfigureForANode%28python%29 in this link ^, they have this piece of code (shown below) rospy.loginfo("Config set to {int_param}, {double_param}, {str_param}, {bool_param}, {size}".**format(**config))** what is the use of the bold part in the above code snippet ^ I am trying to dynamically reconfigure values of upper and lower HSV range values, so do I need to use this .format thing at the end of lower_red=np.array([lowerh,lowers,lowerv]) if not, then what is its use?

pointgrey_camera_driver config

$
0
0
Hi, There are not a lot of `params` exposed in the `pointgrey_camera_driver` nodelet. However, there is the `dynamic_reconfigure` interface. Now suppose I have two pointgrey cameras that I want to have different configurations. I'm using the launch file provided in the pointgrey_camera_driver package. Can I have independant .cfg dynamic configure files for each camera and how do I input that to the pointgrey_camera_driver nodelet? Where does it read it from? Thanks

Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure

$
0
0
Hello All, I have a motor controller board which is tuned using a ros node. The parameters of this board need to be tuned only once and then use the tuning parameters at each launch. Currently I have two parts to this node. Part A launches the node with parameters in a config.yaml file. The contents of which i manually typed in. Part B launches the dynamic reconfiguration tool and helps me figure out the values of these parameters ( which i manually type into config.yaml) . I can then save the current configuration from dyn reconfigure using the save icon in rqt (top left) ( let say this file is dynConfig.yaml ). I want to launch Part A of the node using rosparam load with dynConfig.yaml as the file instead of config.yaml. If i directly use the dynConfig.yaml file in launch file i get the following error error loading tag: 'param' attribute must be set for non-dictionary values XML is The traceback for the exception was written to the log file My understanding is that this is because dynamic reconfigure adds some additional lines in the dynConfig.yaml which the rosparam is not expecting. these are the first few lines of the file when saved from rqt. !!python/object/new:dynamic_reconfigure.encoding.Config dictitems: UPLOAD_VALUES_PORT_1: false UPLOAD_VALUES_PORT_2: false groups: !!python/object/new:dynamic_reconfigure.encoding.Config dictitems: groups: !!python/object/new:dynamic_reconfigure.encoding.Config dictitems: PORT_1: !!python/object/new:dynamic_reconfigure.encoding.Config dictitems: I want to know if there is a way that i can either convert dynConfig.yaml formatting to the .yaml that roslaunch expects or a way to directly save it in the right formatting. OR if i am doing it entirely the wrong way. Thank you

How do I generate a dynamic config module that depends on a message defined in the same package?

$
0
0
The CMakeLists.txt looks like this: add_message_files(DIRECTORY msg FILES SensorLevels.msg) generate_messages() generate_dynamic_reconfigure_options(cfg/Camera1394.cfg) catkin_package(CATKIN_DEPENDS dynamic_reconfigure message_runtime etc...) The build fails the first time, like this: Errors << camera1394:make /home/joq/ros/ws/logs/camera1394/build.make.009.log Traceback (most recent call last): File "/home/joq/ros/ws/src/camera1394/cfg/Camera1394.cfg", line 37, in from camera1394.msg import SensorLevels ImportError: No module named msg make[2]: *** [/home/joq/ros/ws/devel/.private/camera1394/include/camera1394/Camera1394Config.h] Error 1 make[1]: *** [CMakeFiles/camera1394_gencfg.dir/all] Error 2 Running the build again succeeds. Somehow, I need to force gencfg to wait on message generation.

A node that's a subscriber, a publisher and uses dynamic parameters [Python]

$
0
0
Suppose I have defined two custom dynamic parameters, gain1 and gain2, in a cfg file. I would like to use these in a node that subscribes and publishes to two topics. Here's what i tried: import rospy from std_msgs.msg import Float64 from dynamic_reconfigure.server import Server from myPack.cfg import paramConfig def param_callback(config, level): gain1 = config.gain1 gain2 = config.gain2 return config def callback1(msg): in1 = msg.data def callback2(msg): in2 = msg.data rospy.init_node('mixer') srv = Server(paramConfig, param_callback) sub1 = rospy.Subscriber('in1', Float64, callback1) sub2 = rospy.Subscriber('in2', Float64, callback2) pub1 = rospy.Subscriber('out1', Float64) pub2 = rospy.Subscriber('out2', Float64) out1 = Float64() out2 = Float64() while not rospy.is_shutdown(): out1.data = in1*gain1 out2.data = in2*gain2 pub1.publish(out1) pub2.publish(out2) But it seems the subscribers callbacks don't work. This error is given for the first line of the while loop. NameError: name 'in1' is not defined Note that the subscription and parameter server code work fine individually. Am I using the right method? **Update:** As suggested by gvdhoorn, I had to define `in1`, `in2`, `gain1` and `gain2` as global variables **and** initialize `in1` and `in2` before the while loop. The latter because the program could reach the while loop before a callback. In this case, `in1` is still undefined and I would receive the same error . I feel this method is a bit inelegant and as gvdhoorn pointed out, using a class instead of global variables is better programming.

Pushbutton in GUI in ROS

$
0
0
I need to trigger a specific function in my ROS node by the user. There a simple pushbutton function that can be setup within the rqt dynamic reconfigure? Currently I am just using a workaround of just triggering the function whenever an int value is changing, but that is not really a great interface.

What's the best way to publish dynamic parameters to a topic when they change?

$
0
0
I'd like to publish dynamic parameters (from dynamic_reconfigure) to a topic from a C++ node when they change. In Python, I just convert the dynamic parameters object to a string and publish it in the dynamic parameters callback. What's the best way to do something similar in C++?

dynamic_reconfigure exception when used with groups

$
0
0
When running rosrun rqt_reconfigure rqt_reconfigure And selecting my node, I get the following error: Traceback (most recent call last): File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 250, in _selection_changed_slot self._selection_selected(index_current, rosnode_name_selected) File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 200, in _selection_selected item_widget = item_child.get_dynreconf_widget() File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 148, in get_dynreconf_widget self._param_name_raw) File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/dynreconf_client_widget.py", line 57, in __init__ group_desc, node_name) File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/param_groups.py", line 153, in __init__ self._create_node_widgets(config) File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/param_groups.py", line 199, in _create_node_widgets widget = eval(_GROUP_TYPES[group['type']])(self.updater, group) File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_reconfigure/param_groups.py", line 248, in __init__ super(BoxGroup, self).__init__(updater, config) TypeError: __init__() takes exactly 4 arguments (3 given) And indeed checking the python scripts, BoxGroup does call the super constructor with one argument too few. My config file looks something like this: PACKAGE="my_package" from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() debug = gen.add_group("Debugging Utilities Left Image Based") debug.add("dbgShowFeatures", bool_t, 0, "Show all detected features", True) # online debug.add("dbgShowNMSFilteredFeatures", bool_t, 0, "Show stable (non maximum suppressed)", True) # online debug.add("dbgShowBest3kFeatures", bool_t, 0, "Show best 3000 features", True) # online exit(gen.generate(PACKAGE, "dynamic_reconfigure_node", "Foo")) How can I fix this problem? I'm on ROS Groovy, 32 Bit Ubuntu 12.04

dynamic reconfigure for servo position control in runtime.

$
0
0
Hi, I want to control a servo's two extreme positions in runtime. I looked into both `dynamic_reconfigure` as well as `actionlib`. It seems that I could use both, but I am not very sure of which one would be best suitable. The problem is as follows: 1. I use `dynamixel_controller` package to run the servo. it's position data are fed through a `.yaml` file, which is called as `rosparam` in the `launch` file. 2. In my application, I want to change the servo's extreme positions in run time. I have written another package to work with lidar's pointcloud that subscribes servo /state topic to know servo positions. I know this dynamic position updates and the two limit points where I want to set the servo. But, I am not sure how to provide that input to the `dynamixel controller`'s position parameters in run time. 3. BTW, `dynamixel_controller` is written in `python` and my package is written in c++. thanks,

dynparam dump recursively?

$
0
0
Hello, I would like to dump all dynamically reconfigurable parameters under the /move_base parameter space including those for the planner (e.g. DWAPlannerROS), the global_costmap, etc. However, if I run the command: $ rosrun dynamic_reconfigure dynparam dump /move_base move_base.yaml I only get the parameters in the top-level /move_base name space in the file move_base.yaml. Is there a way to have dynparam dump "drill down" through the /move_base namespace and save everything? Thanks,
patrick

dynamic reconfigure accross multiple packages

$
0
0
Hi, I am using multiple packages for my application such as ,`dynamixel_motor`, `hokuyo_node`, `laser_geometry` and then my own package which subscribes the topics published by other packages. Now, based on some situation I want to change the extreme position limits of dynamixel servo. I want to do it from other package (say for example from within `laser_geomtery` based on pointcloud data I want to control servo's upper and lower position limits). I saw `dynamic_reconfigure` is a way to deal with such things. But I am confused if the same can be done across multiple packages. If yes, then how? By the way, I am writing my package in `c++` whereas, dynamixel_motor is written in `python`.
Viewing all 126 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>