Skip to content

ROS1 control stack to real-time control a simulated pendulum in Gazebo

Notifications You must be signed in to change notification settings

Q-Y-Yang/ROS1-Real-time-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

ROS1-Real-time-Control

Realtime control by ros_control and gazebo
ROS1 control stack to real-time control a simulated pendulum in Gazebo

my_controller pkg is a customized controller managed by controller_manager and inherited from controller_interface.

Dependencies:

  • ros_control
  • gazebo_ros

Create a catkin workspace:
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make
$ source devel/setup.bash

Steps to run:

Download this directory to /catkin_ws/src
Open a terminal and enter the workspace cd ~/catkin_ws/

  1. compile the my_controller package: catkin_make -DCATKIN_WHITELIST_PACKAGES="my_controller"
  2. source devel/setup.bash
  3. rosrun rrbot_gazebo rrbot_world.launch Then the model in gazebo (without GUI) and controller are running.
  4. open another terminal
    enter: rostopic echo -p /rrbot/joint1_position_controller/chatter > data.txt
    wait for data capture
    Ctrl C to stop
    Then you will get a data.txt file, in which stores the update time that we need.
    The first column is simulation time, and the second column is wall-time.

The parameters of controller can be adjusted in my_controller/config/my_controller.yaml

About

ROS1 control stack to real-time control a simulated pendulum in Gazebo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published