0
$\begingroup$

Rosanswers logo

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                           
               diagnostic_msgs/DiagnosticArray      
               dynamic_reconfigure/Config           
               dynamic_reconfigure/ConfigDescription
               sensor_msgs/LaserScan                
               sensor_msgs/PointCloud2              
               velodyne_msgs/VelodyneScan           
  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


Originally posted by khansaadbinhasan on ROS Answers with karma: 94 on 2019-06-15

Post score: 0


Original comments

Comment by ahendrix on 2019-06-16:
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?

Comment by jayess on 2019-06-16:
Please don't use an image to post text. See the support page

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ahendrix with karma: 47576 on 2019-06-17

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by khansaadbinhasan on 2019-06-17:
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

Comment by ahendrix on 2019-06-17:
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.

Comment by khansaadbinhasan on 2019-06-17:
Thanks for the answer! it works.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.