From f39c53d975d2cfcd1efbed9d0a95f61c9f71a0d0 Mon Sep 17 00:00:00 2001 From: Peizhang Zhu Date: Fri, 19 Dec 2025 12:54:39 -0800 Subject: [PATCH 1/4] Fix mock_external_simulator.cpp --- example/mock_external_simulator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/mock_external_simulator.cpp b/example/mock_external_simulator.cpp index 4bfceed..7e520ab 100644 --- a/example/mock_external_simulator.cpp +++ b/example/mock_external_simulator.cpp @@ -28,6 +28,8 @@ constexpr double kSineFreq = 0.3; // Initial joint positions when the robot is at home posture [rad] const std::vector kInitQ = {0.0, -0.698132, 0.0, 1.5708, 0.0, 0.698132, 0.0}; +// Initial joint velocities when the robot is at home posture [rad/s] +const std::vector kInitDq = {0, 0, 0, 0, 0, 0, 0}; // Servo cycle of the physics loop unsigned int g_servo_cycle = 0; @@ -54,6 +56,8 @@ void StepPhysics(sim_plugin::UserNode& user_node) // ============================================================================================= // Mocked robot states sim_plugin::SimRobotStates robot_states; + robot_states.q = kInitQ; + robot_states.dq = kInitDq; // Set and increment servo cycle per physics step robot_states.servo_cycle = g_servo_cycle++; From f4e1fd84bb9a4a2c199576133ae51f2c798a9a1e Mon Sep 17 00:00:00 2001 From: Peizhang Zhu Date: Fri, 19 Dec 2025 12:55:06 -0800 Subject: [PATCH 2/4] Update version of spdlog to be the same as the apt installed version on Ubuntu 22.04 --- thirdparty/scripts/install_spdlog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/scripts/install_spdlog.sh b/thirdparty/scripts/install_spdlog.sh index abd0f9e..1b9fcbe 100644 --- a/thirdparty/scripts/install_spdlog.sh +++ b/thirdparty/scripts/install_spdlog.sh @@ -1,8 +1,8 @@ #!/bin/bash set -e -# Use a specific version -VER_TAG=v1.14.1 +# Same as the apt installed version on Ubuntu 22.04 +VER_TAG=v1.9.2 # Clone source code if [ ! -d spdlog ] ; then From 143c85d9a7205013b32917c26c585c4601e6d60b Mon Sep 17 00:00:00 2001 From: Peizhang Zhu Date: Fri, 19 Dec 2025 12:55:18 -0800 Subject: [PATCH 3/4] Update version of tinyxml2 to be the same as the apt installed version on Ubuntu 22.04 --- thirdparty/scripts/install_tinyxml2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/scripts/install_tinyxml2.sh b/thirdparty/scripts/install_tinyxml2.sh index e443ef8..379c654 100644 --- a/thirdparty/scripts/install_tinyxml2.sh +++ b/thirdparty/scripts/install_tinyxml2.sh @@ -2,8 +2,8 @@ set -e echo "Installing tinyxml2" -# Use a specific version -VER_TAG=8.0.0 +# Same as the apt installed version on Ubuntu 22.04 +VER_TAG=9.0.0 # Clone source code if [ ! -d tinyxml2 ] ; then From f71a5690074d72a15f8313708c3c4cf588dc5696 Mon Sep 17 00:00:00 2001 From: Peizhang Zhu Date: Fri, 19 Dec 2025 13:42:57 -0800 Subject: [PATCH 4/4] Revert dependency version update --- example/mock_external_simulator.cpp | 9 +++++---- thirdparty/scripts/install_spdlog.sh | 4 ++-- thirdparty/scripts/install_tinyxml2.sh | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/example/mock_external_simulator.cpp b/example/mock_external_simulator.cpp index 7e520ab..c2d2c7e 100644 --- a/example/mock_external_simulator.cpp +++ b/example/mock_external_simulator.cpp @@ -28,8 +28,9 @@ constexpr double kSineFreq = 0.3; // Initial joint positions when the robot is at home posture [rad] const std::vector kInitQ = {0.0, -0.698132, 0.0, 1.5708, 0.0, 0.698132, 0.0}; -// Initial joint velocities when the robot is at home posture [rad/s] -const std::vector kInitDq = {0, 0, 0, 0, 0, 0, 0}; + +// Joint degrees of freedom +constexpr size_t kJointDof = 7; // Servo cycle of the physics loop unsigned int g_servo_cycle = 0; @@ -56,8 +57,8 @@ void StepPhysics(sim_plugin::UserNode& user_node) // ============================================================================================= // Mocked robot states sim_plugin::SimRobotStates robot_states; - robot_states.q = kInitQ; - robot_states.dq = kInitDq; + robot_states.q.resize(kJointDof); + robot_states.dq.resize(kJointDof); // Set and increment servo cycle per physics step robot_states.servo_cycle = g_servo_cycle++; diff --git a/thirdparty/scripts/install_spdlog.sh b/thirdparty/scripts/install_spdlog.sh index 1b9fcbe..abd0f9e 100644 --- a/thirdparty/scripts/install_spdlog.sh +++ b/thirdparty/scripts/install_spdlog.sh @@ -1,8 +1,8 @@ #!/bin/bash set -e -# Same as the apt installed version on Ubuntu 22.04 -VER_TAG=v1.9.2 +# Use a specific version +VER_TAG=v1.14.1 # Clone source code if [ ! -d spdlog ] ; then diff --git a/thirdparty/scripts/install_tinyxml2.sh b/thirdparty/scripts/install_tinyxml2.sh index 379c654..e443ef8 100644 --- a/thirdparty/scripts/install_tinyxml2.sh +++ b/thirdparty/scripts/install_tinyxml2.sh @@ -2,8 +2,8 @@ set -e echo "Installing tinyxml2" -# Same as the apt installed version on Ubuntu 22.04 -VER_TAG=9.0.0 +# Use a specific version +VER_TAG=8.0.0 # Clone source code if [ ! -d tinyxml2 ] ; then