cmower / ros_pybullet_interface

ROS-PyBullet Interface.
https://github.com/ros-pybullet/ros_pybullet_interface
BSD 3-Clause "New" or "Revised" License
23 stars 16 forks source link

Fix move to initial state service #149

Open cmower opened 2 years ago

cmower commented 2 years ago

The service is initialized here:

https://github.com/cmower/ros_pybullet_interface/blob/2680c302114ac84f40b8946aa77ff1e7e9f81f84/ros_pybullet_interface/src/rpbi/pybullet_robot.py#L37

This uses the ResetJointState service template. However, the joint_state in the service request is ignored (the initial joint state is retrieved from the configuration file).

When calling the service it requires the user to pass an empty JointState message, as follows

duration = 5.0  # secs
resp = srv_handler(JointState(), duration)

Ideally this should be

duration = 5.0  # secs
resp = srv_handler(duration)