ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to dynamically reconfigure without running the robot?

asked 2019-06-15 22:33:10 -0500

khansaadbinhasan gravatar image

updated 2019-06-16 10:23:05 -0500

I want to dynamically reconfigure a parameter as mentioned in this question, I do not want to run the robot for it, instead I want some way to get data from the robot and then work on the dynamic reconfiguration part. I need something similar to rosbags but not rosbags since they use topics to record data as mentioned in the answer

EDIT1: adding more information

I am working with a Velodyne VLP-16 LIDAR, since its a very costly sensor I have to work with bag files, actually its a 16-channel LIDAR and I want to reconfigure its disk value from the default 8 to 2, Here is the rosbag info:

path:        third_run.bag
  version:     2.0
  duration:    1:02s (62s)
  start:       Dec 05 2018 12:34:13.22 (1543993453.22)
  end:         Dec 05 2018 12:35:15.56 (1543993515.56)
  size:        469.3 MB
  messages:    2294
  compression: none [571/571 chunks]
  types:       bond/Status                           
  topics:      /diagnostics                                                  62 msgs    : diagnostic_msgs/DiagnosticArray      
               /scan                                                        617 msgs    : sensor_msgs/LaserScan                
               /velodyne_nodelet_manager/bond                               372 msgs    : bond/Status                          
               /velodyne_nodelet_manager_cloud/parameter_descriptions         1 msg     : dynamic_reconfigure/ConfigDescription
               /velodyne_nodelet_manager_cloud/parameter_updates              1 msg     : dynamic_reconfigure/Config           
               /velodyne_nodelet_manager_driver/parameter_descriptions        1 msg     : dynamic_reconfigure/ConfigDescription
               /velodyne_nodelet_manager_driver/parameter_updates             1 msg     : dynamic_reconfigure/Config           
               /velodyne_nodelet_manager_laserscan/parameter_descriptions     1 msg     : dynamic_reconfigure/ConfigDescription
               /velodyne_nodelet_manager_laserscan/parameter_updates          1 msg     : dynamic_reconfigure/Config           
               /velodyne_packets                                            618 msgs    : velodyne_msgs/VelodyneScan           
               /velodyne_points                                             619 msgs    : sensor_msgs/PointCloud2

As you can see, it has dynamically reconfigurable parameters, which I want to configure through code so I can get the data I want, but as I mentioned above, it is not possible with bag files. So, I am looking for something similar to bag files where I have access to param server

EDIT2: Replaced image with text

edit retag flag offensive close merge delete


Can you be specific about which node or nodes you're trying to configure and the end goal that you're trying to achieve by changing the node's parameters?

ahendrix gravatar image ahendrix  ( 2019-06-16 00:47:31 -0500 )edit

Please don't use an image to post text. See the support page

jayess gravatar image jayess  ( 2019-06-16 10:08:18 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2019-06-17 00:31:34 -0500

ahendrix gravatar image

It _looks_ like you want to take the velodyne_laserscan node and choose a different ring than the one that was chosen when the log was recorded.

You can do this by running the following commands In separate terminals:

  • roscore
  • rosrun veldoyne_laserscan velodyne_laserscan_node
  • rosbag play my_bag.bag --topics /velodyne_points

Since you're running the velodyne_laserscan_node, you'll be able to reconfigure it and select a different ring.

edit flag offensive delete link more


As I mentioned in Edit1, I do not have access to LIDAR, I only have bag files, so I cannot run the second command. As I discussed with @PeteBlackerThe3rd in the comments, this can be done with running a simulation in Gazebo. If you know of any other way I can test dynamic reconfiguration without a real LIDAR please let me know

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-17 00:49:42 -0500 )edit

You do not need access to the robot to run velodyne_laserscan_node. It simply converts the /velodyne_points topic to the /scan topic, and since you have recorded the /velodyne_points topic, you can play back that topic and run it without a robot.

ahendrix gravatar image ahendrix  ( 2019-06-17 10:32:25 -0500 )edit

Thanks for the answer! it works.

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-17 23:39:50 -0500 )edit

answered 2019-06-16 06:41:22 -0500

updated 2019-06-16 11:01:46 -0500

dynamic reconfigure is used to change the parameters used by a node while they are running, so it has no meaning to try and use it when nodes are not running.

If I've understood what your asking it sounds like you want to change the initial values that the parameters are given when your nodes start. These will be set in one of three ways, A by a param tag in a launch file, B in a YAML file or C by the defaults defined in the nodes themselves if no other value is given. You'll need to find which of these three is the case and update the appropriate file.


Thanks for the additional information. Are you trying reconfigure the velodyne driver node? This is not possible if you're not running the node. When you playback the bag files it's just a recording of the topics that the were published when the bag was recorded, you're not actually running the velodyne driver node. The confusion seems to be caused because the reconfiguration server uses topics to communicate, and the contents of these topics has been recorded in the bag file. However the node and it's reconfiguration server are not running so you cannot change any parameters.

I'm not sure what the 'disk' parameter is, I can't find any reference to it in the driver, but you may be able to achieve what you want by filtering the existing point-cloud data recorded in the bag file. You can describe exactly what you're trying to achieve we may be able to help you.

edit flag offensive delete link more


Actually, I can run nodes with rosbag files, but they don't have param server, so I cannot run dynamic reconfiguration. I would be fine if I can change it in the beginning but I don't know if its possible with parameters that were set to be dynamically reconfigurable.

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-16 08:41:02 -0500 )edit

Do you mean run some nodes at the same time as playing back a bag file?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-06-16 11:02:56 -0500 )edit

I am sorry about the disk thing, i meant ring. This code is my sole reference to rings

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-16 11:48:36 -0500 )edit

Actually, I am new to this dynamic reconfiguration thing so bear with me- So this is what i was thinking after following the dynamic reconfigure tutorials, Since there are topics publishing dynamic reconfigure updation stuff, there must be a dynamic reconfigure server as in this code, So, I wanted to make a node that would act as a dynamic reconfigure client, I will subscribe to one of the dynamic reconfigure topics and get a GUI, except that the last part seems only possible through param server and so I ended up asking this question

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-16 11:53:33 -0500 )edit

I know this is not possible with rosbags, so I was looking for something that was similar to rosbags and can record param server's data, and I can use that to test my client node.

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-16 11:56:11 -0500 )edit

You will only be able to access the reconfigure parameters of the velodyne node if the actual node is running, Or if there is a simulated sensor you could run in Gazebo (I don't know of one off the top of my head but it may exist). But this would involve setting up a full simulation environment.

What you want to do cannot be done using just a recording of the sensor data. You'll need the actual sensor and driver node or a good simulator which has exactly the same ROS interface to the actual driver.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-06-16 12:04:20 -0500 )edit

Well thanks for the gazebo idea, I remember seeing a tutorial on setting up velodyne simulation, anyways I do have a simulation for the whole robot already, I will try with that

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-06-16 12:13:46 -0500 )edit

Question Tools



Asked: 2019-06-15 22:33:10 -0500

Seen: 661 times

Last updated: Jun 17 '19