Skip to content
Snippets Groups Projects
Commit fe83ca04 authored by Julian Tusch's avatar Julian Tusch :no_entry_sign:
Browse files

Merge branch 'fluxio-related-changes' of...

Merge branch 'fluxio-related-changes' of git.h2t.iar.kit.edu:sw/armarx/robot-api into fluxio-related-changes
parents 33aac6b7 40cc8741
No related branches found
No related tags found
3 merge requests!460Draft: fluxio/dev-skill-timeout,!449Fluxio preliminary release,!446Draft: Fluxio related changes
Pipeline #18747 failed
......@@ -53,6 +53,9 @@ namespace armarx::armem::server::robot_state
defs->optional(p.forceTorque.forceScale,
prefix + "forceTorque.forceScale",
"Scaling of force arrows.");
defs->optional(p.collisionModelEnabled,
prefix + "collisionModelEnabled",
"Enable visualization of collision model.");
}
void
......@@ -81,7 +84,7 @@ namespace armarx::armem::server::robot_state
}
void
Visu::visualizeRobots(viz::Layer& layer, const armem::robot_state::Robots& robots)
Visu::visualizeRobots(viz::Layer& layer, const armem::robot_state::Robots& robots, bool useColModel)
{
for (const armem::robot_state::Robot& robot : robots)
{
......@@ -93,7 +96,14 @@ namespace armarx::armem::server::robot_state
.joints(robot.config.jointMap)
.pose(robot.config.globalPose);
robotVisu.useFullModel();
if (not useColModel)
{
robotVisu.useFullModel();
}
else
{
robotVisu.useCollisionModel();
}
// clang-format on
layer.add(robotVisu);
......@@ -233,7 +243,13 @@ namespace armarx::armem::server::robot_state
{
viz::Layer& layer = layers.emplace_back(arviz.layer("Robots"));
visualizeRobots(layer, robots);
visualizeRobots(layer, robots, false);
}
if (p.collisionModelEnabled)
{
viz::Layer& layer = layers.emplace_back(arviz.layer("RobotsCol"));
visualizeRobots(layer, robots, true);
}
ARMARX_DEBUG << "Visualize frames ...";
......
......@@ -60,7 +60,7 @@ namespace armarx::armem::server::robot_state
void visualizeOnce(const core::time::DateTime& timestamp);
static void visualizeRobots(viz::Layer& layer, const armem::robot_state::Robots& robots);
static void visualizeRobots(viz::Layer& layer, const armem::robot_state::Robots& robots, bool useColModel = false);
static void visualizeFrames(
viz::Layer& layerFrames,
......@@ -99,6 +99,7 @@ namespace armarx::armem::server::robot_state
float frequencyHz = 25.f;
bool framesEnabled = false;
bool collisionModelEnabled = false;
struct ForceTorque
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment