Skip to content

arshadlab/gazebo_step_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gazebo_step_control

Gazebo Plugin to allow step control during ROS2 simulation.

Services exposed:

/step_control_enable (bool)
  service to enable/disable stepping control

/step (num_of_steps, blocking)
  service to provide number of steps to execute. blocking=true will block service call until steps are executed

Plugin parameter:

enable_control:   enable/disable step control at startup. default = false

SDF/URDF Usage:

<?xml version='1.0' encoding='utf-8'?>
<sdf version="1.6">
<world name="default">
...
<plugin name="gazebo_step_control" filename="libgazebo_step_control.so">
   <ros>
      <!-- <namespace> ns </namespace> -->
   </ros>
   <enable_control>false</enable_control>
</plugin>
...
</world>
</sdf>

Enable step control using service call:

ros2 service call /step_control_enable std_srvs/srv/SetBool "{data: True}"

Execution:

Blocking mode:

Execute 100 steps in blocking mode. Service call will return back after Gazebo executed 100 steps of simulation.

ros2 service call /step gazebo_step_control_interface/srv/StepControl "{steps: 100, block: 1}"

Non Blocking mode:

Execute 100 steps in blocking mode. Service call will return immediately. Step control implementation will publish /step_completed topic once 100 steps are completed.

ros2 service call /step_control gazebo_step_control_interface/srv/StepControl "{steps: 100, block: 0}"
ros2 topic echo /step_completed

Step controller client implementation included in the repo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published