Skip to content

Commit

Permalink
Merge pull request #7 from husarion/rename-link-joints
Browse files Browse the repository at this point in the history
Rename wheel joints and imu link
  • Loading branch information
macstepien authored Nov 7, 2022
2 parents b9b4928 + dcd5950 commit 56b19bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions include/micro_ros_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
//Motors msgs defines
#define MOT_CMD_MSG_LEN 4
#define MOT_RESP_MSG_LEN 4
#define FRONT_LEFT_MOTOR_NAME "front_left_wheel_joint"
#define FRONT_RIGHT_MOTOR_NAME "front_right_wheel_joint"
#define REAR_LEFT_MOTOR_NAME "rear_left_wheel_joint"
#define REAR_RIGHT_MOTOR_NAME "rear_right_wheel_joint"
#define FRONT_LEFT_MOTOR_NAME "fl_wheel_joint"
#define FRONT_RIGHT_MOTOR_NAME "fr_wheel_joint"
#define REAR_LEFT_MOTOR_NAME "rl_wheel_joint"
#define REAR_RIGHT_MOTOR_NAME "rr_wheel_joint"
#define MOTORS_RESPONSE_FREQ 50

#define RCCHECK(fn) \
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/micro_ros_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void uRosTimerCallback(rcl_timer_t *arg_timer, int64_t arg_last_call_time) {
imu_msg.header.stamp.sec = rmw_uros_epoch_millis()/1000;
imu_msg.header.stamp.nanosec = rmw_uros_epoch_nanos();
}
imu_msg.header.frame_id.data = (char *) "imu";
imu_msg.header.frame_id.data = (char *) "imu_link";
imu_msg.orientation.x = queue_imu.Orientation[0];
imu_msg.orientation.y = queue_imu.Orientation[1];
imu_msg.orientation.z = queue_imu.Orientation[2];
Expand Down Expand Up @@ -221,10 +221,10 @@ void MotorsResponseMsgInit(sensor_msgs__msg__JointState * arg_message){
arg_message->header.frame_id.data = frame_id;
arg_message->header.frame_id.capacity = arg_message->header.frame_id.size = strlen((const char*)frame_id);
msg_name_tab->capacity = msg_name_tab->size = MOT_RESP_MSG_LEN;
msg_name_tab[0].data = (char*)"rear_right_wheel_joint";
msg_name_tab[1].data = (char*)"rear_left_wheel_joint";
msg_name_tab[2].data = (char*)"front_right_wheel_joint";
msg_name_tab[3].data = (char*)"front_left_wheel_joint";
msg_name_tab[0].data = (char*)REAR_RIGHT_MOTOR_NAME;
msg_name_tab[1].data = (char*)REAR_LEFT_MOTOR_NAME;
msg_name_tab[2].data = (char*)FRONT_RIGHT_MOTOR_NAME;
msg_name_tab[3].data = (char*)FRONT_LEFT_MOTOR_NAME;
for(uint8_t i = 0; i < MOT_RESP_MSG_LEN; i++){
msg_name_tab[i].capacity = msg_name_tab[i].size = strlen(msg_name_tab[i].data);
}
Expand Down

0 comments on commit 56b19bd

Please sign in to comment.