Skip to content

Commit

Permalink
Merge dc2d705 into 5f59efb
Browse files Browse the repository at this point in the history
  • Loading branch information
ubgk committed Jan 31, 2024
2 parents 5f59efb + dc2d705 commit d571c99
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- BulletInterface: Add a new parameter to allow additional URDFs.

### Removed

- Bazel: dependencies based on ``pip_parse`` from ``rules_python``
Expand Down
9 changes: 9 additions & 0 deletions vulp/actuation/BulletInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ BulletInterface::BulletInterface(const ServoLayout& layout,
}
}

// Load additional URDFs
for (const auto& urdf_path : params.extra_urdf_paths) {
spdlog::info("Loading additional URDF: ", urdf_path);
if (bullet_.loadURDF(urdf_path) < 0) {
throw std::runtime_error("Could not load the additional URDF: " +
urdf_path);
}
}

// Start visualizer and configure simulation
bullet_.configureDebugVisualizer(COV_ENABLE_RENDERING, 1);
reset(Dictionary{});
Expand Down
5 changes: 5 additions & 0 deletions vulp/actuation/BulletInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
#pragma once

#include <palimpsest/Dictionary.h>
#include <spdlog/spdlog.h>

#include <limits>
#include <map>
#include <string>
#include <vector>

#include "RobotSimulator/b3RobotSimulatorClientAPI.h"
#include "vulp/actuation/BulletImuData.h"
Expand Down Expand Up @@ -119,6 +121,9 @@ class BulletInterface : public Interface {
*/
std::string urdf_path;

//! Paths to extra URDFs to load.
std::vector<std::string> extra_urdf_paths;

//! Gain for joint velocity control feedback
double torque_control_kd = 1.0;

Expand Down

0 comments on commit d571c99

Please sign in to comment.