-
Notifications
You must be signed in to change notification settings - Fork 0
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
State machine #22
State machine #22
Conversation
nchan18
commented
Mar 20, 2024
- Reorganized state machine
- Added actions for each step in state machine.
- Fine tuned sensor values
- Reset Odometry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Trajectory controller comments.
@@ -55,10 +55,12 @@ bool Odometry::update(double front_left_wheel_velocity,double front_right_wheel_ | |||
{ | |||
// We cannot estimate the speed with very small time intervals: | |||
double dt = time.seconds() - timestamp_.seconds(); | |||
|
|||
RCLCPP_INFO(node_->get_logger(), "time: %f", time); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid time in logger
@@ -118,6 +132,7 @@ def generate_launch_description(): | |||
node_robot_state_publisher, | |||
joint_state_broadcaster_spawner, | |||
mecanum_drive_controller_delay, | |||
effort_controllers_spawner, | |||
# rviz2_delay, | |||
joy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment out Joy and joy_teleop
{ | ||
double robot_imu_orientation = odom->getHeading(); | ||
// RCLCPP_INFO(rclcpp::get_logger("TeleopTwistJoy"), "robot_orientation: %f", robot_imu_orientation); | ||
double temp = linear_x_cmd * cos(robot_imu_orientation) + linear_y_cmd * sin(robot_imu_orientation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe new_linear_x_cmd would be a better name here
self.down_tof_pub = self.create_publisher(LaserScan, "/grr/down_tof", 10) | ||
|
||
self.left_tof_pub = self.create_publisher(LaserScan, "/grr/left_tof", 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment out this publisher
@@ -132,7 +141,7 @@ def joint_command_callback(self, data:JointState): | |||
if name not in self.servo_mapping.keys(): | |||
self.get_logger().info('Skipped') | |||
continue | |||
effort = data.effort[i] | |||
effort = data.position[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be renamed
@@ -146,6 +146,14 @@ controller_interface::return_type MecanumController::update( | |||
Twist command = *last_command_msg; | |||
double & linear_x_cmd = command.twist.linear.x; | |||
double & linear_y_cmd = command.twist.linear.y; | |||
if (this->fieldOrientationEnabled) | |||
{ | |||
double robot_imu_orientation = odom->getHeading(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its not from an imu?
|
||
from state_actions.action import Action | ||
|
||
# This action is meant to take care of placing the April tags in the beginning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh no its not