Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using SetForce Function

I'm trying to use the SetForce() function on my sdf model using a plugin, on a particular joint using the following commands:

std::string joint_ptr_name = this->model->GetScopedName() + "::" + "rear_left_wheel_joint";

physics::JointPtr rear_left_wheel_joint=this->model->GetJoint(joint_ptr_name);

rear_left_wheel_joint->SetForce(0,20.0);

While running this plugin on my sdf model, I keep getting this error:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<t>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

I couldn't find much documentation for this error online; could someone please help me with this?

Running gazebo 7.14 and ubuntu 16.04

Using SetForce Function

I'm trying to use the SetForce() function on my sdf model using a plugin, on a particular joint using the following commands:

std::string joint_ptr_name = this->model->GetScopedName() this->model->GetName() + "::" + "rear_left_wheel_joint";

physics::JointPtr rear_left_wheel_joint=this->model->GetJoint(joint_ptr_name);

rear_left_wheel_joint->SetForce(0,20.0);

While running this plugin on my sdf model, I keep getting this error:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<t>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

I couldn't find much documentation for this error online; could someone please help me with this?

Running gazebo 7.14 and ubuntu 16.04

Using SetForce Function

I'm trying to use the SetForce() function on my sdf model using a plugin, on a particular joint using the following commands:

std::string joint_ptr_name = this->model->GetName() + "::" + "rear_left_wheel_joint";

physics::JointPtr rear_left_wheel_joint=this->model->GetJoint(joint_ptr_name);

rear_left_wheel_joint->SetForce(0,20.0);

While running this plugin on my sdf model, I keep getting this error:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<t>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

I couldn't find much documentation for this error online; could someone please help me with this?

Running gazebo 7.14 and ubuntu 16.04

Plugin code:

Using SetForce Function

I'm trying to use the SetForce() function on my sdf model using a plugin, on a particular joint using the following commands:

std::string joint_ptr_name joint1 = this->model->GetName() + "::" + "rear_left_wheel_joint";

physics::JointPtr rear_left_wheel_joint=this->model->GetJoint(joint_ptr_name);rear_left_wheel_joint=this->model->GetJoint(joint1);

rear_left_wheel_joint->SetForce(0,20.0);

While running this plugin on my sdf model, I keep getting this error:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<t>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

I couldn't find much documentation for this error online; could someone please help me with this?

Running gazebo 7.14 and ubuntu 16.04

Plugin code:

Using SetForce Function

I'm trying to use the SetForce() function on my sdf model using a plugin, on a particular joint using the following commands:

std::string joint1 = this->model->GetName() + "::" + "rear_left_wheel_joint";

physics::JointPtr rear_left_wheel_joint=this->model->GetJoint(joint1);

rear_left_wheel_joint->SetForce(0,20.0);

While running this plugin on my sdf model, I keep getting this error:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<t>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

I couldn't find much documentation for this error online; could someone please help me with this?

Running gazebo 7.14 and ubuntu 16.04

Plugin code:

Using SetForce Function

I'm trying to use the SetForce() function on my sdf model using a plugin, on a particular joint using the following commands:

std::string joint1 = this->model->GetName() + "::" + "rear_left_wheel_joint";

physics::JointPtr rear_left_wheel_joint=this->model->GetJoint(joint1);

rear_left_wheel_joint->SetForce(0,20.0);

While running this plugin on my sdf model, I keep getting this error:

gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::physics::Joint; typename boost::detail::sp_member_access<t>::type = gazebo::physics::Joint*]: Assertion `px != 0' failed.

I couldn't find much documentation for this error online; could someone please help me with this?

Running gazebo 7.14 and ubuntu 16.04

Plugin code: