update
This commit is contained in:
46
robotis_controller/CHANGELOG.rst
Normal file → Executable file
46
robotis_controller/CHANGELOG.rst
Normal file → Executable file
@ -1,23 +1,23 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robotis_controller
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.1.1 (2016-08-18)
|
||||
-----------
|
||||
* updated the package information
|
||||
|
||||
0.1.0 (2016-08-12)
|
||||
-----------
|
||||
* first public release for Kinetic
|
||||
* modified the package information for release
|
||||
* develop branch -> master branch
|
||||
* function name changed : DeviceInit() -> InitDevice()
|
||||
* Fixed high CPU consumption due to busy waits
|
||||
* add SensorState
|
||||
add Singleton template
|
||||
* XM-430 / CM-740 device file added.
|
||||
Sensor device added.
|
||||
* added code to support the gazebo simulator
|
||||
* added first bulk read failure protection code
|
||||
* renewal
|
||||
* Contributors: Alexander Stumpf, Jay Song, Zerom, Pyo
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robotis_controller
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.1.1 (2016-08-18)
|
||||
-----------
|
||||
* updated the package information
|
||||
|
||||
0.1.0 (2016-08-12)
|
||||
-----------
|
||||
* first public release for Kinetic
|
||||
* modified the package information for release
|
||||
* develop branch -> master branch
|
||||
* function name changed : DeviceInit() -> InitDevice()
|
||||
* Fixed high CPU consumption due to busy waits
|
||||
* add SensorState
|
||||
add Singleton template
|
||||
* XM-430 / CM-740 device file added.
|
||||
Sensor device added.
|
||||
* added code to support the gazebo simulator
|
||||
* added first bulk read failure protection code
|
||||
* renewal
|
||||
* Contributors: Alexander Stumpf, Jay Song, Zerom, Pyo
|
||||
|
132
robotis_controller/CMakeLists.txt
Normal file → Executable file
132
robotis_controller/CMakeLists.txt
Normal file → Executable file
@ -1,66 +1,66 @@
|
||||
################################################################################
|
||||
# CMake
|
||||
################################################################################
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(robotis_controller)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
################################################################################
|
||||
# Packages
|
||||
################################################################################
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
roscpp
|
||||
roslib
|
||||
sensor_msgs
|
||||
std_msgs
|
||||
robotis_controller_msgs
|
||||
robotis_framework_common
|
||||
cmake_modules
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Declare ROS messages, services and actions
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Declare ROS dynamic reconfigure parameters
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Catkin specific configuration
|
||||
################################################################################
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
LIBRARIES robotis_controller
|
||||
CATKIN_DEPENDS roscpp roslib sensor_msgs std_msgs robotis_framework_common
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Build
|
||||
################################################################################
|
||||
include_directories(
|
||||
include
|
||||
${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_library(robotis_controller src/robotis_controller/robotis_controller.cpp)
|
||||
add_dependencies(robotis_controller ${catkin_EXPORTED_TARGETS})
|
||||
target_link_libraries(robotis_controller yaml-cpp ${catkin_LIBRARIES})
|
||||
|
||||
################################################################################
|
||||
# Install
|
||||
################################################################################
|
||||
install(TARGETS robotis_controller
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
)
|
||||
|
||||
install(DIRECTORY include/${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Test
|
||||
################################################################################
|
||||
################################################################################
|
||||
# CMake
|
||||
################################################################################
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(robotis_controller)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
################################################################################
|
||||
# Packages
|
||||
################################################################################
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
roscpp
|
||||
roslib
|
||||
sensor_msgs
|
||||
std_msgs
|
||||
robotis_controller_msgs
|
||||
robotis_framework_common
|
||||
cmake_modules
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Declare ROS messages, services and actions
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Declare ROS dynamic reconfigure parameters
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Catkin specific configuration
|
||||
################################################################################
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
LIBRARIES robotis_controller
|
||||
CATKIN_DEPENDS roscpp roslib sensor_msgs std_msgs robotis_framework_common
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Build
|
||||
################################################################################
|
||||
include_directories(
|
||||
include
|
||||
${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_library(robotis_controller src/robotis_controller/robotis_controller.cpp)
|
||||
add_dependencies(robotis_controller ${catkin_EXPORTED_TARGETS})
|
||||
target_link_libraries(robotis_controller yaml-cpp ${catkin_LIBRARIES})
|
||||
|
||||
################################################################################
|
||||
# Install
|
||||
################################################################################
|
||||
install(TARGETS robotis_controller
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
)
|
||||
|
||||
install(DIRECTORY include/${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Test
|
||||
################################################################################
|
||||
|
0
robotis_controller/include/robotis_controller/robotis_controller.h
Normal file → Executable file
0
robotis_controller/include/robotis_controller/robotis_controller.h
Normal file → Executable file
56
robotis_controller/package.xml
Normal file → Executable file
56
robotis_controller/package.xml
Normal file → Executable file
@ -1,28 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>robotis_controller</name>
|
||||
<version>0.1.1</version>
|
||||
<description>
|
||||
The main package that controls THORMANG3.
|
||||
</description>
|
||||
<license>BSD</license>
|
||||
<author email="zerom@robotis.com">Zerom</author>
|
||||
<maintainer email="pyo@robotis.com">Pyo</maintainer>
|
||||
<url type="bugtracker">https://github.com/ROBOTIS-GIT/ROBOTIS-Framework/issues</url>
|
||||
<url type="repository">https://github.com/ROBOTIS-GIT/ROBOTIS-Framework</url>
|
||||
<url type="website">http://wiki.ros.org/robotis_controller</url>
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>roslib</build_depend>
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_depend>sensor_msgs</build_depend>
|
||||
<build_depend>robotis_controller_msgs</build_depend>
|
||||
<build_depend>robotis_framework_common</build_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>roslib</run_depend>
|
||||
<run_depend>std_msgs</run_depend>
|
||||
<run_depend>sensor_msgs</run_depend>
|
||||
<run_depend>robotis_controller_msgs</run_depend>
|
||||
<run_depend>robotis_framework_common</run_depend>
|
||||
<export></export>
|
||||
</package>
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>robotis_controller</name>
|
||||
<version>0.1.1</version>
|
||||
<description>
|
||||
The main package that controls THORMANG3.
|
||||
</description>
|
||||
<license>BSD</license>
|
||||
<author email="zerom@robotis.com">Zerom</author>
|
||||
<maintainer email="pyo@robotis.com">Pyo</maintainer>
|
||||
<url type="bugtracker">https://github.com/ROBOTIS-GIT/ROBOTIS-Framework/issues</url>
|
||||
<url type="repository">https://github.com/ROBOTIS-GIT/ROBOTIS-Framework</url>
|
||||
<url type="website">http://wiki.ros.org/robotis_controller</url>
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>roslib</build_depend>
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_depend>sensor_msgs</build_depend>
|
||||
<build_depend>robotis_controller_msgs</build_depend>
|
||||
<build_depend>robotis_framework_common</build_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>roslib</run_depend>
|
||||
<run_depend>std_msgs</run_depend>
|
||||
<run_depend>sensor_msgs</run_depend>
|
||||
<run_depend>robotis_controller_msgs</run_depend>
|
||||
<run_depend>robotis_framework_common</run_depend>
|
||||
<export></export>
|
||||
</package>
|
||||
|
17
robotis_controller/src/robotis_controller/robotis_controller.cpp
Normal file → Executable file
17
robotis_controller/src/robotis_controller/robotis_controller.cpp
Normal file → Executable file
@ -1409,6 +1409,7 @@ void RobotisController::removeSensorModule(SensorModule *module)
|
||||
|
||||
void RobotisController::writeControlTableCallback(const robotis_controller_msgs::WriteControlTable::ConstPtr &msg)
|
||||
{
|
||||
fprintf(stderr, "[WriteControlTable] led control msg received\n");
|
||||
Device *device = NULL;
|
||||
|
||||
auto dev_it1 = robot_->dxls_.find(msg->joint_name);
|
||||
@ -1429,7 +1430,7 @@ void RobotisController::writeControlTableCallback(const robotis_controller_msgs:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, " #1 ");
|
||||
ControlTableItem *item = NULL;
|
||||
auto item_it = device->ctrl_table_.find(msg->start_item_name);
|
||||
if(item_it != device->ctrl_table_.end())
|
||||
@ -1442,15 +1443,29 @@ void RobotisController::writeControlTableCallback(const robotis_controller_msgs:
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(stderr, " #2 ");
|
||||
dynamixel::PortHandler *port = robot_->ports_[device->port_name_];
|
||||
dynamixel::PacketHandler *packet_handler = dynamixel::PacketHandler::getPacketHandler(device->protocol_version_);
|
||||
|
||||
if (item->access_type_ == Read)
|
||||
return;
|
||||
|
||||
queue_mutex_.lock();
|
||||
|
||||
|
||||
direct_sync_write_.push_back(new dynamixel::GroupSyncWrite(port, packet_handler, item->address_, msg->data_length));
|
||||
|
||||
fprintf(stderr, " #3 \n");
|
||||
|
||||
direct_sync_write_[direct_sync_write_.size() - 1]->addParam(device->id_, (uint8_t *)(msg->data.data()));
|
||||
|
||||
fprintf(stderr, "[WriteControlTable] %s -> %s : ", msg->joint_name.c_str(), msg->start_item_name.c_str());
|
||||
for (auto &dt : msg->data)
|
||||
fprintf(stderr, "%02X ", dt);
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
queue_mutex_.unlock();
|
||||
|
||||
}
|
||||
|
||||
void RobotisController::syncWriteItemCallback(const robotis_controller_msgs::SyncWriteItem::ConstPtr &msg)
|
||||
|
Reference in New Issue
Block a user