MoveIt Simulator Controller
A simulation interface for a hardware interface for ros_control, and loads default joint values from SRDF
Intended to replace
moveit_fake_controller_manager - this repo almost exactly replicates a ros_control hardware setup, and has the new feature of being able to specify an inital position.
Developed by Dave Coleman at PickNik Consulting
- Travis CI
- ROS Buildfarm - AMD64 Xenial Debian Build - Ubuntu 16.04 LTS
- ROS Buildfarm - AMD64 Xenial Devel Build - Ubuntu 16.04 LTS
- ROS Buildfarm - AMD64 Bionic Source Build - Ubuntu 18.04 LTS
- ROS Buildfarm - AMD64 Bionic Devel Build - Ubuntu 18.04 LTS
sudo apt-get install ros-melodic-moveit-sim-controller
See Class Reference
Our example uses the UR5 robot:
sudo apt-get install ros-melodic-ur5-moveit-config roslaunch moveit_sim_controller ur5_rviz.launch roslaunch moveit_sim_controller ur5_sim_controller.launch
You should see the robot launch in Rviz with the arm oriented straight up, which is not the zero/home position. You can change the start position by editing in
config/ur5_controllers.yaml the value
With this simulator you should also be able to use
rostopic echo to see the
tf it is publishing - essentially you have just simulated a full ros_control-based robot without needing hardware. To test with an example joint trajectory, see the demo code in ros_control_boilerplate.
To set your robot's initial simulated position, create a planning group in your SRDF using the MoveIt Setup Assistant named something like
arm that contains all of your robot's joints. Then, create a pose for the planning group that is your start position, and name it something like
Then load this node with the following ROS params (yaml is suggested use):
# MoveIt-specific simulation settings: moveit_sim_hw_interface: joint_model_group: arm joint_model_group_pose: home
See ros_control_boilerplate for more detailed instructions about using ros_control to visualize your robot - this package simply inherits from that package and adds some MoveIt! dependencies that can parse SRDFs for your initial state.
Testing and Linting
catkin build --no-status --no-deps --this --make-args roslint
catkin lint -W2
There are currently no unit or integration tests for this package. If there were you would use the following command with catkin-tools:
catkin run_tests --no-deps --this -i
Please send PRs for new helper functions, fixes, etc!