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

Hardware Interface read() write() #134

Open
elpimous opened this issue Oct 14, 2023 · 2 comments
Open

Hardware Interface read() write() #134

elpimous opened this issue Oct 14, 2023 · 2 comments

Comments

@elpimous
Copy link

Hello @grassjelly .

in your Hardware Integration page, you mention : Publish all the actuators' current angle using sensor_msgs/JointState to 'joint_states' topic.

However, it is not used into your code.

1/ Do you have anywhere, a hardware interface with both read and write functions ?
2/ Could i read imu values, to stabilize robot walk (any idea where i could start ? My imu is working and correctly publishing.)
Take care of you, Juan.
Vincent

@grassjelly
Copy link
Member

hey Vincent, the joint_states is mainly for autonomy (odometry calculation).

You can use an IMU's reading to control the body pose here. Here's a pseudo code.

auto feedback = readIMU();
auto target_pose = req_pose_;
auto new_pose = pid(target_pose, feedback);
body_controller_.poseCommand(target_foot_positions, new_pose);
leg_controller_.velocityCommand(target_foot_positions, req_vel_, rosTimeToChampTime(ros::Time::now()));
kinematics_.inverse(target_joint_positions, target_foot_positions);

@elpimous
Copy link
Author

elpimous commented Oct 15, 2023 via email

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

No branches or pull requests

2 participants