-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SW-1392] move all xacros to spot_description (#484)
## Change Overview It was confusing to have two different xacros for spot (one in spot description and one in spot ros2 control). This PR moves everything into spot description. The default URDF that gets generated by the spot driver is still the same, but now if you add the `add_ros2_control_tags:=True` when generating `spot.xacro.urdf` we get the ROS 2 control tags added. Additionally fixes a one line issue with taking the lease in the hardware interface -- now even if the tablet has the lease, the hardware interface can take it. ## Testing Done - [x] successfully ran ros2 control stack on robot - [x] successfully ran driver on robot
- Loading branch information
1 parent
c2123e9
commit 668a3b7
Showing
7 changed files
with
63 additions
and
77 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
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,17 +1,38 @@ | ||
<?xml version="1.0" ?> | ||
<robot name="spot" xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<!-- Macro for loading Spot --> | ||
<xacro:include filename="$(find spot_description)/urdf/spot_macro.xacro" /> | ||
<!-- Macros for loading the ROS 2 control tags --> | ||
<xacro:include filename="$(find spot_description)/urdf/spot.ros2_control.xacro" /> | ||
|
||
<!-- Parameters --> | ||
<!-- General parameters --> | ||
<xacro:arg name="arm" default="false" /> | ||
<xacro:arg name="feet" default="false" /> | ||
<xacro:arg name="tf_prefix" default="" /> | ||
|
||
<!-- Parameters for ROS 2 control --> | ||
<xacro:arg name="add_ros2_control_tag" default="false" /> | ||
<xacro:arg name="hardware_interface_type" default="mock" /> | ||
<xacro:arg name="tf_prefix" default="" /> | ||
<xacro:arg name="hostname" default="10.0.0.3" /> | ||
<xacro:arg name="username" default="username" /> | ||
<xacro:arg name="password" default="password" /> | ||
|
||
<!-- Load Spot --> | ||
<xacro:load_spot | ||
arm="$(arg arm)" | ||
feet="$(arg feet)" | ||
tf_prefix="$(arg tf_prefix)" /> | ||
|
||
<!-- Adding the ROS 2 control tags --> | ||
<xacro:if value="$(arg add_ros2_control_tag)"> | ||
<xacro:spot_ros2_control interface_type="$(arg hardware_interface_type)" | ||
has_arm="$(arg arm)" | ||
hostname="$(arg hostname)" | ||
username="$(arg username)" | ||
password="$(arg password)" | ||
tf_prefix="$(arg tf_prefix)" /> | ||
</xacro:if> | ||
|
||
</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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
668a3b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for doing this @khughes-bdai!