-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e6596c
commit 2918768
Showing
5 changed files
with
115 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
controller_manager: | ||
ros__parameters: | ||
update_rate: 100 # Hz | ||
|
||
velocity_controller: | ||
type: velocity_controllers/JointGroupVelocityController | ||
|
||
joint_trajectory_controller: | ||
type: joint_trajectory_controller/JointTrajectoryController | ||
|
||
joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster | ||
|
||
velocity_controller: | ||
ros__parameters: | ||
joints: | ||
- yaw_joint | ||
- pitch_joint | ||
|
||
joint_trajectory_controller: | ||
ros__parameters: | ||
joints: | ||
- yaw_joint | ||
- pitch_joint | ||
|
||
command_interfaces: | ||
- position | ||
|
||
state_interfaces: | ||
- position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
auto_driver_description/urdf/auto_driver.ros2_control.xacro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<xacro:macro name="auto_driver_ros2_control" params="name"> | ||
|
||
<ros2_control name="${name}" type="system"> | ||
<hardware> | ||
<plugin>feetech_scs_hardware/FeetechScsHardware</plugin> | ||
<param name="usb_port">/dev/ttyUSB0</param> | ||
<param name="baud_rate">1000000</param> | ||
</hardware> | ||
<joint name="yaw_joint"> | ||
<param name="id">1</param> | ||
<command_interface name="position"> | ||
<param name="min">0.0</param> | ||
<param name="max">2.0</param> | ||
</command_interface> | ||
<command_interface name="velocity"/> | ||
<state_interface name="position"/> | ||
<state_interface name="velocity"/> | ||
<state_interface name="effort"/> | ||
</joint> | ||
<joint name="pitch_joint"> | ||
<param name="id">2</param> | ||
<command_interface name="position"> | ||
<param name="min">1.4</param> | ||
<param name="max">2.0</param> | ||
</command_interface> | ||
<command_interface name="velocity"/> | ||
<state_interface name="position"/> | ||
<state_interface name="velocity"/> | ||
<state_interface name="effort"/> | ||
</joint> | ||
</ros2_control> | ||
|
||
</xacro:macro> | ||
|
||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?xml version="1.0"?> | ||
<robot name="auto_driver" xmlns:xacro="http://ros.org/wiki/xacro"> | ||
<xacro:include filename="$(find auto_driver_description)/urdf/auto_driver.xacro" /> | ||
<!-- <xacro:include filename="$(find auto_driver_description)/urdf/auto_driver.ros2_control.xacro" /> --> | ||
<xacro:include filename="$(find auto_driver_description)/urdf/auto_driver.ros2_control.xacro" /> | ||
|
||
<link name="world"/> | ||
|
||
<xacro:auto_driver parent="world"> | ||
<origin xyz="0 0 0" rpy="0 0 0" /> | ||
</xacro:auto_driver> | ||
|
||
<!-- <xacro:auto_driver_ros2_control name="auto_driver_ros2_control" /> --> | ||
<xacro:auto_driver_ros2_control name="auto_driver_ros2_control" /> | ||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters