Skip to content

Commit 5f0835c

Browse files
author
kwc
committed
merging r13009 onto trunk, shouldn't have been on tag
2 parents fef69ed + e2186d5 commit 5f0835c

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
1414
# variables.
1515
#list(APPEND CPACK_SOURCE_IGNORE_FILES /core/experimental)
1616

17-
rosbuild_make_distribution(0.2.3)
17+
rosbuild_make_distribution(0.2.4)

turtlesim/images/diamondback.png

3.82 KB
Loading

turtlesim/include/turtlesim/turtle_frame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class TurtleFrame : public wxFrame
8383
M_Turtle turtles_;
8484
uint32_t id_counter_;
8585

86-
wxImage turtle_images_[3];
86+
wxImage turtle_images_[4];
8787

8888
float meter_;
8989
float width_in_meters_;

turtlesim/src/turtle_frame.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ TurtleFrame::TurtleFrame(wxWindow* parent)
5757
nh_.setParam("background_g", DEFAULT_BG_G);
5858
nh_.setParam("background_b", DEFAULT_BG_B);
5959

60-
std::string turtles[3] =
60+
std::string turtles[4] =
6161
{
6262
"box-turtle.png",
6363
"robot-turtle.png",
64-
"sea-turtle.png"
64+
"sea-turtle.png",
65+
"diamondback.png"
6566
};
6667

6768
std::string images_path = ros::package::getPath("turtlesim") + "/images/";
68-
for (size_t i = 0; i < 3; ++i)
69+
for (size_t i = 0; i < 4; ++i)
6970
{
7071
turtle_images_[i].LoadFile(wxString::FromAscii((images_path + turtles[i]).c_str()));
7172
turtle_images_[i].SetMask(true);
@@ -148,7 +149,7 @@ std::string TurtleFrame::spawnTurtle(const std::string& name, float x, float y,
148149
}
149150
}
150151

151-
TurtlePtr t(new Turtle(ros::NodeHandle(real_name), turtle_images_[rand() % 3], Vector2(x, y), angle));
152+
TurtlePtr t(new Turtle(ros::NodeHandle(real_name), turtle_images_[rand() % 4], Vector2(x, y), angle));
152153
turtles_[real_name] = t;
153154

154155
ROS_INFO("Spawning turtle [%s] at x=[%f], y=[%f], theta=[%f]", real_name.c_str(), x, y, angle);

0 commit comments

Comments
 (0)