latest pushes
This commit is contained in:
parent
65bc5c5fc3
commit
f32621ac0f
@ -18,7 +18,7 @@ notifications:
|
||||
- ronaldsonbellande@gmail.com
|
||||
env:
|
||||
matrix:
|
||||
- ROS_DISTRO=noetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=file OS_NAME=ubuntu OS_CODE_NAME=focal $ROSINSTALL_FILENAME=".robotis_humanoid_robot_demo.rosinstall"
|
||||
- ROS_DISTRO=noetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=file OS_NAME=ubuntu OS_CODE_NAME=focal $ROSINSTALL_FILENAME=".humanoid_robot_demo.rosinstall"
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "humanoid_robot_ball_detector/GetParameters.h"
|
||||
#include "humanoid_robot_ball_detector/SetParameters.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class BallDetector {
|
||||
public:
|
||||
@ -165,5 +165,5 @@ protected:
|
||||
humanoid_robot_ball_detector::DetectorParamsConfig>::CallbackType callback_fnc_;
|
||||
};
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
#endif // _BALL_DETECTOR_H_
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef _DETECTOR_CONFIG_H_
|
||||
#define _DETECTOR_CONFIG_H_
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
// constants
|
||||
const int GAUSSIAN_BLUR_SIZE_DEFAULT = 7;
|
||||
@ -86,5 +86,5 @@ public:
|
||||
~DetectorConfig() {}
|
||||
};
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
#endif // _DETECTOR_CONFIG_H_
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "humanoid_robot_ball_detector/ball_detector.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
BallDetector::BallDetector()
|
||||
: nh_(ros::this_node::getName()), it_(this->nh_), enable_(true),
|
||||
@ -892,4 +892,4 @@ void BallDetector::drawOutputImage() {
|
||||
0); // circle outline in blue
|
||||
}
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
@ -24,7 +24,7 @@ int main(int argc, char **argv) {
|
||||
ros::init(argc, argv, "ball_detector_node");
|
||||
|
||||
// create ros wrapper object
|
||||
robotis_op::BallDetector detector;
|
||||
humanoid_robot_op::BallDetector detector;
|
||||
|
||||
// set node loop rate
|
||||
ros::Rate loop_rate(30);
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<param name="robot_description" command="$(find xacro)/xacro.py '$(find humanoid_robot_description)/urdf/robotis_humanoid_robot.urdf.xacro'" />
|
||||
<param name="robot_description" command="$(find xacro)/xacro.py '$(find humanoid_robot_description)/urdf/humanoid_robot.urdf.xacro'" />
|
||||
|
||||
<!-- Send fake joint values and monitoring present joint angle -->
|
||||
<node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher">
|
||||
<param name="use_gui" value="TRUE" />
|
||||
<rosparam param="/source_list">[/robotis/present_joint_states]</rosparam>
|
||||
<rosparam param="/source_list">[/humanoid_robot/present_joint_states]</rosparam>
|
||||
</node>
|
||||
|
||||
<!-- Combine joint values -->
|
||||
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher">
|
||||
<remap from="/joint_states" to="/robotis/present_joint_states" />
|
||||
<remap from="/joint_states" to="/humanoid_robot/present_joint_states" />
|
||||
</node>
|
||||
|
||||
<!-- Show in Rviz -->
|
||||
|
@ -287,7 +287,7 @@ Visualization Manager:
|
||||
Enabled: true
|
||||
History Length: 1
|
||||
Name: Imu
|
||||
Topic: /robotis/open_cr/imu
|
||||
Topic: /humanoid_robot/open_cr/imu
|
||||
Unreliable: false
|
||||
Value: true
|
||||
Enabled: true
|
||||
|
@ -14,11 +14,11 @@ find_package(
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
geometry_msgs
|
||||
robotis_controller_msgs
|
||||
humanoid_robot_controller_msgs
|
||||
humanoid_robot_walking_module_msgs
|
||||
humanoid_robot_action_module_msgs
|
||||
cmake_modules
|
||||
robotis_math
|
||||
humanoid_robot_math
|
||||
humanoid_robot_ball_detector
|
||||
)
|
||||
|
||||
@ -69,11 +69,11 @@ catkin_package(
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
geometry_msgs
|
||||
robotis_controller_msgs
|
||||
humanoid_robot_controller_msgs
|
||||
humanoid_robot_walking_module_msgs
|
||||
humanoid_robot_action_module_msgs
|
||||
cmake_modules
|
||||
robotis_math
|
||||
humanoid_robot_math
|
||||
humanoid_robot_ball_detector
|
||||
DEPENDS Boost EIGEN3
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robotis_humanoid_robot_demo
|
||||
Changelog for package humanoid_robot_demo
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.3.1 (2023-09-27)
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(robotis_humanoid_robot_demo)
|
||||
project(humanoid_robot_demo)
|
||||
find_package(catkin REQUIRED)
|
||||
catkin_metapackage()
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>robotis_humanoid_robot_demo</name>
|
||||
<name>humanoid_robot_demo</name>
|
||||
<version>0.3.0</version>
|
||||
<description>
|
||||
ROS packages for the robotis_humanoid_robot_demo (meta package)
|
||||
ROS packages for the humanoid_robot_demo (meta package)
|
||||
</description>
|
||||
<license>Apache 2.0</license>
|
||||
<maintainer email="ronaldsonbellande@gmail.com">Ronaldson Bellande</maintainer>
|
@ -29,10 +29,10 @@
|
||||
|
||||
#include "humanoid_robot_action_module_msgs/IsRunning.h"
|
||||
#include "humanoid_robot_demo/op_demo.h"
|
||||
#include "robotis_controller_msgs/JointCtrlModule.h"
|
||||
#include "robotis_controller_msgs/SetModule.h"
|
||||
#include "humanoid_robot_controller_msgs/JointCtrlModule.h"
|
||||
#include "humanoid_robot_controller_msgs/SetModule.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class ActionDemo : public OPDemo {
|
||||
public:
|
||||
@ -109,6 +109,6 @@ protected:
|
||||
int play_status_;
|
||||
};
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
||||
#endif /* ACTION_DEMO_H_ */
|
||||
|
@ -32,9 +32,9 @@
|
||||
#include "humanoid_robot_ball_detector/CircleSetStamped.h"
|
||||
#include "humanoid_robot_walking_module_msgs/GetWalkingParam.h"
|
||||
#include "humanoid_robot_walking_module_msgs/WalkingParam.h"
|
||||
#include "robotis_controller_msgs/JointCtrlModule.h"
|
||||
#include "humanoid_robot_controller_msgs/JointCtrlModule.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
// following the ball using walking
|
||||
class BallFollower {
|
||||
@ -124,6 +124,6 @@ protected:
|
||||
double curr_period_time_;
|
||||
double accum_period_time_;
|
||||
};
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
||||
#endif /* BALL_FOLLOWER_H_ */
|
||||
|
@ -31,9 +31,9 @@
|
||||
#include "humanoid_robot_ball_detector/CircleSetStamped.h"
|
||||
#include "humanoid_robot_walking_module_msgs/GetWalkingParam.h"
|
||||
#include "humanoid_robot_walking_module_msgs/WalkingParam.h"
|
||||
#include "robotis_controller_msgs/JointCtrlModule.h"
|
||||
#include "humanoid_robot_controller_msgs/JointCtrlModule.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
// head tracking for looking the ball
|
||||
class BallTracker {
|
||||
@ -108,6 +108,6 @@ protected:
|
||||
ros::Time prev_time_;
|
||||
double p_gain_, d_gain_, i_gain_;
|
||||
};
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
||||
#endif /* BALL_TRACKING_H_ */
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include <std_msgs/String.h>
|
||||
|
||||
#include "humanoid_robot_demo/op_demo.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class ButtonTest : public OPDemo {
|
||||
public:
|
||||
@ -61,6 +61,6 @@ protected:
|
||||
int rgb_led_count_;
|
||||
};
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
||||
#endif /* BUTTON_TEST_H_ */
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <std_msgs/String.h>
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
// head tracking for looking the ball
|
||||
class FaceTracker {
|
||||
@ -89,6 +89,6 @@ protected:
|
||||
|
||||
int dismissed_count_;
|
||||
};
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
||||
#endif /* FACE_TRACKING_H_ */
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include <std_msgs/String.h>
|
||||
|
||||
#include "humanoid_robot_demo/op_demo.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class MicTest : public OPDemo {
|
||||
public:
|
||||
@ -81,6 +81,6 @@ protected:
|
||||
int test_status_;
|
||||
};
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
||||
#endif /* MIC_TEST_H_ */
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef OP_DEMO_H_
|
||||
#define OP_DEMO_H_
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class OPDemo {
|
||||
public:
|
||||
@ -44,6 +44,6 @@ protected:
|
||||
bool enable_;
|
||||
};
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
||||
#endif /* OP_DEMO_H_ */
|
||||
|
@ -27,16 +27,16 @@
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include "humanoid_robot_action_module_msgs/IsRunning.h"
|
||||
#include "robotis_controller_msgs/JointCtrlModule.h"
|
||||
#include "robotis_controller_msgs/SetJointModule.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_controller_msgs/JointCtrlModule.h"
|
||||
#include "humanoid_robot_controller_msgs/SetJointModule.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
|
||||
#include "humanoid_robot_demo/ball_follower.h"
|
||||
#include "humanoid_robot_demo/ball_tracker.h"
|
||||
#include "humanoid_robot_demo/op_demo.h"
|
||||
#include "robotis_math/robotis_linear_algebra.h"
|
||||
#include "humanoid_robot_math/humanoid_robot_linear_algebra.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class SoccerDemo : public OPDemo {
|
||||
public:
|
||||
@ -74,7 +74,7 @@ protected:
|
||||
bool with_head_control = true);
|
||||
void setModuleToDemo(const std::string &module_name);
|
||||
void callServiceSettingModule(
|
||||
const robotis_controller_msgs::JointCtrlModule &modules);
|
||||
const humanoid_robot_controller_msgs::JointCtrlModule &modules);
|
||||
void parseJointNameFromYaml(const std::string &path);
|
||||
bool getJointNameFromID(const int &id, std::string &joint_name);
|
||||
bool getIDFromJointName(const std::string &joint_name, int &id);
|
||||
@ -130,5 +130,5 @@ protected:
|
||||
double present_pitch_;
|
||||
};
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
#endif // SOCCER_DEMO_H
|
||||
|
@ -25,13 +25,13 @@
|
||||
#include <std_msgs/Int32MultiArray.h>
|
||||
#include <std_msgs/String.h>
|
||||
|
||||
#include "robotis_controller_msgs/SetModule.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_controller_msgs/SetModule.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
|
||||
#include "humanoid_robot_demo/face_tracker.h"
|
||||
#include "humanoid_robot_demo/op_demo.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
class VisionDemo : public OPDemo {
|
||||
public:
|
||||
@ -78,6 +78,6 @@ protected:
|
||||
int tracking_status_;
|
||||
};
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
||||
#endif /* VISION_DEMO_H_ */
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<!-- robotis humanoid_robot manager -->
|
||||
<!-- humanoid_robot humanoid_robot manager -->
|
||||
<include file="$(find humanoid_robot_manager)/launch/humanoid_robot_manager.launch" />
|
||||
|
||||
<!-- Camera and Ball detector -->
|
||||
@ -18,7 +18,7 @@
|
||||
<!-- web setting -->
|
||||
<include file="$(find humanoid_robot_web_setting_tool)/launch/web_setting_server.launch" />
|
||||
|
||||
<!-- robotis humanoid_robot demo -->
|
||||
<!-- humanoid_robot humanoid_robot demo -->
|
||||
<node pkg="humanoid_robot_demo" type="op_demo_node" name="humanoid_robot_demo" output="screen">
|
||||
<param name="grass_demo" type="bool" value="False" />
|
||||
<param name="p_gain" value="0.45" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Launches an UVC camera, the ball detector and its visualization -->
|
||||
<launch>
|
||||
<!-- robotis humanoid_robot manager -->
|
||||
<!-- humanoid_robot humanoid_robot manager -->
|
||||
<include file="$(find humanoid_robot_manager)/launch/humanoid_robot_manager.launch" />
|
||||
|
||||
<!-- Camera and Ball detector -->
|
||||
@ -19,7 +19,7 @@
|
||||
<!-- web setting -->
|
||||
<include file="$(find humanoid_robot_web_setting_tool)/launch/web_setting_server.launch" />
|
||||
|
||||
<!-- robotis humanoid_robot self test demo -->
|
||||
<!-- humanoid_robot humanoid_robot self test demo -->
|
||||
<node pkg="humanoid_robot_demo" type="self_test_node" name="humanoid_robot_self_test" output="screen">
|
||||
<param name="grass_demo" type="bool" value="False" />
|
||||
<param name="p_gain" value="0.45" />
|
||||
|
@ -1,19 +1,19 @@
|
||||
# combination action page number and mp3 file path
|
||||
action_and_sound:
|
||||
4 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Thank you.mp3"
|
||||
41: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Introduction.mp3"
|
||||
24: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Wow.mp3"
|
||||
23: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Yes go.mp3"
|
||||
15: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Sit down.mp3"
|
||||
1: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Stand up.mp3"
|
||||
54: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Clap please.mp3"
|
||||
27: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
38: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Bye bye.mp3"
|
||||
# 101 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
4 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Thank you.mp3"
|
||||
41: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Introduction.mp3"
|
||||
24: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Wow.mp3"
|
||||
23: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Yes go.mp3"
|
||||
15: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Sit down.mp3"
|
||||
1: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Stand up.mp3"
|
||||
54: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Clap please.mp3"
|
||||
27: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
38: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Bye bye.mp3"
|
||||
# 101 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
110 : ""
|
||||
111 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Intro01.mp3"
|
||||
115 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Intro02.mp3"
|
||||
118 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Intro03.mp3"
|
||||
111 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Intro01.mp3"
|
||||
115 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Intro02.mp3"
|
||||
118 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Intro03.mp3"
|
||||
|
||||
# play list
|
||||
prev_default: [4, 41, 24, 23, 15, 1, 54, 27, 38]
|
||||
|
@ -1,15 +1,15 @@
|
||||
# combination action page number and mp3 file path
|
||||
action_and_sound:
|
||||
4 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Thank you.mp3"
|
||||
41: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Introduction.mp3"
|
||||
24: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Wow.mp3"
|
||||
23: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Yes go.mp3"
|
||||
15: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Sit down.mp3"
|
||||
1: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Stand up.mp3"
|
||||
54: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Clap please.mp3"
|
||||
27: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
38: "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Bye bye.mp3"
|
||||
101 : "/home/robotis/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
4 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Thank you.mp3"
|
||||
41: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Introduction.mp3"
|
||||
24: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Wow.mp3"
|
||||
23: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Yes go.mp3"
|
||||
15: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Sit down.mp3"
|
||||
1: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Stand up.mp3"
|
||||
54: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Clap please.mp3"
|
||||
27: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
38: "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Bye bye.mp3"
|
||||
101 : "/home/humanoid_robot/catkin_ws/src/ROBOTIS-HUMANOID_ROBOT/ROBOTIS-HUMANOID_ROBOT-Demo/humanoid_robot_demo/data/mp3/Oops.mp3"
|
||||
|
||||
# play list
|
||||
default: [4, 41, 24, 23, 15, 1, 54, 27, 38]
|
||||
|
@ -16,11 +16,11 @@
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_depend>sensor_msgs</build_depend>
|
||||
<build_depend>geometry_msgs</build_depend>
|
||||
<build_depend>robotis_controller_msgs</build_depend>
|
||||
<build_depend>humanoid_robot_controller_msgs</build_depend>
|
||||
<build_depend>humanoid_robot_walking_module_msgs</build_depend>
|
||||
<build_depend>humanoid_robot_action_module_msgs</build_depend>
|
||||
<build_depend>cmake_modules</build_depend>
|
||||
<build_depend>robotis_math</build_depend>
|
||||
<build_depend>humanoid_robot_math</build_depend>
|
||||
<build_depend>humanoid_robot_ball_detector</build_depend>
|
||||
<build_depend>boost</build_depend>
|
||||
<build_depend>eigen</build_depend>
|
||||
@ -36,11 +36,11 @@
|
||||
<build_export_depend>std_msgs</build_export_depend>
|
||||
<build_export_depend>sensor_msgs</build_export_depend>
|
||||
<build_export_depend>geometry_msgs</build_export_depend>
|
||||
<build_export_depend>robotis_controller_msgs</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_controller_msgs</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_walking_module_msgs</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_action_module_msgs</build_export_depend>
|
||||
<build_export_depend>cmake_modules</build_export_depend>
|
||||
<build_export_depend>robotis_math</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_math</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_ball_detector</build_export_depend>
|
||||
<build_export_depend>boost</build_export_depend>
|
||||
<build_export_depend>eigen</build_export_depend>
|
||||
@ -56,11 +56,11 @@
|
||||
<exec_depend>std_msgs</exec_depend>
|
||||
<exec_depend>sensor_msgs</exec_depend>
|
||||
<exec_depend>geometry_msgs</exec_depend>
|
||||
<exec_depend>robotis_controller_msgs</exec_depend>
|
||||
<exec_depend>humanoid_robot_controller_msgs</exec_depend>
|
||||
<exec_depend>humanoid_robot_walking_module_msgs</exec_depend>
|
||||
<exec_depend>humanoid_robot_action_module_msgs</exec_depend>
|
||||
<exec_depend>cmake_modules</exec_depend>
|
||||
<exec_depend>robotis_math</exec_depend>
|
||||
<exec_depend>humanoid_robot_math</exec_depend>
|
||||
<exec_depend>humanoid_robot_ball_detector</exec_depend>
|
||||
<exec_depend>boost</exec_depend>
|
||||
<exec_depend>eigen</exec_depend>
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/action_demo.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
ActionDemo::ActionDemo()
|
||||
: SPIN_RATE(30), DEBUG_PRINT(false), play_index_(0),
|
||||
@ -35,7 +35,7 @@ ActionDemo::ActionDemo()
|
||||
play_list_name_ =
|
||||
nh.param<std::string>("action_script_play_list", default_play_list);
|
||||
|
||||
demo_command_sub_ = nh.subscribe("/robotis/demo_command", 1,
|
||||
demo_command_sub_ = nh.subscribe("/humanoid_robot/demo_command", 1,
|
||||
&ActionDemo::demoCommandCallback, this);
|
||||
|
||||
parseActionScript(script_path_);
|
||||
@ -150,19 +150,19 @@ void ActionDemo::callbackThread() {
|
||||
|
||||
// subscriber & publisher
|
||||
module_control_pub_ =
|
||||
nh.advertise<std_msgs::String>("/robotis/enable_ctrl_module", 0);
|
||||
nh.advertise<std_msgs::String>("/humanoid_robot/enable_ctrl_module", 0);
|
||||
motion_index_pub_ =
|
||||
nh.advertise<std_msgs::Int32>("/robotis/action/page_num", 0);
|
||||
nh.advertise<std_msgs::Int32>("/humanoid_robot/action/page_num", 0);
|
||||
play_sound_pub_ = nh.advertise<std_msgs::String>("/play_sound_file", 0);
|
||||
|
||||
buttuon_sub_ = nh.subscribe("/robotis/open_cr/button", 1,
|
||||
buttuon_sub_ = nh.subscribe("/humanoid_robot/open_cr/button", 1,
|
||||
&ActionDemo::buttonHandlerCallback, this);
|
||||
|
||||
is_running_client_ = nh.serviceClient<humanoid_robot_action_module_msgs::IsRunning>(
|
||||
"/robotis/action/is_running");
|
||||
"/humanoid_robot/action/is_running");
|
||||
set_joint_module_client_ =
|
||||
nh.serviceClient<robotis_controller_msgs::SetModule>(
|
||||
"/robotis/set_present_ctrl_modules");
|
||||
nh.serviceClient<humanoid_robot_controller_msgs::SetModule>(
|
||||
"/humanoid_robot/set_present_ctrl_modules");
|
||||
|
||||
while (nh.ok()) {
|
||||
ros::spinOnce();
|
||||
@ -320,7 +320,7 @@ void ActionDemo::setModuleToDemo(const std::string &module_name) {
|
||||
}
|
||||
|
||||
void ActionDemo::callServiceSettingModule(const std::string &module_name) {
|
||||
robotis_controller_msgs::SetModule set_module_srv;
|
||||
humanoid_robot_controller_msgs::SetModule set_module_srv;
|
||||
set_module_srv.request.module_name = module_name;
|
||||
|
||||
if (set_joint_module_client_.call(set_module_srv) == false) {
|
||||
@ -342,4 +342,4 @@ void ActionDemo::demoCommandCallback(const std_msgs::String::ConstPtr &msg) {
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include "humanoid_robot_demo/action_demo.h"
|
||||
#include "humanoid_robot_demo/soccer_demo.h"
|
||||
#include "humanoid_robot_demo/vision_demo.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "robotis_math/robotis_linear_algebra.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_math/humanoid_robot_linear_algebra.h"
|
||||
|
||||
enum Demo_Status {
|
||||
Ready = 0,
|
||||
@ -61,22 +61,22 @@ int main(int argc, char **argv) {
|
||||
ros::init(argc, argv, "demo_node");
|
||||
|
||||
// create ros wrapper object
|
||||
robotis_op::OPDemo *current_demo = NULL;
|
||||
robotis_op::SoccerDemo *soccer_demo = new robotis_op::SoccerDemo();
|
||||
robotis_op::ActionDemo *action_demo = new robotis_op::ActionDemo();
|
||||
robotis_op::VisionDemo *vision_demo = new robotis_op::VisionDemo();
|
||||
humanoid_robot_op::OPDemo *current_demo = NULL;
|
||||
humanoid_robot_op::SoccerDemo *soccer_demo = new humanoid_robot_op::SoccerDemo();
|
||||
humanoid_robot_op::ActionDemo *action_demo = new humanoid_robot_op::ActionDemo();
|
||||
humanoid_robot_op::VisionDemo *vision_demo = new humanoid_robot_op::VisionDemo();
|
||||
|
||||
ros::NodeHandle nh(ros::this_node::getName());
|
||||
|
||||
init_pose_pub = nh.advertise<std_msgs::String>("/robotis/base/ini_pose", 0);
|
||||
init_pose_pub = nh.advertise<std_msgs::String>("/humanoid_robot/base/ini_pose", 0);
|
||||
play_sound_pub = nh.advertise<std_msgs::String>("/play_sound_file", 0);
|
||||
led_pub = nh.advertise<robotis_controller_msgs::SyncWriteItem>(
|
||||
"/robotis/sync_write_item", 0);
|
||||
dxl_torque_pub = nh.advertise<std_msgs::String>("/robotis/dxl_torque", 0);
|
||||
led_pub = nh.advertise<humanoid_robot_controller_msgs::SyncWriteItem>(
|
||||
"/humanoid_robot/sync_write_item", 0);
|
||||
dxl_torque_pub = nh.advertise<std_msgs::String>("/humanoid_robot/dxl_torque", 0);
|
||||
ros::Subscriber buttuon_sub =
|
||||
nh.subscribe("/robotis/open_cr/button", 1, buttonHandlerCallback);
|
||||
nh.subscribe("/humanoid_robot/open_cr/button", 1, buttonHandlerCallback);
|
||||
ros::Subscriber mode_command_sub =
|
||||
nh.subscribe("/robotis/mode_command", 1, demoModeCommandCallback);
|
||||
nh.subscribe("/humanoid_robot/mode_command", 1, demoModeCommandCallback);
|
||||
|
||||
default_mp3_path = ros::package::getPath("humanoid_robot_demo") + "/data/mp3/";
|
||||
|
||||
@ -266,7 +266,7 @@ void playSound(const std::string &path) {
|
||||
}
|
||||
|
||||
void setLED(int led) {
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led);
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/ball_follower.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
BallFollower::BallFollower()
|
||||
: nh_(ros::this_node::getName()), FOV_WIDTH(35.2 * M_PI / 180),
|
||||
@ -34,16 +34,16 @@ BallFollower::BallFollower()
|
||||
current_x_move_(0.005), current_r_angle_(0), curr_period_time_(0.6),
|
||||
accum_period_time_(0.0), DEBUG_PRINT(false) {
|
||||
current_joint_states_sub_ =
|
||||
nh_.subscribe("/robotis/goal_joint_states", 10,
|
||||
nh_.subscribe("/humanoid_robot/goal_joint_states", 10,
|
||||
&BallFollower::currentJointStatesCallback, this);
|
||||
|
||||
set_walking_command_pub_ =
|
||||
nh_.advertise<std_msgs::String>("/robotis/walking/command", 0);
|
||||
nh_.advertise<std_msgs::String>("/humanoid_robot/walking/command", 0);
|
||||
set_walking_param_pub_ = nh_.advertise<humanoid_robot_walking_module_msgs::WalkingParam>(
|
||||
"/robotis/walking/set_params", 0);
|
||||
"/humanoid_robot/walking/set_params", 0);
|
||||
get_walking_param_client_ =
|
||||
nh_.serviceClient<humanoid_robot_walking_module_msgs::GetWalkingParam>(
|
||||
"/robotis/walking/get_params");
|
||||
"/humanoid_robot/walking/get_params");
|
||||
|
||||
prev_time_ = ros::Time::now();
|
||||
}
|
||||
@ -321,4 +321,4 @@ bool BallFollower::getWalkingParam() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/ball_tracker.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
BallTracker::BallTracker()
|
||||
: nh_(ros::this_node::getName()), FOV_WIDTH(35.2 * M_PI / 180),
|
||||
@ -36,11 +36,11 @@ BallTracker::BallTracker()
|
||||
<< d_gain_);
|
||||
|
||||
head_joint_offset_pub_ = nh_.advertise<sensor_msgs::JointState>(
|
||||
"/robotis/head_control/set_joint_states_offset", 0);
|
||||
"/humanoid_robot/head_control/set_joint_states_offset", 0);
|
||||
head_joint_pub_ = nh_.advertise<sensor_msgs::JointState>(
|
||||
"/robotis/head_control/set_joint_states", 0);
|
||||
"/humanoid_robot/head_control/set_joint_states", 0);
|
||||
head_scan_pub_ =
|
||||
nh_.advertise<std_msgs::String>("/robotis/head_control/scan_command", 0);
|
||||
nh_.advertise<std_msgs::String>("/humanoid_robot/head_control/scan_command", 0);
|
||||
// error_pub_ =
|
||||
// nh_.advertise<std_msgs::Float64MultiArray>("/ball_tracker/errors", 0);
|
||||
|
||||
@ -264,4 +264,4 @@ void BallTracker::scanBall() {
|
||||
head_scan_pub_.publish(scan_msg);
|
||||
}
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/soccer_demo.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
SoccerDemo::SoccerDemo()
|
||||
: FALL_FORWARD_LIMIT(60), FALL_BACK_LIMIT(-60), SPIN_RATE(30),
|
||||
@ -166,25 +166,25 @@ void SoccerDemo::callbackThread() {
|
||||
ros::NodeHandle nh(ros::this_node::getName());
|
||||
|
||||
// subscriber & publisher
|
||||
module_control_pub_ = nh.advertise<robotis_controller_msgs::JointCtrlModule>(
|
||||
"/robotis/set_joint_ctrl_modules", 0);
|
||||
module_control_pub_ = nh.advertise<humanoid_robot_controller_msgs::JointCtrlModule>(
|
||||
"/humanoid_robot/set_joint_ctrl_modules", 0);
|
||||
motion_index_pub_ =
|
||||
nh.advertise<std_msgs::Int32>("/robotis/action/page_num", 0);
|
||||
rgb_led_pub_ = nh.advertise<robotis_controller_msgs::SyncWriteItem>(
|
||||
"/robotis/sync_write_item", 0);
|
||||
nh.advertise<std_msgs::Int32>("/humanoid_robot/action/page_num", 0);
|
||||
rgb_led_pub_ = nh.advertise<humanoid_robot_controller_msgs::SyncWriteItem>(
|
||||
"/humanoid_robot/sync_write_item", 0);
|
||||
|
||||
buttuon_sub_ = nh.subscribe("/robotis/open_cr/button", 1,
|
||||
buttuon_sub_ = nh.subscribe("/humanoid_robot/open_cr/button", 1,
|
||||
&SoccerDemo::buttonHandlerCallback, this);
|
||||
demo_command_sub_ = nh.subscribe("/robotis/demo_command", 1,
|
||||
demo_command_sub_ = nh.subscribe("/humanoid_robot/demo_command", 1,
|
||||
&SoccerDemo::demoCommandCallback, this);
|
||||
imu_data_sub_ = nh.subscribe("/robotis/open_cr/imu", 1,
|
||||
imu_data_sub_ = nh.subscribe("/humanoid_robot/open_cr/imu", 1,
|
||||
&SoccerDemo::imuDataCallback, this);
|
||||
|
||||
is_running_client_ = nh.serviceClient<humanoid_robot_action_module_msgs::IsRunning>(
|
||||
"/robotis/action/is_running");
|
||||
"/humanoid_robot/action/is_running");
|
||||
set_joint_module_client_ =
|
||||
nh.serviceClient<robotis_controller_msgs::SetJointModule>(
|
||||
"/robotis/set_present_joint_ctrl_modules");
|
||||
nh.serviceClient<humanoid_robot_controller_msgs::SetJointModule>(
|
||||
"/humanoid_robot/set_present_joint_ctrl_modules");
|
||||
|
||||
test_pub_ = nh.advertise<std_msgs::String>("/debug_text", 0);
|
||||
|
||||
@ -237,7 +237,7 @@ void SoccerDemo::trackingThread() {
|
||||
|
||||
void SoccerDemo::setBodyModuleToDemo(const std::string &body_module,
|
||||
bool with_head_control) {
|
||||
robotis_controller_msgs::JointCtrlModule control_msg;
|
||||
humanoid_robot_controller_msgs::JointCtrlModule control_msg;
|
||||
|
||||
std::string head_module = "head_control_module";
|
||||
std::map<int, std::string>::iterator joint_iter;
|
||||
@ -269,7 +269,7 @@ void SoccerDemo::setModuleToDemo(const std::string &module_name) {
|
||||
if (enable_ == false)
|
||||
return;
|
||||
|
||||
robotis_controller_msgs::JointCtrlModule control_msg;
|
||||
humanoid_robot_controller_msgs::JointCtrlModule control_msg;
|
||||
std::map<int, std::string>::iterator joint_iter;
|
||||
|
||||
for (joint_iter = id_joint_table_.begin();
|
||||
@ -287,8 +287,8 @@ void SoccerDemo::setModuleToDemo(const std::string &module_name) {
|
||||
}
|
||||
|
||||
void SoccerDemo::callServiceSettingModule(
|
||||
const robotis_controller_msgs::JointCtrlModule &modules) {
|
||||
robotis_controller_msgs::SetJointModule set_joint_srv;
|
||||
const humanoid_robot_controller_msgs::JointCtrlModule &modules) {
|
||||
humanoid_robot_controller_msgs::SetJointModule set_joint_srv;
|
||||
set_joint_srv.request.joint_name = modules.joint_name;
|
||||
set_joint_srv.request.module_name = modules.module_name;
|
||||
|
||||
@ -400,7 +400,7 @@ void SoccerDemo::imuDataCallback(const sensor_msgs::Imu::ConstPtr &msg) {
|
||||
Eigen::Quaterniond orientation(msg->orientation.w, msg->orientation.x,
|
||||
msg->orientation.y, msg->orientation.z);
|
||||
Eigen::MatrixXd rpy_orientation =
|
||||
robotis_framework::convertQuaternionToRPY(orientation);
|
||||
humanoid_robot_framework::convertQuaternionToRPY(orientation);
|
||||
rpy_orientation *= (180 / M_PI);
|
||||
|
||||
ROS_INFO_COND(DEBUG_PRINT, "Roll : %3.2f, Pitch : %2.2f",
|
||||
@ -453,12 +453,12 @@ void SoccerDemo::handleKick(int ball_position) {
|
||||
|
||||
// kick motion
|
||||
switch (ball_position) {
|
||||
case robotis_op::BallFollower::OnRight:
|
||||
case humanoid_robot_op::BallFollower::OnRight:
|
||||
std::cout << "Kick Motion [R]: " << ball_position << std::endl;
|
||||
playMotion(is_grass_ ? RightKick + ForGrass : RightKick);
|
||||
break;
|
||||
|
||||
case robotis_op::BallFollower::OnLeft:
|
||||
case humanoid_robot_op::BallFollower::OnLeft:
|
||||
std::cout << "Kick Motion [L]: " << ball_position << std::endl;
|
||||
playMotion(is_grass_ ? LeftKick + ForGrass : LeftKick);
|
||||
break;
|
||||
@ -504,13 +504,13 @@ void SoccerDemo::handleKick() {
|
||||
}
|
||||
|
||||
switch (ball_position) {
|
||||
case robotis_op::BallFollower::OnRight:
|
||||
case humanoid_robot_op::BallFollower::OnRight:
|
||||
std::cout << "Kick Motion [R]: " << ball_position << std::endl;
|
||||
sendDebugTopic("Kick the ball using Right foot");
|
||||
playMotion(is_grass_ ? RightKick + ForGrass : RightKick);
|
||||
break;
|
||||
|
||||
case robotis_op::BallFollower::OnLeft:
|
||||
case humanoid_robot_op::BallFollower::OnLeft:
|
||||
std::cout << "Kick Motion [L]: " << ball_position << std::endl;
|
||||
sendDebugTopic("Kick the ball using Left foot");
|
||||
playMotion(is_grass_ ? LeftKick + ForGrass : LeftKick);
|
||||
@ -583,7 +583,7 @@ void SoccerDemo::setRGBLED(int blue, int green, int red) {
|
||||
int led_full_unit = 0x1F;
|
||||
int led_value = (blue & led_full_unit) << 10 | (green & led_full_unit) << 5 |
|
||||
(red & led_full_unit);
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED_RGB";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led_value);
|
||||
@ -614,4 +614,4 @@ void SoccerDemo::sendDebugTopic(const std::string &msgs) {
|
||||
test_pub_.publish(debug_msg);
|
||||
}
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/button_test.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
ButtonTest::ButtonTest() : SPIN_RATE(30), led_count_(0), rgb_led_count_(0) {
|
||||
enable_ = false;
|
||||
@ -63,11 +63,11 @@ void ButtonTest::callbackThread() {
|
||||
ros::NodeHandle nh(ros::this_node::getName());
|
||||
|
||||
// subscriber & publisher
|
||||
rgb_led_pub_ = nh.advertise<robotis_controller_msgs::SyncWriteItem>(
|
||||
"/robotis/sync_write_item", 0);
|
||||
rgb_led_pub_ = nh.advertise<humanoid_robot_controller_msgs::SyncWriteItem>(
|
||||
"/humanoid_robot/sync_write_item", 0);
|
||||
play_sound_pub_ = nh.advertise<std_msgs::String>("/play_sound_file", 0);
|
||||
|
||||
buttuon_sub_ = nh.subscribe("/robotis/open_cr/button", 1,
|
||||
buttuon_sub_ = nh.subscribe("/humanoid_robot/open_cr/button", 1,
|
||||
&ButtonTest::buttonHandlerCallback, this);
|
||||
|
||||
while (nh.ok()) {
|
||||
@ -109,7 +109,7 @@ void ButtonTest::setRGBLED(int blue, int green, int red) {
|
||||
int led_full_unit = 0x1F;
|
||||
int led_value = (blue & led_full_unit) << 10 | (green & led_full_unit) << 5 |
|
||||
(red & led_full_unit);
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED_RGB";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led_value);
|
||||
@ -118,7 +118,7 @@ void ButtonTest::setRGBLED(int blue, int green, int red) {
|
||||
}
|
||||
|
||||
void ButtonTest::setLED(int led) {
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led);
|
||||
@ -133,4 +133,4 @@ void ButtonTest::playSound(const std::string &path) {
|
||||
play_sound_pub_.publish(sound_msg);
|
||||
}
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/mic_test.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
MicTest::MicTest()
|
||||
: SPIN_RATE(30), is_wait_(false), wait_time_(-1), test_status_(Ready),
|
||||
@ -117,7 +117,7 @@ void MicTest::callbackThread() {
|
||||
ros::NodeHandle nh(ros::this_node::getName());
|
||||
|
||||
// subscriber & publisher
|
||||
buttuon_sub_ = nh.subscribe("/robotis/open_cr/button", 1,
|
||||
buttuon_sub_ = nh.subscribe("/humanoid_robot/open_cr/button", 1,
|
||||
&MicTest::buttonHandlerCallback, this);
|
||||
play_sound_pub_ = nh.advertise<std_msgs::String>("/play_sound_file", 0);
|
||||
|
||||
@ -234,4 +234,4 @@ void MicTest::startTimer(double wait_time) {
|
||||
|
||||
void MicTest::finishTimer() { wait_time_ = -1; }
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "humanoid_robot_demo/mic_test.h"
|
||||
#include "humanoid_robot_demo/soccer_demo.h"
|
||||
#include "humanoid_robot_demo/vision_demo.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "robotis_math/robotis_linear_algebra.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_math/humanoid_robot_linear_algebra.h"
|
||||
|
||||
enum Demo_Status {
|
||||
Ready = 0,
|
||||
@ -66,24 +66,24 @@ int main(int argc, char **argv) {
|
||||
ros::init(argc, argv, "self_test_node");
|
||||
|
||||
// create ros wrapper object
|
||||
robotis_op::OPDemo *current_demo = NULL;
|
||||
robotis_op::SoccerDemo *soccer_demo = new robotis_op::SoccerDemo();
|
||||
robotis_op::ActionDemo *action_demo = new robotis_op::ActionDemo();
|
||||
robotis_op::VisionDemo *vision_demo = new robotis_op::VisionDemo();
|
||||
robotis_op::ButtonTest *button_test = new robotis_op::ButtonTest();
|
||||
robotis_op::MicTest *mic_test = new robotis_op::MicTest();
|
||||
humanoid_robot_op::OPDemo *current_demo = NULL;
|
||||
humanoid_robot_op::SoccerDemo *soccer_demo = new humanoid_robot_op::SoccerDemo();
|
||||
humanoid_robot_op::ActionDemo *action_demo = new humanoid_robot_op::ActionDemo();
|
||||
humanoid_robot_op::VisionDemo *vision_demo = new humanoid_robot_op::VisionDemo();
|
||||
humanoid_robot_op::ButtonTest *button_test = new humanoid_robot_op::ButtonTest();
|
||||
humanoid_robot_op::MicTest *mic_test = new humanoid_robot_op::MicTest();
|
||||
|
||||
ros::NodeHandle nh(ros::this_node::getName());
|
||||
|
||||
init_pose_pub = nh.advertise<std_msgs::String>("/robotis/base/ini_pose", 0);
|
||||
init_pose_pub = nh.advertise<std_msgs::String>("/humanoid_robot/base/ini_pose", 0);
|
||||
play_sound_pub = nh.advertise<std_msgs::String>("/play_sound_file", 0);
|
||||
led_pub = nh.advertise<robotis_controller_msgs::SyncWriteItem>(
|
||||
"/robotis/sync_write_item", 0);
|
||||
dxl_torque_pub = nh.advertise<std_msgs::String>("/robotis/dxl_torque", 0);
|
||||
led_pub = nh.advertise<humanoid_robot_controller_msgs::SyncWriteItem>(
|
||||
"/humanoid_robot/sync_write_item", 0);
|
||||
dxl_torque_pub = nh.advertise<std_msgs::String>("/humanoid_robot/dxl_torque", 0);
|
||||
ros::Subscriber buttuon_sub =
|
||||
nh.subscribe("/robotis/open_cr/button", 1, buttonHandlerCallback);
|
||||
nh.subscribe("/humanoid_robot/open_cr/button", 1, buttonHandlerCallback);
|
||||
ros::Subscriber mode_command_sub =
|
||||
nh.subscribe("/robotis/mode_command", 1, demoModeCommandCallback);
|
||||
nh.subscribe("/humanoid_robot/mode_command", 1, demoModeCommandCallback);
|
||||
|
||||
default_mp3_path = ros::package::getPath("humanoid_robot_demo") + "/data/mp3/";
|
||||
|
||||
@ -314,7 +314,7 @@ void playSound(const std::string &path) {
|
||||
}
|
||||
|
||||
void setLED(int led) {
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led);
|
||||
|
@ -18,22 +18,22 @@
|
||||
|
||||
#include "humanoid_robot_demo/face_tracker.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
FaceTracker::FaceTracker()
|
||||
: nh_(ros::this_node::getName()), FOV_WIDTH(35.2 * M_PI / 180),
|
||||
FOV_HEIGHT(21.6 * M_PI / 180), NOT_FOUND_THRESHOLD(50),
|
||||
use_head_scan_(false), count_not_found_(0), on_tracking_(false) {
|
||||
head_joint_offset_pub_ = nh_.advertise<sensor_msgs::JointState>(
|
||||
"/robotis/head_control/set_joint_states_offset", 0);
|
||||
"/humanoid_robot/head_control/set_joint_states_offset", 0);
|
||||
head_joint_pub_ = nh_.advertise<sensor_msgs::JointState>(
|
||||
"/robotis/head_control/set_joint_states", 0);
|
||||
"/humanoid_robot/head_control/set_joint_states", 0);
|
||||
head_scan_pub_ =
|
||||
nh_.advertise<std_msgs::String>("/robotis/head_control/scan_command", 0);
|
||||
nh_.advertise<std_msgs::String>("/humanoid_robot/head_control/scan_command", 0);
|
||||
|
||||
face_position_sub_ = nh_.subscribe("/face_position", 1,
|
||||
&FaceTracker::facePositionCallback, this);
|
||||
// face_tracking_command_sub_ = nh_.subscribe("/robotis/demo_command", 1,
|
||||
// face_tracking_command_sub_ = nh_.subscribe("/humanoid_robot/demo_command", 1,
|
||||
// &FaceTracker::faceTrackerCommandCallback, this);
|
||||
}
|
||||
|
||||
@ -178,4 +178,4 @@ void FaceTracker::scanFace() {
|
||||
// ROS_INFO("Scan the ball");
|
||||
}
|
||||
|
||||
} // namespace robotis_op
|
||||
} // namespace humanoid_robot_op
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "humanoid_robot_demo/vision_demo.h"
|
||||
|
||||
namespace robotis_op {
|
||||
namespace humanoid_robot_op {
|
||||
|
||||
VisionDemo::VisionDemo()
|
||||
: SPIN_RATE(30), TIME_TO_INIT(10), tracking_status_(FaceTracker::Waiting) {
|
||||
@ -121,22 +121,22 @@ void VisionDemo::callbackThread() {
|
||||
|
||||
// subscriber & publisher
|
||||
module_control_pub_ =
|
||||
nh.advertise<std_msgs::String>("/robotis/enable_ctrl_module", 0);
|
||||
nh.advertise<std_msgs::String>("/humanoid_robot/enable_ctrl_module", 0);
|
||||
motion_index_pub_ =
|
||||
nh.advertise<std_msgs::Int32>("/robotis/action/page_num", 0);
|
||||
rgb_led_pub_ = nh.advertise<robotis_controller_msgs::SyncWriteItem>(
|
||||
"/robotis/sync_write_item", 0);
|
||||
nh.advertise<std_msgs::Int32>("/humanoid_robot/action/page_num", 0);
|
||||
rgb_led_pub_ = nh.advertise<humanoid_robot_controller_msgs::SyncWriteItem>(
|
||||
"/humanoid_robot/sync_write_item", 0);
|
||||
face_tracking_command_pub_ =
|
||||
nh.advertise<std_msgs::Bool>("/face_tracking/command", 0);
|
||||
|
||||
buttuon_sub_ = nh.subscribe("/robotis/open_cr/button", 1,
|
||||
buttuon_sub_ = nh.subscribe("/humanoid_robot/open_cr/button", 1,
|
||||
&VisionDemo::buttonHandlerCallback, this);
|
||||
faceCoord_sub_ =
|
||||
nh.subscribe("/faceCoord", 1, &VisionDemo::facePositionCallback, this);
|
||||
|
||||
set_joint_module_client_ =
|
||||
nh.serviceClient<robotis_controller_msgs::SetModule>(
|
||||
"/robotis/set_present_ctrl_modules");
|
||||
nh.serviceClient<humanoid_robot_controller_msgs::SetModule>(
|
||||
"/humanoid_robot/set_present_ctrl_modules");
|
||||
|
||||
while (nh.ok()) {
|
||||
ros::spinOnce();
|
||||
@ -171,7 +171,7 @@ void VisionDemo::setModuleToDemo(const std::string &module_name) {
|
||||
}
|
||||
|
||||
void VisionDemo::callServiceSettingModule(const std::string &module_name) {
|
||||
robotis_controller_msgs::SetModule set_module_srv;
|
||||
humanoid_robot_controller_msgs::SetModule set_module_srv;
|
||||
set_module_srv.request.module_name = module_name;
|
||||
|
||||
if (set_joint_module_client_.call(set_module_srv) == false) {
|
||||
@ -216,7 +216,7 @@ void VisionDemo::setRGBLED(int blue, int green, int red) {
|
||||
int led_full_unit = 0x1F;
|
||||
int led_value = (blue & led_full_unit) << 10 | (green & led_full_unit) << 5 |
|
||||
(red & led_full_unit);
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED_RGB";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led_value);
|
||||
@ -224,4 +224,4 @@ void VisionDemo::setRGBLED(int blue, int green, int red) {
|
||||
rgb_led_pub_.publish(syncwrite_msg);
|
||||
}
|
||||
|
||||
} /* namespace robotis_op */
|
||||
} /* namespace humanoid_robot_op */
|
||||
|
@ -1,5 +1,5 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robotis_humanoid_robot_demo
|
||||
Changelog for package humanoid_robot_demo
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.3.1 (2023-09-27)
|
||||
|
@ -9,7 +9,7 @@ project(humanoid_robot_read_write_demo)
|
||||
################################################################################
|
||||
find_package(
|
||||
catkin REQUIRED COMPONENTS
|
||||
robotis_controller_msgs
|
||||
humanoid_robot_controller_msgs
|
||||
roscpp
|
||||
sensor_msgs
|
||||
std_msgs
|
||||
@ -34,7 +34,7 @@ catkin_package(
|
||||
INCLUDE_DIRS
|
||||
CATKIN_DEPENDS
|
||||
roscpp
|
||||
robotis_controller_msgs
|
||||
humanoid_robot_controller_msgs
|
||||
roscpp
|
||||
sensor_msgs
|
||||
std_msgs
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<param name="gazebo" value="false" type="bool" />
|
||||
<param name="gazebo_robot_name" value="robotis_humanoid_robot" />
|
||||
<param name="gazebo_robot_name" value="humanoid_robot" />
|
||||
|
||||
<param name="offset_file_path" value="$(find humanoid_robot_manager)/config/offset.yaml" />
|
||||
<param name="robot_file_path" value="$(find humanoid_robot_manager)/config/HUMANOID_ROBOT.robot" />
|
||||
<param name="init_file_path" value="$(find humanoid_robot_manager)/config/dxl_init_HUMANOID_ROBOT.yaml" />
|
||||
<param name="device_name" value="/dev/ttyUSB0" />
|
||||
|
||||
<param name="/robotis/direct_control/default_moving_time" value="0.04" />
|
||||
<param name="/robotis/direct_control/default_moving_angle" value="90" />
|
||||
<param name="/humanoid_robot/direct_control/default_moving_time" value="0.04" />
|
||||
<param name="/humanoid_robot/direct_control/default_moving_angle" value="90" />
|
||||
|
||||
<!-- HUMANOID_ROBOT Manager -->
|
||||
<node pkg="humanoid_robot_manager" type="humanoid_robot_manager" name="humanoid_robot_manager" output="screen">
|
||||
|
@ -6,26 +6,26 @@
|
||||
The humanoid_robot_read_write_demo package
|
||||
</description>
|
||||
<license>Apache 2.0</license>
|
||||
<maintainer email="pyo@robotis.com">Ronaldson Bellande</maintainer>
|
||||
<maintainer email="pyo@humanoid_robot.com">Ronaldson Bellande</maintainer>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_depend>sensor_msgs</build_depend>
|
||||
<build_depend>robotis_controller_msgs</build_depend>
|
||||
<build_depend>humanoid_robot_controller_msgs</build_depend>
|
||||
<build_depend>humanoid_robot_manager</build_depend>
|
||||
|
||||
<build_export_depend>roscpp</build_export_depend>
|
||||
<build_export_depend>std_msgs</build_export_depend>
|
||||
<build_export_depend>sensor_msgs</build_export_depend>
|
||||
<build_export_depend>robotis_controller_msgs</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_controller_msgs</build_export_depend>
|
||||
<build_export_depend>humanoid_robot_manager</build_export_depend>
|
||||
|
||||
<exec_depend>roscpp</exec_depend>
|
||||
<exec_depend>std_msgs</exec_depend>
|
||||
<exec_depend>sensor_msgs</exec_depend>
|
||||
<exec_depend>robotis_controller_msgs</exec_depend>
|
||||
<exec_depend>humanoid_robot_controller_msgs</exec_depend>
|
||||
<exec_depend>humanoid_robot_manager</exec_depend>
|
||||
|
||||
</package>
|
||||
|
@ -20,8 +20,8 @@
|
||||
#include <sensor_msgs/JointState.h>
|
||||
#include <std_msgs/String.h>
|
||||
|
||||
#include "robotis_controller_msgs/SetModule.h"
|
||||
#include "robotis_controller_msgs/SyncWriteItem.h"
|
||||
#include "humanoid_robot_controller_msgs/SetModule.h"
|
||||
#include "humanoid_robot_controller_msgs/SyncWriteItem.h"
|
||||
|
||||
void buttonHandlerCallback(const std_msgs::String::ConstPtr &msg);
|
||||
void jointstatesCallback(const sensor_msgs::JointState::ConstPtr &msg);
|
||||
@ -62,24 +62,24 @@ int main(int argc, char **argv) {
|
||||
|
||||
ros::NodeHandle nh(ros::this_node::getName());
|
||||
|
||||
init_pose_pub = nh.advertise<std_msgs::String>("/robotis/base/ini_pose", 0);
|
||||
sync_write_pub = nh.advertise<robotis_controller_msgs::SyncWriteItem>(
|
||||
"/robotis/sync_write_item", 0);
|
||||
dxl_torque_pub = nh.advertise<std_msgs::String>("/robotis/dxl_torque", 0);
|
||||
init_pose_pub = nh.advertise<std_msgs::String>("/humanoid_robot/base/ini_pose", 0);
|
||||
sync_write_pub = nh.advertise<humanoid_robot_controller_msgs::SyncWriteItem>(
|
||||
"/humanoid_robot/sync_write_item", 0);
|
||||
dxl_torque_pub = nh.advertise<std_msgs::String>("/humanoid_robot/dxl_torque", 0);
|
||||
write_joint_pub =
|
||||
nh.advertise<sensor_msgs::JointState>("/robotis/set_joint_states", 0);
|
||||
nh.advertise<sensor_msgs::JointState>("/humanoid_robot/set_joint_states", 0);
|
||||
write_joint_pub2 = nh.advertise<sensor_msgs::JointState>(
|
||||
"/robotis/direct_control/set_joint_states", 0);
|
||||
"/humanoid_robot/direct_control/set_joint_states", 0);
|
||||
|
||||
read_joint_sub =
|
||||
nh.subscribe("/robotis/present_joint_states", 1, jointstatesCallback);
|
||||
nh.subscribe("/humanoid_robot/present_joint_states", 1, jointstatesCallback);
|
||||
buttuon_sub =
|
||||
nh.subscribe("/robotis/open_cr/button", 1, buttonHandlerCallback);
|
||||
nh.subscribe("/humanoid_robot/open_cr/button", 1, buttonHandlerCallback);
|
||||
|
||||
// service
|
||||
set_joint_module_client =
|
||||
nh.serviceClient<robotis_controller_msgs::SetModule>(
|
||||
"/robotis/set_present_ctrl_modules");
|
||||
nh.serviceClient<humanoid_robot_controller_msgs::SetModule>(
|
||||
"/humanoid_robot/set_present_ctrl_modules");
|
||||
|
||||
ros::start();
|
||||
|
||||
@ -116,7 +116,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
void buttonHandlerCallback(const std_msgs::String::ConstPtr &msg) {
|
||||
// starting demo using robotis_controller
|
||||
// starting demo using humanoid_robot_controller
|
||||
if (msg->data == "mode") {
|
||||
control_module = Framework;
|
||||
ROS_INFO("Button : mode | Framework");
|
||||
@ -215,7 +215,7 @@ void goInitPose() {
|
||||
}
|
||||
|
||||
void setLED(int led) {
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
syncwrite_msg.item_name = "LED";
|
||||
syncwrite_msg.joint_name.push_back("open-cr");
|
||||
syncwrite_msg.value.push_back(led);
|
||||
@ -238,7 +238,7 @@ bool checkManagerRunning(std::string &manager_name) {
|
||||
}
|
||||
|
||||
void setModule(const std::string &module_name) {
|
||||
robotis_controller_msgs::SetModule set_module_srv;
|
||||
humanoid_robot_controller_msgs::SetModule set_module_srv;
|
||||
set_module_srv.request.module_name = module_name;
|
||||
|
||||
if (set_joint_module_client.call(set_module_srv) == false) {
|
||||
@ -257,7 +257,7 @@ void torqueOnAll() {
|
||||
}
|
||||
|
||||
void torqueOff(const std::string &body_side) {
|
||||
robotis_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
humanoid_robot_controller_msgs::SyncWriteItem syncwrite_msg;
|
||||
int torque_value = 0;
|
||||
syncwrite_msg.item_name = "torque_enable";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user