Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separated the initialize() method fixes #79 #81

Open
wants to merge 1 commit into
base: kinetic-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class RobotisController : public Singleton<RobotisController>
RobotisController();

bool initialize(const std::string robot_file_path, const std::string init_file_path);
bool initialize(Robot *robot, const std::string init_file_path);
void initializeDevice(const std::string init_file_path);
void process();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,14 @@ bool RobotisController::initialize(const std::string robot_file_path, const std:
std::string dev_desc_dir_path = ros::package::getPath("robotis_device") + "/devices";

// load robot info : port , device
robot_ = new Robot(robot_file_path, dev_desc_dir_path);
Robot *new_robot = new Robot(robot_file_path, dev_desc_dir_path);
initialize(new_robot, init_file_path);
}


bool RobotisController::initialize(Robot *robot, const std::string init_file_path)
{
robot_ = robot;
if (gazebo_mode_ == true)
{
queue_thread_ = boost::thread(boost::bind(&RobotisController::msgQueueThread, this));
Expand Down