Skip to content

Commit

Permalink
Fix simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Dec 6, 2024
1 parent 7f86f8b commit d0c72e0
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion husarion_ugv_controller/config/WH01_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

publish_rate: 100.0
odom_frame_id: odom
base_frame_id: base_link
base_frame_id: base_footprint
twist_covariance_diagonal: [5.4e-5, 5.4e-5, 0.0, 0.0, 0.0, 1.9e-4] # Values measured experimentally

# Whether to use feedback or commands for odometry calculations
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_controller/config/WH02_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

publish_rate: 100.0
odom_frame_id: odom
base_frame_id: base_link
base_frame_id: base_footprint
twist_covariance_diagonal: [5.4e-5, 5.4e-5, 0.0, 0.0, 0.0, 1.9e-4] # Selected intuitively based on WH01 results

# Whether to use feedback or commands for odometry calculations
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_controller/config/WH04_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

publish_rate: 100.0
odom_frame_id: odom
base_frame_id: base_link
base_frame_id: base_footprint
twist_covariance_diagonal: [2.7e-5, 2.7e-5, 0.0, 0.0, 0.0, 1.0e-4] # Selected intuitively based on WH01 results

# Whether to use feedback or commands for odometry calculations
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_controller/config/WH05_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

publish_rate: 100.0
odom_frame_id: odom
base_frame_id: base_link
base_frame_id: base_footprint
twist_covariance_diagonal: [5.4e-5, 5.4e-5, 0.0, 0.0, 0.0, 1.9e-4] # Values measured experimentally

# Whether to use feedback or commands for odometry calculations
Expand Down
15 changes: 5 additions & 10 deletions husarion_ugv_description/urdf/lynx/lynx_macro.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@
imu_rpy:='0.0 0.0 -1.57'
namespace:=''">

<xacro:if value="${namespace == ''}">
<xacro:property name="ns" value="" />
</xacro:if>
<xacro:unless value="${namespace == ''}">
<xacro:property name="ns" value="${namespace}/" />
</xacro:unless>
<xacro:property name="ns" value='${namespace + "/" if namespace else ""}' />

<xacro:property name="wheel_config" value="${xacro.load_yaml(wheel_config_file)}" />
<!-- TODO find real value -->
<xacro:property name="wheel_separation_x" value="0.35" />

<!-- INCLUDE ROBOT PARTS DEFINITIONS -->
Expand Down Expand Up @@ -61,7 +55,7 @@
<param name="e_stop_initial_state">true</param>
</xacro:if>

<xacro:unless value="$(arg use_sim)">
<xacro:unless value="${use_sim}">
<plugin>husarion_ugv_hardware_interfaces/LynxSystem</plugin>

<param name="encoder_resolution">1600</param>
Expand Down Expand Up @@ -182,8 +176,9 @@
</xacro:if>
<xacro:gazebo.controller config_file="${controller_config_file}" namespace="${namespace}" />
<xacro:gazebo.imu reference_frame="imu_link" namespace="${namespace}" />
<xacro:gazebo.light reference_frame="lights_channel_1_link" name="lights_channel_1" namespace="${namespace}" />
<xacro:gazebo.light reference_frame="lights_channel_2_link" name="lights_channel_2" namespace="${namespace}" />
<!-- TODO Add lights visualization -->
<!-- <xacro:gazebo.light reference_frame="lights_channel_1_link" name="lights_channel_1" topic="lights/channel_1_frame" namespace="${namespace}" /> -->
<!-- <xacro:gazebo.light reference_frame="lights_channel_2_link" name="lights_channel_2" topic="lights/channel_2_frame" namespace="${namespace}" /> -->
</xacro:if>
</xacro:macro>

Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_description/urdf/panther/body.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</collision>

<inertial>
<!-- TODO: Fix oringin -->
<!-- TODO Fix oringin -->
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<mass value="43.0" />
<inertia ixx="2.630036" ixy="-0.023480" ixz="0.052320"
Expand Down
5 changes: 4 additions & 1 deletion husarion_ugv_gazebo/launch/simulate_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def generate_launch_description():
)
),
launch_arguments={"namespace": namespace, "use_sim": "True"}.items(),
condition=UnlessCondition(PythonExpression(["'", robot_model, "' == 'lynx'"])),
)

manager_launch = IncludeLaunchDescription(
Expand All @@ -131,7 +132,9 @@ def generate_launch_description():
)
),
launch_arguments={"namespace": namespace, "use_sim": "True"}.items(),
condition=UnlessCondition(disable_manager),
condition=UnlessCondition(
PythonExpression(["'", robot_model, "' == 'lynx' or ", disable_manager])
),
)

controller_launch = IncludeLaunchDescription(
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_localization/config/enu_localization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

map_frame: map
odom_frame: odom
base_link_frame: base_link
base_link_frame: base_footprint
world_frame: odom
publish_tf: true
publish_acceleration: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

map_frame: map
odom_frame: odom
base_link_frame: base_link
base_link_frame: base_footprint
world_frame: odom
publish_tf: true
publish_acceleration: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

map_frame: map
odom_frame: odom
base_link_frame: base_link
base_link_frame: base_footprint
world_frame: odom
publish_tf: true
publish_acceleration: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

map_frame: map
odom_frame: odom
base_link_frame: base_link
base_link_frame: base_footprint
world_frame: odom
publish_tf: true
publish_acceleration: false
Expand Down

0 comments on commit d0c72e0

Please sign in to comment.