Skip to content

Commit 70ab214

Browse files
authored
Merge pull request #159 from resibots/better_icub
Better icub (mesh colors)
2 parents e879c93 + 4b76760 commit 70ab214

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+15
-10
lines changed

robots/icub/icub.urdf

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<!-- =================================================================================== -->
66
<!-- icub URDF model -->
77
<robot name="icub" xmlns:xacro="http://ros.org/wiki/xacro">
8-
<link name="world"/>
8+
<!-- <link name="world"/>
99
<joint name="reference" type="floating">
1010
<parent link="world"/>
1111
<child link="waist"/>
1212
<origin rpy="0 0 0" xyz="0 0 0"/>
13-
</joint>
13+
</joint> -->
1414
<!-- INDEX -->
1515
<!-- just press ctrl+f to search -->
1616
<!-- LINKS -->
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/examples/icub.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ int main()
2222
#endif
2323
simu.add_checkerboard_floor();
2424
simu.add_robot(robot);
25-
26-
// Add some visualizations
27-
// robot->set_draw_axis(imu_config.body->getName());
28-
// robot->set_draw_axis("r_ankle_2");
25+
auto ghost = robot->clone_ghost();
26+
ghost->skeleton()->setPosition(4, -1.57);
27+
ghost->skeleton()->setPosition(5, 1.1);
28+
simu.add_robot(ghost);
29+
#if DART_VERSION_AT_MOST(6, 12, 99)
30+
// fix a bug for older versions of DART
31+
robot->set_color_mode("material");
32+
#endif
2933

3034
simu.set_control_freq(100); // 100 Hz
3135
std::vector<std::string> dofs = {

src/robot_dart/robots/a1.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ namespace robot_dart {
99
set_color_mode("material");
1010
set_self_collision(true);
1111
set_position_enforced(true);
12+
13+
// put above ground
1214
set_base_pose(robot_dart::make_vector({0., 0., 0., 0., 0., 0.5}));
15+
16+
// standing pose
1317
auto names = dof_names(true, true, true);
1418
names = std::vector<std::string>(names.begin() + 6, names.end());
15-
// standing pose
1619
set_positions(robot_dart::make_vector({0.0, 0.67, -1.3, -0.0, 0.67, -1.3, 0.0, 0.67, -1.3, -0.0, 0.67, -1.3}), names);
1720
}
1821
} // namespace robots

src/robot_dart/robots/icub.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ namespace robot_dart {
1010
_ft_foot_right(std::make_shared<sensor::ForceTorque>(joint("r_ankle_roll"), frequency))
1111
{
1212
set_color_mode("material");
13-
set_color_mode("aspect", "right_foot");
14-
set_color_mode("aspect", "left_foot");
1513

1614
set_position_enforced(true);
17-
skeleton()->setPosition(5, 0.5);
15+
skeleton()->setPosition(5, 0.46);
1816
skeleton()->setPosition(2, 1.57);
1917
}
2018

0 commit comments

Comments
 (0)