Ask Your Question

lonewolf's profile - activity

2020-07-16 22:14:49 -0500 received badge  Famous Question (source)
2018-04-05 09:07:37 -0500 received badge  Notable Question (source)
2018-04-05 09:07:37 -0500 received badge  Popular Question (source)
2018-03-09 09:00:35 -0500 received badge  Notable Question (source)
2017-09-27 22:15:03 -0500 received badge  Famous Question (source)
2017-09-22 08:41:29 -0500 received badge  Popular Question (source)
2017-01-09 04:59:57 -0500 received badge  Nice Question (source)
2016-09-03 03:08:54 -0500 received badge  Famous Question (source)
2016-08-30 16:33:07 -0500 received badge  Notable Question (source)
2016-06-10 04:07:46 -0500 received badge  Popular Question (source)
2016-05-31 21:15:50 -0500 asked a question ros control simultaneously run hardware and gazebo

I would like to run both the hardware and gazebo simultaneously so that I can see the movements of the arm. Suppose if i run just the hardware, I have the ros control loop printing the rate and I get the output as ros.manipulator_driver.//leftarm: Hz250.321

But If I run both the hardware and gazebo I get ros.manipulator_driver.//leftarm: Hz750.321. So I am not sure as to what is going on.

I am currently running the robot in the global namespace and gazebo in simulator namespace. I think there is something fishy going on because I also cannot run the joint trajectory action of the hardware as it throws an error saying Unexpected exception caught when initializing trajectory from ROS message data

I am using gazebo just to visualize the arm movement, would it be possible to do the same in RVIZ?

2016-05-12 04:31:28 -0500 asked a question ros_control position controller maxing the motor speed

I am using ros_control with position interface for my robotic arm which has dynamixel pro motors. The task I am trying to perform is to move one of the joints from 1 rad to 3.14 rad as fast as possible. So based on their data sheet, I made some calculations.

Max Speed = Velocity Limit / Gear Ratio = 16600 / 500 = 33.2 RPM = 3.476 radians/second
Increment between points in the trajectory = 0.06 radians 
Optimal time between the points = 0.06 / 3.476 = 0.01726 seconds

Based on the above calculations, I create a trajectory as below with 0.06 increments and 0.01s delay.

self._goal = FollowJointTrajectoryGoal()
self._time_since_start = 0
...

for pt in np.arange(1, 3.14, 0.06):
    point = JointTrajectoryPoint()
    point.positions = [pt, joint_angles[1:]] # Moving only the first joint
    self._time_since_start = self._time_since_start + 0.01
    point.time_from_start = rospy.Duration(self._time_since_start)

    self._goal.trajectory.points.append(point)

self._goal.trajectory.header.stamp = rospy.Time.now() + rospy.Duration(delay)

I think based on this I should be able to hit the max motor speed. But I have not been able to do so. I also checked the speed of my control read -> update -> write loop speed and it is 250Hz. This is done by inserting the below code in the loop.

temp++;
if (temp == 1)
    speed = ros::Time::now();

if (temp == 10000) {
    temp = 0;
    ros::Duration hz = ros::Time::now() - speed;
    ROS_DEBUG_STREAM_NAMED(ns_, "Hz " <<  (10000.0 / hz.toSec()));
}

Does anybody have experience working with problems like this and have any thoughts on how I can achieve the maximum speed?

2016-04-27 01:29:41 -0500 received badge  Notable Question (source)
2016-04-24 20:44:49 -0500 asked a question Header stamp of joint_trajectory_controller action interface

The docs say that

Joint trajectory messages allow to specify the time at which a new trajectory should start executing by means of the header timestamp, where zero time (the default) means "start now".

Basically from the above you can use the following code and it works..

self._goal.trajectory.header.stamp = rospy.Time(0)

But If I want it to start 6 seconds later and if I use the following, the code breaks down with the below error.

self._goal.trajectory.header.stamp = rospy.Time(6)
[ERROR] [1461548312.182092243]: Unexpected exception caught when initializing trajectory from ROS message data.

Because

// msg_start_time = 6 secs
// time = approx 72467 secs
ros::Duration msg_start_duration = msg_start_time - time; // negative value

So how do you get this working, I was also trying to understand how you can synchronize them it to the system time as using rospy.Time.now() does not work. I am using two arms with two separate controllers and I wanted to synchronize the actions by setting left.header.stamp = right.header.stamp = rospy.Time.now() + rospy.Duration(10), so that both would start at the same time.

2016-04-24 18:05:09 -0500 received badge  Editor (source)
2016-04-23 18:22:12 -0500 received badge  Organizer (source)
2016-04-23 18:21:38 -0500 asked a question joint_trajectory_controller action not working

I trying to execute a simple trajectory by changing the angles of the first joint in the arm of my robot by running the following code joint_trajectory.py. It basically creates a few points and sends them to the action. I have enabled verbose for the joint_trajectory_controller. The controller receives the trajectory and then prints

Trajectory has 12 segments:
- 1 segment(s) will still be executed from previous trajectory.
- 1 segment added for transitioning between the current trajectory and first point of the input message.
- 10 new segments (11 points) taken from the input trajectory.
[DEBUG] [1461452752.820999282]: Accepting goal, id: /joint_trajectory_test_client-1-1461452752.820, stamp: 1461452752.82

After this the clients moves to Transitioning to ACTIVE state and after that nothing happens. I think it is a small silly mistake by me somewhere that I can't figure out. Need some help?

I found that this was a problem related to the time in the header stamp. I was creating the header as below

# Start trajectory after 2 seconds
goal.trajectory.header.stamp = rospy.Time.now() + rospy.Duration(2)
print("Time secs", goal.trajectory.header.stamp.to_sec())
client.send_goal(goal)

But once I commented the second line above, it started working. I think I am not able to understand how the header time works..

2016-04-22 01:22:30 -0500 asked a question check controller_manager status

I am using ros_control with robotis arms (github). I want to know how to check the status of the controller_manager. Because I found that even if the controller_manager dies, the write is still executed which could lead to improper data being written.

I encountered this when I used <node name="ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false" output="screen" args="load pos_based_pos_traj_controller" /> in my launch file. The controller would load and then stop, but the write would be writing zero to the hardware.

So how can I overcome this problem or is this a invalid concern?

Also how do you check whether system has initialized properly, so that you can write. As when you initialize the system for the first time, I have only zeros in the position_cmd variable used to write to the hardware for certain period of time.

2016-04-20 22:34:14 -0500 received badge  Supporter (source)
2016-04-15 11:10:16 -0500 received badge  Popular Question (source)
2016-04-15 03:08:58 -0500 asked a question Collison checking for planned path

I have a trajectory ie. vector of joint_angles for an arm. The path is generated by using a evolutionary algorithm but it may be invalid and result in collisions. I want to check whether there is a collision using moveit or fcl.

Based on the tutorials, I think one way of doing this would be to

joint_angles = [[j1, j2, j3....], [j1, j2, j3....], [j1, j2, j3....], ....]
for each point in joint_angles
    robot_state::RobotState& current_state = planning_scene.getCurrentStateNonConst();
    current_state.setJointGroupPositions(joint_model_group, point);
    collision_result.clear();
    planning_scene.checkSelfCollision(collision_request, collision_result);

Is this the right way of doing it or is there a better way of passing the entire trajectory and checking collision.

2016-04-15 00:04:59 -0500 received badge  Scholar (source)
2016-04-09 03:44:14 -0500 received badge  Popular Question (source)
2016-04-08 12:22:21 -0500 commented question moveit_benchmark_gui compile error

Yup.. I just found that and was able to compile with the latest version of rviz.

2016-04-07 21:13:50 -0500 received badge  Enthusiast
2016-04-05 06:38:51 -0500 asked a question moveit_benchmark_gui compile error

I am trying to compile moveit from the source. But when I try to compile moveit_benchmark_gui, I am getting a linker error as below.

