Skip to content
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

Merged
merged 28 commits into from
Mar 20, 2024
Merged

State machine #22

merged 28 commits into from
Mar 20, 2024

Conversation

nchan18
Copy link
Collaborator

@nchan18 nchan18 commented Mar 20, 2024

  • Reorganized state machine
  • Added actions for each step in state machine.
  • Fine tuned sensor values
  • Reset Odometry

LordGrieffing and others added 25 commits January 17, 2024 19:10
Copy link
Collaborator Author

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);
Copy link
Collaborator Author

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

src/grr_cmake_controller/src/odometry.cpp Show resolved Hide resolved
@@ -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,
Copy link
Member

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);
Copy link
Member

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)
Copy link
Member

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]
Copy link
Member

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();
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh no its not

@nchan18 nchan18 merged commit 7a657db into main Mar 20, 2024
2 checks passed
@c4glenn c4glenn deleted the state_machine branch March 20, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants