Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion robotiq_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rospy</build_depend>

<run_depend>python-pymodbus</run_depend>
<run_depend>python3-pymodbus</run_depend>
<run_depend>robotiq_description</run_depend>
<run_depend>robotiq_msgs</run_depend>
</package>
14 changes: 3 additions & 11 deletions robotiq_description/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
cmake_minimum_required(VERSION 2.8.3)
project(robotiq_description)

find_package(catkin REQUIRED COMPONENTS
openrave_catkin
)
find_package(catkin REQUIRED)

catkin_package()

install(DIRECTORY launch meshes urdf DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION})

# Add the meshes to the OpenRAVE path
install(DIRECTORY meshes
DESTINATION ${OpenRAVE_DEVEL_DIR}/${OpenRAVE_DATA_DIR}/robots)
install(DIRECTORY meshes
DESTINATION ${OpenRAVE_INSTALL_DIR}/${OpenRAVE_DATA_DIR}/robots)
install(DIRECTORY meshes models urdf worlds
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
1 change: 0 additions & 1 deletion robotiq_description/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<buildtool_depend>catkin</buildtool_depend>
<depend>rospy</depend>
<depend>openrave_catkin</depend>

<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>urdf</exec_depend>
Expand Down
12 changes: 6 additions & 6 deletions robotiq_gazebo/src/mimic_joint_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MimicJointPlugin::MimicJointPlugin()

MimicJointPlugin::~MimicJointPlugin()
{
event::Events::DisconnectWorldUpdateBegin(this->updateConnection);
this->updateConnection.reset();

kill_sim = true;
}
Expand Down Expand Up @@ -167,20 +167,20 @@ void MimicJointPlugin::Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf )

void MimicJointPlugin::UpdateChild()
{
static ros::Duration period(world_->GetPhysicsEngine()->GetMaxStepSize());
static ros::Duration period(world_->Physics()->GetMaxStepSize());

// Set mimic joint's angle based on joint's angle
double angle = joint_->GetAngle(0).Radian()*multiplier_+offset_;
double angle = joint_->Position(0)*multiplier_+offset_;

if(abs(angle-mimic_joint_->GetAngle(0).Radian())>=sensitiveness_)
if(abs(angle-mimic_joint_->Position(0))>=sensitiveness_)
{
if(has_pid_)
{
double a = mimic_joint_->GetAngle(0).Radian();
double a = mimic_joint_->Position(0);
if(a!=a)
a = angle;
double error = angle-a;
double effort = gazebo::math::clamp(pid_.computeCommand(error, period), -max_effort_, max_effort_);
double effort = ignition::math::clamp(pid_.computeCommand(error, period), -max_effort_, max_effort_);
}
else
{
Expand Down