Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Post-migration todo #103

Open
cmower opened this issue Feb 21, 2022 · 5 comments
Open

Post-migration todo #103

cmower opened this issue Feb 21, 2022 · 5 comments
Assignees

Comments

@cmower
Copy link
Owner

cmower commented Feb 21, 2022

@stoutheo I need a list of scripts, launch files, and anything else you want to be migrated.

I will work out where to put them but may need your assistance to re-work config files, and topics.

@stoutheo
Copy link
Collaborator

@cmower sounds good.

We can start with the following and then we can keep on adding more.

  • scripts/hw_interface/vicon_tf_offset.py, launch/vicon_tf_offset_republish.launch
    This is used to create easily offset to vicon frames

  • scripts/ros_traj_consum_interpol_interface_node.py, src/ros_pybullet_interface/interpolation.py
    This is the interpolation, which comes along with launch and configs, I guess we will have to make a new easy example and hence make new configs and launch

  • I assume that will migrate the rbdl IK to the the other repo, so I skip it here

  • scripts/rviz_visualization.py, launch/rviz_visualization.launch and the rviz folder, but the latter has to become more generic I think

In the configs there are a lot of useful stuff too, but we will have to migrate them slow-slowly if we need them

Let's not close this issue, I will have to look again, maybe I forgot something.
Also, there were a bunch of services implemented, but I think you have them already in the revamp.
Is there somewhere (in revamp) a list of such services ?

@cmower
Copy link
Owner Author

cmower commented Feb 22, 2022

  • scripts/hw_interface/vicon_tf_offset.py, launch/vicon_tf_offset_republish.launch
    This is used to create easily offset to vicon frames
  • scripts/ros_traj_consum_interpol_interface_node.py, src/ros_pybullet_interface/interpolation.py
    This is the interpolation, which comes along with launch and configs, I guess we will have to make a new easy example and hence make new configs and launch
  • I assume that will migrate the rbdl IK to the the other repo, so I skip it here
  • scripts/rviz_visualization.py, launch/rviz_visualization.launch and the rviz folder, but the latter has to become more generic I think

I will start moving these.

In the configs there are a lot of useful stuff too, but we will have to migrate them slow-slowly if we need them

No problem, lets migrate as-and-when - just make sure to create a new branch that copies the current state of the main branch.

Let's not close this issue, I will have to look again, maybe I forgot something. Also, there were a bunch of services implemented, but I think you have them already in the revamp. Is there somewhere (in revamp) a list of such services ?

I haven't documented the services yet, but you can find those that are specific to an object in ./ros_pybullet_interface/src/ros_pybullet_interface, e.g. the robot the services are defined here:

self.srvs['robot_info'] = self.node.Service(f'rpbi/{self.name}/robot_info', RobotInfo, self.service_robot_info)
self.srvs['snap_to_real_robot'] = self.node.Service(f'rpbi/{self.name}/snap_to_real_robot', SetString, self.service_snap_to_real_robot)

Others services exist in the individual scripts.

There are also some services defined in the main ros_pybullet_interface_node.py script here:

self.Service('rpbi/add_pybullet_visual_object', SetString, partial(self.service_add_pybullet_object, object_type=PybulletVisualObject))
self.Service('rpbi/add_pybullet_collision_object', SetString, partial(self.service_add_pybullet_object, object_type=PybulletCollisionObject))
self.Service('rpbi/add_pybullet_dynamic_object', SetString, partial(self.service_add_pybullet_object, object_type=PybulletDynamicObject))
self.Service('rpbi/add_pybullet_robot', SetString, partial(self.service_add_pybullet_object, object_type=PybulletRobot))
self.Service('rpbi/remove_pybullet_object', SetString, self.service_remove_pybullet_object)

Let me know if there are any services missing that you need?

@cmower
Copy link
Owner Author

cmower commented Feb 22, 2022

@stoutheo re vicon_tf_offset.py. Instead you could use a static transform, see point 5 at bottom of this page. I prefer we only include things that aren't necessarily in the ROS ecosystem.

I see (below) that you publish this offset and broadcast it to tf2, is there a need for this? If you're subscribing somewhere else to the offset topic and you want the transform you can just as easily use a tf2 listener - I suggest using ros_pybullet_interface/src/ros_pybullet_interface/tf_interface.py.

msg_transform.header.frame_id = WORLD_FRAME
msg_transform.header.stamp = rospy.Time.now()
self.vicon_pose_offset_publisher.publish(msg_transform)
# Publish msg_transform in tf
self.tfBroadcaster.sendTransform(msg_transform)

If you're happy to deprecate vicon_tf_offset.py, we can directly adapt launch/vicon_tf_offset_republish.launch with static transforms.

@cmower
Copy link
Owner Author

cmower commented Feb 22, 2022

@stoutheo re scripts/rviz_visualization.py, would it make sense to initialize these objects as visual objects in Pybullet and then have the option to publish these as markers to ROS? (I think I may implement this feature anyway)

@cmower
Copy link
Owner Author

cmower commented Feb 24, 2022

@stoutheo I am creating a rpbi_utils package, and will put interpolation scripts there. I haven't edited the files, only put them in place. I am wondering however, re scripts/ros_traj_consum_interpol_interface_node.py (now renamed as rpbi_utils/scripts/interpolation_node.py), can you make this serviceable so that the node sits and waits for service requests rather than one-time executes a published message (messages/topics should be used for repeated calls)

@cmower cmower changed the title Migration todo Post-migration todo Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants