diff --git a/niryo_one_description/urdf/v2/gazebo_niryo_one.urdf.xacro b/niryo_one_description/urdf/v2/gazebo_niryo_one.urdf.xacro new file mode 100644 index 00000000..a99c29d5 --- /dev/null +++ b/niryo_one_description/urdf/v2/gazebo_niryo_one.urdf.xacro @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + + + + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + true + + + + + + \ No newline at end of file diff --git a/niryo_one_gazebo/CMakeLists.txt b/niryo_one_gazebo/CMakeLists.txt new file mode 100644 index 00000000..727433f9 --- /dev/null +++ b/niryo_one_gazebo/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 2.8.3) +project(niryo_one_gazebo) + +find_package(catkin REQUIRED) + +catkin_package() diff --git a/niryo_one_gazebo/README.md b/niryo_one_gazebo/README.md new file mode 100644 index 00000000..1b5737dc --- /dev/null +++ b/niryo_one_gazebo/README.md @@ -0,0 +1,26 @@ +# Niryo One Gazebo Simulation + +This package provides config and launch files to run Niryo One in Gazebo. + +Developed and tested on ROS Melodic/Gazebo 9. + +## Start the Gazebo simulation + +First start Gazebo (empty world) and the model of Niryo One: +``` +roslaunch niryo_one_gazebo niryo_one_world.launch +``` +Then, start the controllers (ros_control) and the Moveit interface: +``` +roslaunch niryo_one_gazebo niryo_one_control.launch +``` + +You can find the URDF used for this simulation [here](https://github.com/NiryoRobotics/niryo_one_ros/blob/gazebo_simulation/niryo_one_description/urdf/v2/gazebo_niryo_one.urdf.xacro). + +## Control the robot + +The ROS interface to control Niryo One is the same for the real robot and the Gazebo simulation. + +The controller used for Niryo One is a joint\_trajectory\_controller (from ros\_control). See the [joint\_trajectory\_controller documentation](http://wiki.ros.org/joint_trajectory_controller) to get more info. + +You can also use the MoveGroup interface - Python or Cpp - from Moveit (higher level). This interface will call the Moveit motion planning functionality and then send the computed plan to the joint\_trajectory\_controller. diff --git a/niryo_one_gazebo/config/niryo_one_controllers.yaml b/niryo_one_gazebo/config/niryo_one_controllers.yaml new file mode 100644 index 00000000..63320b29 --- /dev/null +++ b/niryo_one_gazebo/config/niryo_one_controllers.yaml @@ -0,0 +1,31 @@ +# Publish all joint states ----------------------- +joint_state_controller: + type: "joint_state_controller/JointStateController" + publish_rate: 50 + +# Joint Trajectory Controller ----------------------- +niryo_one_follow_joint_trajectory_controller: + type: "effort_controllers/JointTrajectoryController" + joints: + - joint_1 + - joint_2 + - joint_3 + - joint_4 + - joint_5 + - joint_6 + constraints: + goal_time: 1.0 + joint_1: {trajectory: 0.1, goal: 0.1} + joint_2: {trajectory: 0.1, goal: 0.1} + joint_3: {trajectory: 0.1, goal: 0.1} + joint_4: {trajectory: 0.1, goal: 0.1} + joint_5: {trajectory: 0.1, goal: 0.1} + joint_6: {trajectory: 0.1, goal: 0.1} + stop_trajectory_duration: 1.0 + gains: + joint_1: {p: 100, d: 0.1, i: 0, i_clamp: 0} + joint_2: {p: 100, d: 0.1, i: 0, i_clamp: 0} + joint_3: {p: 100, d: 0.1, i: 0, i_clamp: 0} + joint_4: {p: 100, d: 0.1, i: 0, i_clamp: 0} + joint_5: {p: 100, d: 0.1, i: 0, i_clamp: 0} + joint_6: {p: 100, d: 0.1, i: 0, i_clamp: 0} diff --git a/niryo_one_gazebo/launch/niryo_one_control.launch b/niryo_one_gazebo/launch/niryo_one_control.launch new file mode 100644 index 00000000..5112d2ac --- /dev/null +++ b/niryo_one_gazebo/launch/niryo_one_control.launch @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/niryo_one_gazebo/launch/niryo_one_world.launch b/niryo_one_gazebo/launch/niryo_one_world.launch new file mode 100644 index 00000000..b03d3528 --- /dev/null +++ b/niryo_one_gazebo/launch/niryo_one_world.launch @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/niryo_one_gazebo/package.xml b/niryo_one_gazebo/package.xml new file mode 100644 index 00000000..cefe8a26 --- /dev/null +++ b/niryo_one_gazebo/package.xml @@ -0,0 +1,18 @@ + + + niryo_one_gazebo + 2.2.0 + Gazebo simulation for Niryo One + Edouard Renard + Edouard Renard + GPLv3 + + catkin + controller_manager + joint_state_controller + robot_state_publisher + effort_controllers + + + +