Skip to content

Commit

Permalink
Rename functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova committed Nov 23, 2024
1 parent b154d66 commit 664bd2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class WalkVisualizer : public bitbots_splines::AbstractVisualizer {
const geometry_msgs::msg::Pose &pose,
const std_msgs::msg::ColorRGBA &color);

std::pair<bitbots_quintic_walk::msg::WalkEngineDebug, visualization_msgs::msg::MarkerArray> publishEngineDebug(
std::pair<bitbots_quintic_walk::msg::WalkEngineDebug, visualization_msgs::msg::MarkerArray> buildEngineDebugMsgs(
WalkResponse response);
std::pair<bitbots_quintic_walk::msg::WalkDebug, visualization_msgs::msg::MarkerArray> publishIKDebug(
std::pair<bitbots_quintic_walk::msg::WalkDebug, visualization_msgs::msg::MarkerArray> buildIKDebugMsgs(
WalkResponse response, moveit::core::RobotStatePtr current_state, bitbots_splines::JointGoals joint_goals);
visualization_msgs::msg::MarkerArray publishWalkMarkers(WalkResponse response);
visualization_msgs::msg::MarkerArray buildWalkMarkers(WalkResponse response);

void init(moveit::core::RobotModelPtr kinematic_model);

Expand Down
12 changes: 6 additions & 6 deletions bitbots_motion/bitbots_quintic_walk/src/walk_visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ void WalkVisualizer::publishDebug(const WalkResponse &current_response,
const bitbots_splines::JointGoals &motor_goals) {
visualization_msgs::msg::MarkerArray marker_array;

auto [engine_debug, engine_markers] = publishEngineDebug(current_response);
auto [engine_debug, engine_markers] = buildEngineDebugMsgs(current_response);
marker_array.markers.insert(marker_array.markers.end(), engine_markers.markers.begin(), engine_markers.markers.end());
pub_engine_debug_->publish(engine_debug);

auto [ik_debug, ik_markers] = publishIKDebug(current_response, current_state, motor_goals);
auto [ik_debug, ik_markers] = buildIKDebugMsgs(current_response, current_state, motor_goals);
marker_array.markers.insert(marker_array.markers.end(), ik_markers.markers.begin(), ik_markers.markers.end());
pub_debug_->publish(ik_debug);

auto walk_markers = publishWalkMarkers(current_response);
auto walk_markers = buildWalkMarkers(current_response);
marker_array.markers.insert(marker_array.markers.end(), walk_markers.markers.begin(), walk_markers.markers.end());

pub_debug_marker_->publish(marker_array);
}

std::pair<bitbots_quintic_walk::msg::WalkEngineDebug, visualization_msgs::msg::MarkerArray>
WalkVisualizer::publishEngineDebug(WalkResponse response) {
WalkVisualizer::buildEngineDebugMsgs(WalkResponse response) {
// Here we will convert the walk engine response to a various debug messages and RViz markers
// Initialize output containers
bitbots_quintic_walk::msg::WalkEngineDebug msg;
Expand Down Expand Up @@ -111,7 +111,7 @@ WalkVisualizer::publishEngineDebug(WalkResponse response) {
return {msg, marker_array};
}

std::pair<bitbots_quintic_walk::msg::WalkDebug, visualization_msgs::msg::MarkerArray> WalkVisualizer::publishIKDebug(
std::pair<bitbots_quintic_walk::msg::WalkDebug, visualization_msgs::msg::MarkerArray> WalkVisualizer::buildIKDebugMsgs(
WalkResponse response, moveit::core::RobotStatePtr current_state, bitbots_splines::JointGoals joint_goals) {
bitbots_quintic_walk::msg::WalkDebug msg;
visualization_msgs::msg::MarkerArray marker_array;
Expand Down Expand Up @@ -277,7 +277,7 @@ visualization_msgs::msg::Marker WalkVisualizer::createArrowMarker(const std::str
return marker_msg;
}

visualization_msgs::msg::MarkerArray WalkVisualizer::publishWalkMarkers(WalkResponse response) {
visualization_msgs::msg::MarkerArray WalkVisualizer::buildWalkMarkers(WalkResponse response) {
visualization_msgs::msg::MarkerArray marker_array;

// Create a marker for the last step
Expand Down

0 comments on commit 664bd2b

Please sign in to comment.