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

Simulation when using Moveit with tm_driver doesn't move. #17

Open
JensVanhooydonck opened this issue Feb 5, 2022 · 0 comments
Open

Comments

@JensVanhooydonck
Copy link

When using the moveit integration, the robot doesn't move in simulation.
When changing the funtion set_joint_states from

void TmRobotState::set_joint_states(const std::vector<double> &pos, const std::vector<double> &vel, const std::vector<double> &tor)
{
	joint_angle() = pos;
	joint_speed() = vel;
	joint_torque() = tor;
}

to

void TmRobotState::set_joint_states(const std::vector<double> &pos, const std::vector<double> &vel, const std::vector<double> &tor)
{
	for (size_t i = 0; i < 6; ++i) {
		tmRobotStateDataFromEthernet.joint_angle[i] = pos[i] * (180.0 / M_PI);
		tmRobotStateDataFromEthernet.joint_speed[i] = vel[i];
		tmRobotStateDataFromEthernet.joint_torque[i] = tor[i];
	}
	multiThreadCache.set_catch_data(tmRobotStateDataFromEthernet);
}

The simulation works again.

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 a pull request may close this issue.

1 participant