[  5%] Building CXX object CMakeFiles/moveit_benchmark_gui.dir/src/main_window.cpp.o
Linking CXX executable /home/lonewolf/workspace/ros/secondary_packages/devel_isolated/moveit_ros_benchmarks_gui/lib/moveit_ros_benchmarks_gui/moveit_benchmark_gui
CMakeFiles/moveit_benchmark_gui.dir/src/main_window.cpp.o: In function `benchmark_tool::MainWindow::updateGoalPoseMarkers(float, float)':
main_window.cpp:(.text+0x1167): undefined reference to `rviz::InteractiveMarker::update(float)'
main_window.cpp:(.text+0x11ab): undefined reference to `rviz::InteractiveMarker::update(float)'
main_window.cpp:(.text+0x11ca): undefined reference to `rviz::InteractiveMarker::update(float)'
main_window.cpp:(.text+0x11e9): undefined reference to `rviz::InteractiveMarker::update(float)'
CMakeFiles/moveit_benchmark_gui.dir/src/frame_marker.cpp.o: In function `benchmark_tool::FrameMarker::showDescription(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
frame_marker.cpp:(.text+0x5f6): undefined reference to `rviz::InteractiveMarker::processMessage(visualization_msgs::InteractiveMarker_<std::allocator<void> > const&)'
frame_marker.cpp:(.text+0x645): undefined reference to `rviz::InteractiveMarker::setPose(Ogre::Vector3, Ogre::Quaternion, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
frame_marker.cpp:(.text+0x66a): undefined reference to `rviz::InteractiveMarker::setShowDescription(bool)'
CMakeFiles/moveit_benchmark_gui.dir/src/frame_marker.cpp.o: In function `benchmark_tool::FrameMarker::setColor(float, float, float, float)':
frame_marker.cpp:(.text+0x7cc): undefined reference to `rviz::InteractiveMarker::processMessage(visualization_msgs::InteractiveMarker_<std::allocator<void> > const&)'
frame_marker.cpp:(.text+0x81b): undefined reference to `rviz::InteractiveMarker::setPose(Ogre::Vector3, Ogre::Quaternion, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/moveit_benchmark_gui.dir/src/frame_marker.cpp.o: In function `benchmark_tool::FrameMarker::setPose(Eigen::Transform<double, 3, 2, 0>&)':
frame_marker.cpp:(.text+0x1535): undefined reference to `rviz::InteractiveMarker::setPose(Ogre::Vector3, Ogre::Quaternion, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/moveit_benchmark_gui.dir/src/frame_marker.cpp.o: In function `benchmark_tool::FrameMarker::buildFrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, geometry_msgs::Pose_<std::allocator<void> > const&, double, std_msgs::ColorRGBA_<std::allocator<void> > const&)':
frame_marker.cpp:(.text+0x1f11): undefined reference to `rviz::InteractiveMarker::InteractiveMarker(Ogre::SceneNode*, rviz::DisplayContext*)'
frame_marker.cpp:(.text+0x1f87): undefined reference to `rviz::InteractiveMarker::processMessage(visualization_msgs::InteractiveMarker_<std::allocator<void> > const&)'
frame_marker.cpp:(.text+0x1f98): undefined reference to `rviz::InteractiveMarker::setShowVisualAids(bool)'
frame_marker.cpp:(.text+0x1fa6): undefined reference to `rviz::InteractiveMarker::setShowAxes(bool)'
frame_marker.cpp:(.text+0x1fb4): undefined reference to `rviz::InteractiveMarker::setShowDescription(bool)'
CMakeFiles/moveit_benchmark_gui.dir/src/frame_marker.cpp.o: In function `benchmark_tool::GripperMarker::buildFrom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, geometry_msgs::Pose_<std::allocator<void> > const&, double, std_msgs::ColorRGBA_<std::allocator<void> > const&)':
frame_marker.cpp:(.text+0x382e): undefined reference to `rviz::InteractiveMarker::InteractiveMarker(Ogre::SceneNode*, rviz::DisplayContext*)'
frame_marker.cpp:(.text+0x38a2): undefined reference to `rviz::InteractiveMarker::processMessage(visualization_msgs::InteractiveMarker_<std::allocator<void> > const&)'
frame_marker.cpp:(.text+0x38b0): undefined reference to `rviz::InteractiveMarker::setShowAxes(bool)'
frame_marker.cpp:(.text+0x38c1): undefined reference to `rviz::InteractiveMarker::setShowVisualAids(bool)'
frame_marker.cpp:(.text+0x38cf): undefined reference to `rviz::InteractiveMarker::setShowDescription ...
(more)
2016-01-31 15:29:42 -0500 received badge  Student (source)
2016-01-25 14:19:45 -0500 received badge  Famous Question (source)
2015-12-07 20:14:40 -0500 received badge  Notable Question (source)
2015-11-17 18:41:37 -0500 received badge  Popular Question (source)
2015-09-21 18:15:49 -0500 asked a question hector quadrotor motor pwm

I am using hector quadrotor model inorder to simulate a neural network. The idea is simulate a neural network created in the paper http://flyingmachinearena.org/wp-cont... . I know I will be able to spin it using /cmd_val angular velocity z.But I am not sure how to flip it. I wanted to make use of the /motor_pwm to do this. But I have been unable to get it to work. I tried writing an array of four values liike [100 100 60 100].

Can anyone help me as to how motor_pwm can be used to move the quadrotor.