Skip to content

Commit

Permalink
remove encoding from stickbot for tests with hardware parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlottaSartore committed Nov 7, 2023
1 parent 0903bd1 commit 5bec824
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/parametric/test_CasADi_computations_parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
Repo.clone_from(git_url, temp_dir.name)
model_path = temp_dir.name + "/models/stickBot/model.urdf"

## Ack to remove the encoding urdf, see https://github.com/icub-tech-iit/ergocub-gazebo-simulations/issues/49
robot_file_read = open(model_path, "r")
robot_urdf_string = robot_file_read.read()
robot_urdf_string = robot_urdf_string.replace("<?xml", "")
robot_urdf_string = robot_urdf_string.replace("version='1.0'", "")
robot_urdf_string = robot_urdf_string.replace("encoding='UTF-8'?>", "")
robot_file_write = open(model_path, "w")
robot_file_write.write(robot_urdf_string)

joints_name_list = [
"torso_pitch",
"torso_roll",
Expand Down
9 changes: 9 additions & 0 deletions tests/parametric/test_Jax_computations_parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
Repo.clone_from(git_url, temp_dir.name)
model_path = temp_dir.name + "/models/stickBot/model.urdf"

## Ack to remove the encoding urdf, see https://github.com/icub-tech-iit/ergocub-gazebo-simulations/issues/49
robot_file_read = open(model_path, "r")
robot_urdf_string = robot_file_read.read()
robot_urdf_string = robot_urdf_string.replace("<?xml", "")
robot_urdf_string = robot_urdf_string.replace("version='1.0'", "")
robot_urdf_string = robot_urdf_string.replace("encoding='UTF-8'?>", "")
robot_file_write = open(model_path, "w")
robot_file_write.write(robot_urdf_string)

joints_name_list = [
"torso_pitch",
"torso_roll",
Expand Down
9 changes: 9 additions & 0 deletions tests/parametric/test_NumPy_computations_parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
Repo.clone_from(git_url, temp_dir.name)
model_path = temp_dir.name + "/models/stickBot/model.urdf"

## Ack to remove the encoding urdf, see https://github.com/icub-tech-iit/ergocub-gazebo-simulations/issues/49
robot_file_read = open(model_path, "r")
robot_urdf_string = robot_file_read.read()
robot_urdf_string = robot_urdf_string.replace("<?xml", "")
robot_urdf_string = robot_urdf_string.replace("version='1.0'", "")
robot_urdf_string = robot_urdf_string.replace("encoding='UTF-8'?>", "")
robot_file_write = open(model_path, "w")
robot_file_write.write(robot_urdf_string)

joints_name_list = [
"torso_pitch",
"torso_roll",
Expand Down
9 changes: 9 additions & 0 deletions tests/parametric/test_pytorch_computations_parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
Repo.clone_from(git_url, temp_dir.name)
model_path = temp_dir.name + "/models/stickBot/model.urdf"

## Ack to remove the encoding urdf, see https://github.com/icub-tech-iit/ergocub-gazebo-simulations/issues/49
robot_file_read = open(model_path, "r")
robot_urdf_string = robot_file_read.read()
robot_urdf_string = robot_urdf_string.replace("<?xml", "")
robot_urdf_string = robot_urdf_string.replace("version='1.0'", "")
robot_urdf_string = robot_urdf_string.replace("encoding='UTF-8'?>", "")
robot_file_write = open(model_path, "w")
robot_file_write.write(robot_urdf_string)

joints_name_list = [
"torso_pitch",
"torso_roll",
Expand Down

0 comments on commit 5bec824

Please sign in to comment.